Changeset 77f79c7
- Timestamp:
- 03/27/13 14:48:26 (9 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:
- 593a7c7
- Parents:
- fc8b322
- Location:
- lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/libtrace.h.in
rc909fad r77f79c7 255 255 TRACE_DLT_C_HDLC = 104, 256 256 TRACE_DLT_IEEE802_11 = 105, 257 TRACE_DLT_OPENBSD_LOOP = 108, 257 258 TRACE_DLT_LINUX_SLL = 113, 258 259 TRACE_DLT_PFLOG = 117, … … 281 282 TRACE_TYPE_PPP = 17, /**< PPP frames */ 282 283 TRACE_TYPE_METADATA = 18, /**< WDCAP-style meta-data */ 283 TRACE_TYPE_NONDATA = 19 /**< Not a data packet */ 284 TRACE_TYPE_NONDATA = 19, /**< Not a data packet */ 285 TRACE_TYPE_OPENBSD_LOOP = 20 /**< OpenBSD loopback */ 284 286 } libtrace_linktype_t; 285 287 -
lib/linktypes.c
r528eb6e r77f79c7 65 65 case TRACE_DLT_PPP_SERIAL: return TRACE_TYPE_POS; 66 66 case TRACE_DLT_C_HDLC: return TRACE_TYPE_HDLC_POS; 67 case TRACE_DLT_OPENBSD_LOOP: return TRACE_TYPE_OPENBSD_LOOP; 67 68 /* Unhandled */ 68 69 case TRACE_DLT_NULL: /* Raw IP frame with a BSD specific … … 93 94 /* Theres more than one type of PPP. Who knew? */ 94 95 case TRACE_TYPE_POS: return TRACE_DLT_PPP_SERIAL; 96 case TRACE_TYPE_OPENBSD_LOOP: return TRACE_DLT_OPENBSD_LOOP; 95 97 96 98 /* Below here are unsupported conversions */ … … 200 202 case TRACE_TYPE_METADATA: 201 203 case TRACE_TYPE_NONDATA: 204 case TRACE_TYPE_OPENBSD_LOOP: 202 205 break; 203 206 } -
lib/protocols_l2.c
r979a84f4 r77f79c7 381 381 case TRACE_TYPE_METADATA: 382 382 case TRACE_TYPE_NONDATA: 383 case TRACE_TYPE_OPENBSD_LOOP: 383 384 ((libtrace_packet_t*)packet)->l2_header = meta; 384 385 ((libtrace_packet_t*)packet)->l2_remaining = *remaining; … … 413 414 case TRACE_TYPE_METADATA: 414 415 case TRACE_TYPE_NONDATA: 416 case TRACE_TYPE_OPENBSD_LOOP: 415 417 ((libtrace_packet_t*)packet)->l2_header = meta; 416 418 ((libtrace_packet_t*)packet)->l2_remaining = *remaining; … … 517 519 case TRACE_TYPE_AAL5: 518 520 return NULL; 521 522 case TRACE_TYPE_OPENBSD_LOOP: 523 link = link + 4; /* Loopback header is 4 bytes */ 524 if ((*(char*)link&0xF0) == 0x40) 525 *ethertype=TRACE_ETHERTYPE_IP; /* IPv4 */ 526 else if ((*(char*)link&0xF0) == 0x60) 527 *ethertype=TRACE_ETHERTYPE_IPV6; /* IPv6 */ 528 return link; /* I love the simplicity */ 529 530 519 531 } 520 532 return NULL; … … 574 586 case TRACE_TYPE_PPP: 575 587 case TRACE_TYPE_NONDATA: 588 case TRACE_TYPE_OPENBSD_LOOP: 576 589 return NULL; 577 590 … … 621 634 case TRACE_TYPE_PPP: 622 635 case TRACE_TYPE_NONDATA: 636 case TRACE_TYPE_OPENBSD_LOOP: 623 637 /* No MAC address */ 624 638 return NULL; -
lib/protocols_pktmeta.c
r528eb6e r77f79c7 161 161 case TRACE_TYPE_METADATA: 162 162 case TRACE_TYPE_NONDATA: 163 case TRACE_TYPE_OPENBSD_LOOP: 163 164 return NULL; 164 165 } … … 216 217 case TRACE_TYPE_METADATA: 217 218 case TRACE_TYPE_NONDATA: 219 case TRACE_TYPE_OPENBSD_LOOP: 218 220 /* In this case, the pointer passed in does not point 219 221 * to a metadata header and so we cannot get the
Note: See TracChangeset
for help on using the changeset viewer.