4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change
on this file since 83445f0 was
4e65f42,
checked in by Shane Alcock <salcock@…>, 16 years ago
|
Fixed segmentation faults when trace_destroy is called on a trace that wasn't successfully created
libdl is now checked for and only linked against if available (BSD's don't have a libdl)
Fixed the libpacketdump .so's to use libtrace's generic protocol headers as well as trace_ether_ntoa
Added missing check for strlcpy
Added a couple of #defines to various tools that needed them under FreeBSD
Removed some needless #includes from the libpacketdump .so's
|
-
Property mode set to
100644
|
File size:
520 bytes
|
Line | |
---|
1 | #include <netinet/in.h> |
---|
2 | #include <stdio.h> |
---|
3 | #include <inttypes.h> |
---|
4 | #include <dlfcn.h> |
---|
5 | #include "libpacketdump.h" |
---|
6 | #include "libtrace.h" |
---|
7 | |
---|
8 | extern "C" |
---|
9 | void decode(int link_type,char *packet,int len) |
---|
10 | { |
---|
11 | // ATM |
---|
12 | printf(" Legacy Framing:"); |
---|
13 | if (len>=12) { |
---|
14 | uint16_t type = htons(*(uint16_t*)(packet+sizeof(libtrace_atm_cell)+4)); |
---|
15 | printf(" %04x\n",type); |
---|
16 | decode_next(packet+sizeof(libtrace_atm_cell) + 4, |
---|
17 | len-sizeof(libtrace_atm_cell) -4, |
---|
18 | "eth",type); |
---|
19 | } |
---|
20 | else { |
---|
21 | printf("[|Truncated]\n"); |
---|
22 | return; |
---|
23 | } |
---|
24 | return; |
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.