Changeset f0c639b for test/test-wireless.c
- Timestamp:
- 03/26/07 11:47:31 (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:
- 38f9537
- Parents:
- be22b51
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/test-wireless.c
rd5a27e8 rf0c639b 65 65 uint64_t tsft; 66 66 uint16_t freq, tmp16; 67 uint32_t fcs;68 67 uint8_t flags, rate, sdbm, ndbm, sdb, antenna, tmp8; 69 68 70 uint32_t total_fcs, expected_fcs = 3012874435;71 69 uint16_t total_freq, expected_freq = 24170; 72 70 … … 98 96 assert(trace_get_wireless_signal_strength_db(l,lt,&sdb)); 99 97 assert(trace_get_wireless_antenna(l,lt,&antenna)); 100 assert(trace_get_wireless_fcs(l,lt,&fcs));101 98 102 99 /* Check that the fields that do not exist in this trace are … … 111 108 * TODO: Check all fields :) 112 109 */ 113 total_fcs = fcs;114 110 total_freq = freq; 115 111 116 112 while((result = trace_read_packet(trace, packet)) > 0) { 117 if(trace_get_wireless_fcs(l,lt,&fcs)) 118 total_fcs += fcs; 113 /* This trace has no FCS at the end of packets, so ensure 114 * that wire-length is 4 bytes greater than capture length */ 115 int caplen = trace_get_capture_length(packet); 116 int wirelen = trace_get_wire_length(packet); 117 assert(wirelen == caplen + 4); 119 118 if(trace_get_wireless_freq(l,lt,&freq)) 120 119 total_freq += freq; 121 120 } 122 121 123 assert(total_fcs == expected_fcs);124 122 assert(total_freq == expected_freq); 125 123 … … 146 144 assert(!trace_get_wireless_signal_strength_db(l,lt,&sdb)); 147 145 assert(!trace_get_wireless_antenna(l,lt,&antenna)); 148 assert(!trace_get_wireless_fcs(l,lt,&fcs));149 146 assert(!trace_get_wireless_noise_strength_db(l,lt,&tmp8)); 150 147 assert(!trace_get_wireless_tx_attenuation(l,lt,&tmp16));
Note: See TracChangeset
for help on using the changeset viewer.