Changeset 931 for trunk/lib/format_pcapfile.c
- Timestamp:
- 08/21/06 23:18:19 (7 years ago)
- File:
-
- 1 edited
-
trunk/lib/format_pcapfile.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/format_pcapfile.c
r922 r931 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.
