Changeset 82dc7d8
- Timestamp:
- 02/23/06 13:51:28 (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:
- 208f694
- Parents:
- 8ea5b38
- Location:
- test
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
test/Makefile
r1b4901a r82dc7d8 10 10 11 11 BINS = test1 test2 test-pcap test-pcap-bpf test-erf-write test-erf-to-pcap \ 12 test-pcap-to-erf test-wtf 12 test-pcap-to-erf test-wtf test-rtclient test-event 13 13 .PHONY: all clean distclean install depend test 14 14 -
test/test-erf-to-pcap.c
r1b4901a r82dc7d8 77 77 trace_start_output(outtrace); 78 78 79 packet=trace_create_packet(); 79 80 for (;;) { 80 packet=trace_create_packet();81 81 if ((psize = trace_read_packet(trace, packet)) <0) { 82 82 error = 1; … … 89 89 count ++; 90 90 trace_write_packet(outtrace,packet); 91 trace_destroy_packet(&packet);92 91 } 92 trace_destroy_packet(&packet); 93 93 if (error == 0) { 94 94 if (count == 100) { -
test/test-erf-write.c
r1b4901a r82dc7d8 77 77 trace_start_output(outtrace); 78 78 79 packet=trace_create_packet(); 79 80 for (;;) { 80 packet=trace_create_packet();81 81 if ((psize = trace_read_packet(trace, packet)) <0) { 82 82 error = 1; … … 89 89 count ++; 90 90 trace_write_packet(outtrace,packet); 91 trace_destroy_packet(&packet);92 91 } 92 trace_destroy_packet(&packet); 93 93 if (error == 0) { 94 94 if (count == 100) { -
test/test-pcap-to-erf.c
r1b4901a r82dc7d8 77 77 trace_start_output(outtrace); 78 78 79 packet=trace_create_packet(); 79 80 for (;;) { 80 packet=trace_create_packet();81 81 if ((psize = trace_read_packet(trace, packet)) <0) { 82 82 error = 1; … … 89 89 count ++; 90 90 trace_write_packet(outtrace,packet); 91 trace_destroy_packet(&packet);92 91 } 92 trace_destroy_packet(&packet); 93 93 if (error == 0) { 94 94 if (count == 100) { -
test/test-wtf.c
r1b4901a r82dc7d8 49 49 #include "libtrace.h" 50 50 51 struct libtrace_t *trace;52 51 53 52 int main(int argc, char *argv[]) { … … 56 55 int error = 0; 57 56 int count = 0; 58 struct libtrace_packet_t *packet; 57 int level = 0; 58 libtrace_t *trace; 59 libtrace_out_t *outtrace; 60 libtrace_packet_t *packet; 59 61 60 62 trace = trace_create(uri); 61 63 if (!trace) { 62 printf("ERROR: %s\n",trace_err.problem); 64 printf("Error: %s\n",trace_err.problem); 65 return 1; 66 } 67 outtrace = trace_create_output("wtf:traces/wed.out.wtf"); 68 if (!outtrace) { 69 printf("Error: %s\n",trace_err.problem); 63 70 return 1; 64 71 } 65 72 66 if (trace_start(trace)==-1) { 67 printf("ERROR: %s\n",trace_err.problem); 68 return 1; 69 } 73 level=0; 74 trace_config_output(outtrace,TRACE_OPTION_OUTPUT_COMPRESS,&level); 75 76 trace_start(trace); 77 trace_start_output(outtrace); 70 78 71 packet =trace_create_packet();79 packet=trace_create_packet(); 72 80 for (;;) { 73 81 if ((psize = trace_read_packet(trace, packet)) <0) { … … 80 88 } 81 89 count ++; 90 trace_write_packet(outtrace,packet); 82 91 } 83 92 trace_destroy_packet(&packet); … … 93 102 } 94 103 trace_destroy(trace); 104 trace_destroy_output(outtrace); 95 105 return error; 96 106 } -
test/test2.c
r5b91b48 r82dc7d8 62 62 trace_start(trace); 63 63 64 packet=trace_create_packet(); 64 65 for (;;) { 65 packet=trace_create_packet();66 66 if ((psize = trace_read_packet(trace, packet)) <0) { 67 67 error = 1; … … 73 73 } 74 74 count ++; 75 trace_destroy_packet(&packet);76 75 } 76 trace_destroy_packet(&packet); 77 77 if (error == 0) { 78 78 if (count == 100) {
Note: See TracChangeset
for help on using the changeset viewer.