Changeset 5d233a5
- Timestamp:
- 08/21/06 23:18:19 (14 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:
- 8e6ac85
- Parents:
- 37168af
- Location:
- lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_pcap.c
r37168af r5d233a5 380 380 * rt to do it for us 381 381 */ 382 linktype = rt_to_pcap_dlt(packet->type);382 int linktype = rt_to_pcap_dlt(packet->type); 383 383 return pcap_dlt_to_libtrace(linktype); 384 384 } -
lib/format_pcapfile.c
rc0cd256 r5d233a5 80 80 return num; 81 81 if (DATA(libtrace)->header.magic_number == 0xd4c3b2a1) 82 return ((num<<8)&0xFF00)|((num>>8)&0x00FF); 82 return byteswap16(num); 83 83 84 return num; 84 85 } … … 92 93 return num; 93 94 if (DATA(libtrace)->header.magic_number == 0xd4c3b2a1) 94 return 95 ((num&0x000000FF)<<24) 96 || ((num&0x0000FF00)<<8) 97 || ((num&0x00FF0000)>>8) 98 || ((num&0xFF000000)>>24); 95 return byteswap32(num); 96 99 97 return num; 100 98 } … … 154 152 } 155 153 156 static int pcapfile_read_packet(libtrace_t *libtrace, libtrace_packet_t *packet) { 154 static int pcapfile_read_packet(libtrace_t *libtrace, libtrace_packet_t *packet) 155 { 157 156 int err; 158 157
Note: See TracChangeset
for help on using the changeset viewer.