Changeset 8b98289
- Timestamp:
- 09/20/07 18:36:24 (15 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:
- a07a0ec
- Parents:
- 75453c2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/protocols_pktmeta.c
ra81d2fc r8b98289 31 31 } 32 32 33 /* What kind of wacked out header, has this in host order?! */34 33 if (type) *type = ntohs(sll->hatype); 35 34 … … 38 37 } 39 38 40 void *trace_get_payload_from_pflog(void *link, 41 uint16_t *type, uint32_t *remaining) 39 /* NB: type is returned as an ethertype */ 40 static void *trace_get_payload_from_pflog(const void *link, 41 libtrace_linktype_t *type, uint32_t *remaining) 42 42 { 43 43 libtrace_pflog_header_t *pflog = (libtrace_pflog_header_t*)link; 44 44 if (remaining) { 45 45 if (*remaining<sizeof(*pflog)) 46 46 return NULL; … … 48 48 } 49 49 if (type) { 50 switch(pflog->af) { 51 case AF_INET6: *type=0x86DD; break; 52 case AF_INET: *type=0x0800; break; 53 default: 54 /* Unknown */ 55 return NULL; 56 } 50 *type = TRACE_TYPE_NONE; 57 51 } 58 52 return (void*)((char*)pflog+ sizeof(*pflog)); … … 60 54 61 55 /* Returns the 'payload' of the prism header, which is the 802.11 frame */ 62 void *trace_get_payload_from_prism (const void *link,56 static void *trace_get_payload_from_prism (const void *link, 63 57 libtrace_linktype_t *type, uint32_t *remaining) 64 58 { … … 75 69 76 70 /* Returns the 'payload' of the radiotap header, which is the 802.11 frame */ 77 void *trace_get_payload_from_radiotap (const void *link,71 static void *trace_get_payload_from_radiotap (const void *link, 78 72 libtrace_linktype_t *type, uint32_t *remaining) 79 73 { … … 154 148 linktype, remaining); 155 149 return nexthdr; 156 case TRACE_TYPE_HDLC_POS: 157 case TRACE_TYPE_ETH: 158 case TRACE_TYPE_ATM: 159 case TRACE_TYPE_80211: 160 case TRACE_TYPE_NONE: 161 case TRACE_TYPE_PFLOG: 150 case TRACE_TYPE_PFLOG: 151 nexthdr = trace_get_payload_from_pflog(meta, 152 linktype, remaining); 153 return nexthdr; 154 case TRACE_TYPE_HDLC_POS: 155 case TRACE_TYPE_ETH: 156 case TRACE_TYPE_ATM: 157 case TRACE_TYPE_80211: 158 case TRACE_TYPE_NONE: 162 159 case TRACE_TYPE_POS: 163 160 case TRACE_TYPE_AAL5:
Note: See TracChangeset
for help on using the changeset viewer.