Changeset 1375
- Timestamp:
- 28/10/08 17:34:47 (2 months ago)
- Files:
-
- trunk/lib/format_tsh.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/format_tsh.c
r1332 r1375 50 50 typedef struct tsh_pkt_header_t { 51 51 uint32_t seconds; 52 LT_BITFIELD32 iface:8; 53 LT_BITFIELD32 usecs:24; 52 uint32_t usecs; 54 53 } tsh_pkt_header_t; 55 54 … … 187 186 188 187 static libtrace_direction_t tsh_get_direction(const libtrace_packet_t *packet) { 189 return ((tsh_pkt_header_t*)(packet->header))->iface;188 return ntohl(((tsh_pkt_header_t*)(packet->header))->usecs & htonl(0xFF000000)) >> 24; 190 189 } 191 190 … … 194 193 struct timeval tv; 195 194 tv.tv_sec=ntohl(((tsh_pkt_header_t*)(packet->header))->seconds); 196 tv.tv_usec=ntohl(((tsh_pkt_header_t*)(packet->header))->usecs );195 tv.tv_usec=ntohl(((tsh_pkt_header_t*)(packet->header))->usecs & htonl(0x00FFFFFF)); 197 196 198 197 return tv;
