- Timestamp:
- 11/01/06 10:33:29 (16 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:
- 7ca2c7d
- Parents:
- 19c6cbe
- Location:
- lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_pcapfile.c
rc9f6ee5 r2f3a25e 305 305 hdr.caplen = trace_get_capture_length(packet); 306 306 /* PCAP doesn't include the FCS, we do */ 307 hdr.wirelen = trace_get_wire_length(packet)-4; 307 if (trace_get_link_type(packet)==TRACE_TYPE_ETH) 308 if (trace_get_wire_length(packet) >= 4) { 309 hdr.wirelen = 310 trace_get_wire_length(packet)-4; 311 } 312 else { 313 hdr.wirelen = 0; 314 } 315 else 316 hdr.wirelen = trace_get_wire_length(packet); 317 308 318 309 319 numbytes=libtrace_io_write(DATAOUT(out)->file, -
lib/libtrace.h.in
r10a46bd r2f3a25e 196 196 }; 197 197 198 /** Enumeration of DLT types supported by libtrace */ 198 /** Enumeration of DLT types supported by libtrace 199 * These aren't actually DLTs, but LINKTYPE_'s, so becareful when modifying 200 * this. 201 */ 199 202 typedef enum { 200 203 TRACE_DLT_NULL = 0, 201 204 TRACE_DLT_EN10MB = 1, 202 205 TRACE_DLT_ATM_RFC1483 = 11, 206 TRACE_DLT_RAW = 101, 203 207 TRACE_DLT_IEEE802_11 = 105, 204 208 TRACE_DLT_LINUX_SLL = 113, -
lib/linktypes.c
r5551415 r2f3a25e 35 35 { 36 36 switch(dlt) { 37 case TRACE_DLT_ NULL: return TRACE_TYPE_NONE;37 case TRACE_DLT_RAW: return TRACE_TYPE_NONE; 38 38 case TRACE_DLT_EN10MB: return TRACE_TYPE_ETH; 39 39 case TRACE_DLT_IEEE802_11: return TRACE_TYPE_80211; … … 55 55 */ 56 56 switch(type) { 57 case TRACE_TYPE_NONE: return TRACE_DLT_ NULL;57 case TRACE_TYPE_NONE: return TRACE_DLT_RAW; 58 58 case TRACE_TYPE_ETH: return TRACE_DLT_EN10MB; 59 59 case TRACE_TYPE_80211: return TRACE_DLT_IEEE802_11; … … 259 259 ->hatype)) { 260 260 case ARPHRD_PPP: 261 packet->type=pcap_dlt_to_rt(TRACE_DLT_ NULL);261 packet->type=pcap_dlt_to_rt(TRACE_DLT_RAW); 262 262 break; 263 263 case ARPHRD_ETHER:
Note: See TracChangeset
for help on using the changeset viewer.