Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arne Øslebø
mapi
Commits
5b10b851
Commit
5b10b851
authored
Aug 25, 2006
by
Browse files
anonymization support for POS packets.
git-svn-id:
file:///home/svn/mapi/trunk@820
8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent
7eb78514
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/anonflib/anon_snort_decode.c
View file @
5b10b851
...
...
@@ -9,6 +9,7 @@
void
DecodeTRPkt
(
mapipacket
*
,
struct
pcap_pkthdr
*
,
unsigned
char
*
,
int
snaplen
);
void
DecodeFDDIPkt
(
mapipacket
*
,
struct
pcap_pkthdr
*
,
unsigned
char
*
,
int
snaplen
);
void
DecodeLinuxSLLPkt
(
mapipacket
*
,
struct
pcap_pkthdr
*
,
unsigned
char
*
,
int
snaplen
);
void
DecodePOSPkt
(
mapipacket
*
,
struct
pcap_pkthdr
*
,
unsigned
char
*
,
int
snaplen
);
void
DecodeEthPkt
(
mapipacket
*
,
struct
pcap_pkthdr
*
,
unsigned
char
*
,
int
snaplen
);
void
DecodeIEEE80211Pkt
(
mapipacket
*
,
struct
pcap_pkthdr
*
,
unsigned
char
*
,
int
snaplen
);
void
DecodeVlan
(
unsigned
char
*
,
const
unsigned
int
,
mapipacket
*
,
int
snaplen
);
...
...
@@ -37,6 +38,25 @@ int DecodeIPOnly(unsigned char * pkt, const unsigned int len, mapipacket * p,int
grinder_t
SetPktProcessor
(
int
datalink
);
void
DecodePOSPkt
(
mapipacket
*
p
,
struct
pcap_pkthdr
*
pkthdr
,
unsigned
char
*
pkt
,
int
snaplen
)
{
unsigned
int
pkt_len
;
/* suprisingly, the length of the packet */
unsigned
int
cap_len
;
/* caplen value */
bzero
((
char
*
)
p
,
sizeof
(
mapipacket
));
p
->
pkth
=
pkthdr
;
p
->
pkt
=
pkt
;
/* set the lengths we need */
pkt_len
=
pkthdr
->
len
;
/* total packet length */
cap_len
=
pkthdr
->
caplen
;
/* captured packet length */
if
(
snaplen
<
(
int
)
pkt_len
)
pkt_len
=
cap_len
;
DecodeIP
(
p
->
pkt
+
4
,
cap_len
-
4
,
p
,
snaplen
);
}
void
DecodeEthPkt
(
mapipacket
*
p
,
struct
pcap_pkthdr
*
pkthdr
,
unsigned
char
*
pkt
,
int
snaplen
)
{
...
...
@@ -1830,7 +1850,9 @@ grinder_t SetPktProcessor(int datalink)
case
DLT_EN10MB
:
/* Ethernet */
grinder
=
DecodeEthPkt
;
break
;
case
DLT_CHDLC
:
/* POS */
grinder
=
DecodePOSPkt
;
break
;
#ifdef DLT_IEEE802_11
case
DLT_IEEE802_11
:
grinder
=
DecodeIEEE80211Pkt
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment