Changeset 0210df3
- Timestamp:
- 04/27/06 01:26:33 (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:
- af1e721
- Parents:
- 4927e86
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_wag.c
r747c501 r0210df3 180 180 { 181 181 close(INPUT.fd); 182 183 182 return 0; 184 183 } … … 322 321 size = framesize - sizeof(struct frame_t); 323 322 assert(size < LIBTRACE_PACKET_BUFSIZE); 324 323 assert(size > 0); 325 324 326 325 if ((numbytes=libtrace_io_read(INPUT.file, buffer2, size)) != size) { … … 383 382 384 383 static int wag_get_capture_length(const struct libtrace_packet_t *packet) { 385 struct frame_data_rx_t *wagptr = (struct frame_data_rx_t *)packet->buffer;386 return ntohs(wagptr->hdr.size);384 return ntohs(((struct frame_t *)packet->header)->size) 385 -sizeof(struct frame_data_rx_t); 387 386 } 388 387 389 388 static int wag_get_wire_length(const struct libtrace_packet_t *packet) { 390 struct frame_data_rx_t *wagptr = (struct frame_data_rx_t *)packet->buffer;391 return ntohs(wagptr->hdr.size);389 return ntohs(((struct frame_t *)packet->header)->size) 390 -sizeof(struct frame_data_rx_t); 392 391 } 393 392
Note: See TracChangeset
for help on using the changeset viewer.