Changeset 4315572b for lib/format_wag.c
- Timestamp:
- 04/23/06 14:11:01 (15 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:
- 698a217
- Parents:
- e337363
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_wag.c
r222d8f5 r4315572b 298 298 buffer2 = buffer = packet->buffer; 299 299 300 301 if ((numbytes = libtrace_io_read(INPUT.file, buffer, sizeof(struct frame_t))) == -1) { 300 numbytes = libtrace_io_read(INPUT.file, buffer, sizeof(struct frame_t)); 301 302 if (numbytes == 0) { 303 return 0; 304 } 305 306 if (numbytes != sizeof(struct frame_t)) { 302 307 int err=errno; 303 308 trace_set_err(libtrace,err, … … 307 312 } 308 313 309 if (numbytes == 0) {310 return 0;311 }312 313 314 if (htons(((struct frame_t *)buffer)->magic) != 0xdaa1) { 314 315 trace_set_err(libtrace, 315 TRACE_ERR_BAD_PACKET,"Insufficient magic ");316 TRACE_ERR_BAD_PACKET,"Insufficient magic (%04x)",htons(((struct frame_t *)buffer)->magic)); 316 317 return -1; 317 318 }
Note: See TracChangeset
for help on using the changeset viewer.