Custom Query (89 matches)


Show under each result:

Results (43 - 45 of 89)

Ticket Resolution Summary Owner Reporter
#261 fixed Problems with Abilene 1 data perry singhal@…

Hi I understand that Abilene 1 data is legacy Packet over Sonet format. However when I try to view it using tracedump I get unknown protocol for all packets. Do I need any special libraries to be able to read Abilene 1 data ? Thanks Harsh

#263 fixed trace_get_layer2() doesn't always return layer2 perry smr26

trace_get_layer2() will return the previous metadata header if a layer2 header isn't found. This seems non-obvious and caused me some grief, although admittedly I wasn't checking the returned linktype. Madwifi monitor mode will pass through packets with only a Radiotap header and no payload, presumably when none of the frame could be decoded. Maybe get_layer2() should return NULL in this case.

#264 fixed timestamp conversion problem perry yuri@…

In function

uint64_t trace_get_erf_timestamp(const libtrace_packet_t *packet) {

I have these lines:

} else if (packet->trace->format->get_timeval) {

/* timeval -> timestamp */ ts = packet->trace->format->get_timeval(packet); timestamp = ((((uint64_t)ts.tv_sec) << 32) + \

(((uint64_t)ts.tv_usec * UINT_MAX)/1000000));

and these lines do not work. After the pre-processor they expand into:

timestamp = ((((uint64_t)ts.tv_sec) << 32) + (((uint64_t)ts.tv_usec *

(2147483647 * 2U + 1U))/1000000));

And the expression (2147483647 * 2U + 1U) evaluates into a signed integer -1 which produces wrong results:

(gdb) p ts

$89 = {tv_sec = 1159894600, tv_usec = 846404}

(gdb) p timestamp

$94 = 4981727820551075308

I'm using glibc-headers-2.7-2, gcc-4.1.2-33, kernel, libtrace-3.0.4.

I think this is pretty serious. I'm not sure why UINT_MAX gets expanded into a signed constant, which is probably a bug in itself, but using this constant here seems wrong anyway, because we know exactly how many bits we have. Besides, 1000000us should be equal to 1s, so I suggest changing this conversion to:

timestamp = ((((uint64_t)ts.tv_sec) << 32) + \

(((uint64_t)ts.tv_usec << 32) /1000000));

Note: See TracQuery for help on using queries.