4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change
on this file since a4bfbf0 was
3b8a5ef,
checked in by Daniel Lawson <dlawson@…>, 17 years ago
|
I hate shane
|
-
Property mode set to
100644
|
File size:
562 bytes
|
Line | |
---|
1 | #include <netinet/ether.h> |
---|
2 | #include <netinet/in.h> |
---|
3 | #include <stdio.h> |
---|
4 | #include <inttypes.h> |
---|
5 | #include <dlfcn.h> |
---|
6 | #include <map> |
---|
7 | #include "libpacketdump.h" |
---|
8 | #include "libtrace.h" |
---|
9 | |
---|
10 | extern "C" |
---|
11 | void decode(int link_type,char *packet,int len) |
---|
12 | { |
---|
13 | // ATM |
---|
14 | printf(" Legacy Framing:"); |
---|
15 | if (len>=12) { |
---|
16 | uint16_t type = htons(*(uint16_t*)(packet+sizeof(libtrace_atm_cell)+4)); |
---|
17 | printf(" %04x\n",type); |
---|
18 | decode_next(packet+sizeof(libtrace_atm_cell) + 4, |
---|
19 | len-sizeof(libtrace_atm_cell) -4, |
---|
20 | "eth",type); |
---|
21 | } |
---|
22 | else { |
---|
23 | printf("[|Truncated]\n"); |
---|
24 | return; |
---|
25 | } |
---|
26 | return; |
---|
27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.