Changeset 2f062d8


Ignore:
Timestamp:
04/23/10 14:13:14 (11 years ago)
Author:
Perry Lorier <perry@…>
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:
d6cd078
Parents:
1f0fd98
Message:

Be more similar in declaring a packet to be tcp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/test-decode.c

    r65c178a r2f062d8  
    115115        packet=trace_create_packet();
    116116        for (;;) {
     117                uint8_t proto;
     118                bool lt_tcp;
     119                bool bpf_tcp;
    117120                if ((psize = trace_read_packet(trace, packet)) <0) {
    118121                        error = 1;
     
    125128                }
    126129
    127                 if ((trace_get_tcp(packet)!=NULL) ^ (trace_apply_filter(filter_tcp,packet)>0)) {
     130                lt_tcp = trace_get_transport(packet,&proto,NULL) && proto == 6;
     131                bpf_tcp = trace_apply_filter(filter_tcp,packet)>0;
     132
     133                if (lt_tcp != bpf_tcp) {
    128134                        error=1;
    129135                        printf("tcp problem\n");
Note: See TracChangeset for help on using the changeset viewer.