Changeset e4e94c38 for libpacketdump
- Timestamp:
- 02/22/11 10:01:55 (10 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
- Children:
- cd4e06c
- Parents:
- 9cc1266
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpacketdump/link_6.c
ref07202 re4e94c38 4 4 */ 5 5 6 #include "config.h" 6 7 #include "libtrace_int.h" 7 8 #include <sys/types.h> … … 10 11 #include "libpacketdump.h" 11 12 #include "libtrace.h" 13 14 #include "arphrd.h" 12 15 13 16 DLLEXPORT void decode(int link_type ,const char *pkt,unsigned len) … … 42 45 /* Do we recognise the hardware address type? */ 43 46 ret=trace_get_payload_from_meta(pkt, &linktype, &len); 44 /*type = arphrd_type_to_libtrace(ntohs(sll->hatype)); */ 45 if (linktype != 65535) { 46 decode_next(ret, len, "link", linktype); 47 /*decode_next(pkt + sizeof(*sll), len - sizeof(*sll), "link", type);*/ 48 return; 49 } 47 48 if (ntohs(sll->hatype) == ARPHRD_ETHER || 49 ntohs(sll->hatype) == ARPHRD_LOOPBACK) 50 decode_next(pkt + sizeof(*sll), len - sizeof(*sll), "eth", ntohs(sll->protocol)); 51 52 else 53 decode_next(ret, len, "link", ntohs(sll->hatype)); 50 54 51 /* Meh.. pass it off to eth decoder */ 52 decode_next(pkt + sizeof(*sll), len - sizeof(*sll), "eth", ntohs(sll->protocol)); 53 55 return; 56 54 57 } 55 58
Note: See TracChangeset
for help on using the changeset viewer.