Changeset 38f9537
- Timestamp:
- 03/26/07 13:58:27 (14 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:
- acb0d01
- Parents:
- f0c639b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/test-decode.c
rd5a27e8 r38f9537 92 92 libtrace_packet_t *packet; 93 93 libtrace_filter_t *filter_tcp = trace_create_filter("tcp"); 94 libtrace_filter_t *filter_udp = trace_create_filter("udp"); 94 libtrace_filter_t *filter_udp = 95 trace_create_filter("udp and ip[6:2] & 0x1fff = 0"); 95 96 libtrace_filter_t *filter_icmp = trace_create_filter("icmp"); 96 97 … … 143 144 error=1; 144 145 printf("udp problem\n"); 146 if (trace_get_udp(packet)) { 147 printf(" libtrace thinks this is a udp packet\n"); 148 } 149 else { 150 printf(" libtrace doesn't think this is a udp packet\n"); 151 } 152 if (trace_apply_filter(filter_udp,packet)) { 153 printf(" bpf thinks this is a udp packet\n"); 154 } 155 else { 156 printf(" bpf doesn't think this is a udp packet\n"); 157 } 145 158 trace_dump_packet(packet); 146 159 break;
Note: See TracChangeset
for help on using the changeset viewer.