Changeset 5d4e520
- Timestamp:
- 10/28/08 17:34:47 (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:
- aa22b5b
- Parents:
- 37f2a9b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_tsh.c
rf0fb38f r5d4e520 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;
Note: See TracChangeset
for help on using the changeset viewer.