Changeset c792590 for examples/protocol
- Timestamp:
- 06/22/04 17:22:54 (17 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:
- c681e86
- Parents:
- dadc609
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/protocol/protocol.c
r52e95c7 rc792590 15 15 16 16 char *hostname = "rtclient:chasm.cs.waikato.ac.nz"; 17 char *filterstring = 0; 17 18 struct libtrace_ip *ipptr = 0; 18 19 … … 22 23 hostname = argv[1]; 23 24 } 25 if (argc == 3) { 26 hostname = argv[1]; 27 filterstring = argv[2]; 28 } 24 29 25 30 // create an rtclient to hostname, on the default port 26 31 trace = create_trace(hostname); 32 if (filterstring) { 33 libtrace_bpf_setfilter(trace,filterstring); 34 } 27 35 28 36 for (;;) { … … 31 39 break; 32 40 } 41 if (!libtrace_bpf_filter(trace, buffer, 4096)) { 42 continue; 43 } 33 44 ipptr = get_ip(trace,buffer,4096); 34 45 if (ipptr) {
Note: See TracChangeset
for help on using the changeset viewer.