Changeset 431548c5 for lib/format_pcap.c


Ignore:
Timestamp:
05/04/06 14:54:59 (15 years ago)
Author:
Shane Alcock <salcock@…>
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
Message:

Updated various format modules to use libtrace_direction_t rather than int8_t
Changed MIN in fifo.c to be FIFO_MIN as this was very prone to conflict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcap.c

    re5f1431 r431548c5  
    368368}
    369369
    370 static int8_t pcap_set_direction(libtrace_packet_t *packet,int8_t dir) {
     370static libtrace_direction_t pcap_set_direction(libtrace_packet_t *packet,
     371                libtrace_direction_t dir) {
    371372        libtrace_sll_header_t *sll;
    372373        promote_packet(packet);
    373374        sll=packet->payload;
    374         if(dir==0)
    375                 sll->pkttype=0;
     375        if(dir==TRACE_DIR_OUTGOING)
     376                sll->pkttype=TRACE_DIR_OUTGOING;
    376377        else
    377                 sll->pkttype=1;
     378                sll->pkttype=TRACE_DIR_INCOMING;
    378379        return sll->pkttype;
    379380}
    380381
    381 static int8_t pcap_get_direction(const libtrace_packet_t *packet) {
     382static libtrace_direction_t pcap_get_direction(const libtrace_packet_t *packet) {
    382383        libtrace_direction_t direction  = -1;
    383384        switch(pcap_get_link_type(packet)) {
     
    404405                         */
    405406                        if (ntohs(sll->pkttype == 0)) {
    406                                 direction = 1;
     407                                direction = TRACE_DIR_INCOMING;
    407408                        } else {
    408                                 direction = 0;
     409                                direction = TRACE_DIR_OUTGOING;
    409410                        }
    410411                        break;
     
    424425                        if (ntohs(pflog->dir==0)) {
    425426
    426                                 direction = 1;
     427                                direction = TRACE_DIR_INCOMING;
    427428                        }
    428429                        else {
    429                                 direction = 0;
     430                                direction = TRACE_DIR_OUTGOING;
    430431                        }
    431432                        break;
Note: See TracChangeset for help on using the changeset viewer.