4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change
on this file since 7ecfe7f was
09d3bef,
checked in by Perry Lorier <perry@…>, 16 years ago
|
Renamed to .c
|
-
Property mode set to
100644
|
File size:
519 bytes
|
Rev | Line | |
---|
[09d3bef] | 1 | #include "libpacketdump.h" |
---|
| 2 | #include "libtrace.h" |
---|
| 3 | #include <netinet/in.h> |
---|
| 4 | #include <stdio.h> |
---|
| 5 | #include <inttypes.h> |
---|
| 6 | #include <dlfcn.h> |
---|
| 7 | |
---|
| 8 | void decode(int link_type,char *packet,int len) |
---|
| 9 | { |
---|
| 10 | // POS |
---|
| 11 | printf(" Legacy POS Framing:"); |
---|
| 12 | // take into account llc |
---|
| 13 | if (len>=4) { |
---|
| 14 | uint16_t type = htons( |
---|
| 15 | ((libtrace_pos_t *)packet)->ether_type); |
---|
| 16 | printf(" %04x\n",type); |
---|
| 17 | decode_next(packet+sizeof(libtrace_pos_t), |
---|
| 18 | len-sizeof(libtrace_pos_t), |
---|
| 19 | "eth",type); |
---|
| 20 | } |
---|
| 21 | else { |
---|
| 22 | printf("[|Truncated]\n"); |
---|
| 23 | return; |
---|
| 24 | } |
---|
| 25 | return; |
---|
| 26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.