Changeset 528eb6e for libpacketdump
- Timestamp:
- 12/04/12 15:24:34 (8 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:
- b4c3f61
- Parents:
- fd87898
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpacketdump/link_6.c
rb3edbe9 r528eb6e 12 12 #include "libtrace.h" 13 13 14 #include " arphrd.h"14 #include "libtrace_arphrd.h" 15 15 16 16 /* Copied this here because this isn't currently part of our external API - … … 18 18 static libtrace_linktype_t arphrd_type_to_libtrace(unsigned int arphrd) { 19 19 switch(arphrd) { 20 case ARPHRD_ETHER: return TRACE_TYPE_ETH;21 case ARPHRD_EETHER: return TRACE_TYPE_ETH;22 case ARPHRD_IEEE80211: return TRACE_TYPE_80211;23 case ARPHRD_80211_RADIOTAP: return TRACE_TYPE_80211_RADIO;24 case ARPHRD_PPP: return TRACE_TYPE_NONE;25 case ARPHRD_LOOPBACK: return TRACE_TYPE_NONE;26 case ARPHRD_NONE: return TRACE_TYPE_NONE;20 case LIBTRACE_ARPHRD_ETHER: return TRACE_TYPE_ETH; 21 case LIBTRACE_ARPHRD_EETHER: return TRACE_TYPE_ETH; 22 case LIBTRACE_ARPHRD_IEEE80211: return TRACE_TYPE_80211; 23 case LIBTRACE_ARPHRD_IEEE80211_RADIOTAP: return TRACE_TYPE_80211_RADIO; 24 case LIBTRACE_ARPHRD_PPP: return TRACE_TYPE_NONE; 25 case LIBTRACE_ARPHRD_LOOPBACK: return TRACE_TYPE_NONE; 26 case LIBTRACE_ARPHRD_NONE: return TRACE_TYPE_NONE; 27 27 } 28 28 printf("Unknown ARPHRD: %u\n", arphrd); … … 62 62 ret=trace_get_payload_from_meta(pkt, &linktype, &len); 63 63 64 if (ntohs(sll->hatype) == ARPHRD_ETHER ||65 ntohs(sll->hatype) == ARPHRD_LOOPBACK) {64 if (ntohs(sll->hatype) == LIBTRACE_ARPHRD_ETHER || 65 ntohs(sll->hatype) == LIBTRACE_ARPHRD_LOOPBACK) { 66 66 67 67 if (ntohs(sll->protocol) == 0x0060) {
Note: See TracChangeset
for help on using the changeset viewer.