Changeset 431548c5 for lib/format_pcap.c
- Timestamp:
- 05/04/06 14:54:59 (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:
- 48a20e3
- Parents:
- e5f1431
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_pcap.c
re5f1431 r431548c5 368 368 } 369 369 370 static int8_t pcap_set_direction(libtrace_packet_t *packet,int8_t dir) { 370 static libtrace_direction_t pcap_set_direction(libtrace_packet_t *packet, 371 libtrace_direction_t dir) { 371 372 libtrace_sll_header_t *sll; 372 373 promote_packet(packet); 373 374 sll=packet->payload; 374 if(dir== 0)375 sll->pkttype= 0;375 if(dir==TRACE_DIR_OUTGOING) 376 sll->pkttype=TRACE_DIR_OUTGOING; 376 377 else 377 sll->pkttype= 1;378 sll->pkttype=TRACE_DIR_INCOMING; 378 379 return sll->pkttype; 379 380 } 380 381 381 static int8_t pcap_get_direction(const libtrace_packet_t *packet) {382 static libtrace_direction_t pcap_get_direction(const libtrace_packet_t *packet) { 382 383 libtrace_direction_t direction = -1; 383 384 switch(pcap_get_link_type(packet)) { … … 404 405 */ 405 406 if (ntohs(sll->pkttype == 0)) { 406 direction = 1;407 direction = TRACE_DIR_INCOMING; 407 408 } else { 408 direction = 0;409 direction = TRACE_DIR_OUTGOING; 409 410 } 410 411 break; … … 424 425 if (ntohs(pflog->dir==0)) { 425 426 426 direction = 1;427 direction = TRACE_DIR_INCOMING; 427 428 } 428 429 else { 429 direction = 0;430 direction = TRACE_DIR_OUTGOING; 430 431 } 431 432 break;
Note: See TracChangeset
for help on using the changeset viewer.