Custom Query (89 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (67 - 69 of 89)

Ticket Resolution Summary Owner Reporter
#306 fixed avoid needlessly linking libraries that are not used to libtrace and tools perry matt@…
Description

libtrace and related tools are needlessly linking against libraries that they do not use. This causes unnecessary dependencies to be generated in the Debian packages.

Please stop linking against libraries that you don't use any symbols from to avoid dependency bloat in the Debian packages.

dpkg-shlibdeps: warning: dependency on libdl.so.2 could be avoided if "debian/libtrace3/usr/lib/libtrace.so.3.0.10" were not uselessly linked against it (they use none of its symbols).

dpkg-shlibdeps: warning: dependency on libgcc_s.so.1 could be avoided if "debian/libtrace3/usr/lib/libtrace.so.3.0.10" were not uselessly linked against it (they use none of its symbols).

dpkg-shlibdeps: warning: dependency on libstdc++.so.6 could be avoided if "debian/libtrace3/usr/lib/libtrace.so.3.0.10" were not uselessly linked against it (they use none of its symbols).

dpkg-shlibdeps: warning: dependency on libncurses.so.5 could be avoided if "debian/libtrace3/usr/lib/libtrace.so.3.0.10" were not uselessly linked against it (they use none of its symbols).

dpkg-shlibdeps: warning: dependency on libdl.so.2 could be avoided if "debian/libtrace-tools/usr/bin/tracemerge debian/libtrace-tools/usr/bin/traceanon debian/libtrace-tools/usr/bin/tracestats debian/libtrace-tools/usr/bin/tracediff debian/libtrace-tools/usr/bin/tracesplit_dir debian/libtrace-tools/usr/bin/tracepktdump debian/libtrace-tools/usr/bin/tracetop debian/libtrace-tools/usr/bin/tracertstats debian/libtrace-tools/usr/bin/tracesplit debian/libtrace-tools/usr/bin/tracereport debian/libtrace-tools/usr/bin/tracereplay" were not uselessly linked against it (they use none of its symbols).

dpkg-shlibdeps: warning: dependency on libz.so.1 could be avoided if "debian/libtrace-tools/usr/bin/tracemerge debian/libtrace-tools/usr/bin/traceanon debian/libtrace-tools/usr/bin/tracestats debian/libtrace-tools/usr/bin/tracediff debian/libtrace-tools/usr/bin/tracesplit_dir debian/libtrace-tools/usr/bin/tracepktdump debian/libtrace-tools/usr/bin/tracetop debian/libtrace-tools/usr/bin/tracertstats debian/libtrace-tools/usr/bin/tracesplit debian/libtrace-tools/usr/bin/tracereport debian/libtrace-tools/usr/bin/tracereplay" were not uselessly linked against it (they use none of its symbols).

dpkg-shlibdeps: warning: dependency on libbz2.so.1.0 could be avoided if "debian/libtrace-tools/usr/bin/tracemerge debian/libtrace-tools/usr/bin/traceanon debian/libtrace-tools/usr/bin/tracestats debian/libtrace-tools/usr/bin/tracediff debian/libtrace-tools/usr/bin/tracesplit_dir debian/libtrace-tools/usr/bin/tracepktdump debian/libtrace-tools/usr/bin/tracetop debian/libtrace-tools/usr/bin/tracertstats debian/libtrace-tools/usr/bin/tracesplit debian/libtrace-tools/usr/bin/tracereport debian/libtrace-tools/usr/bin/tracereplay" were not uselessly linked against it (they use none of its symbols).

#395 fixed Support for pcap-ng / pcap nanosecond resolution rjs51 mbligh@…
Description

Ugh. This thing doesn't seem to support attachement. There's no email address I can see.

diff --git a/trace/libtrace-3.0.18/lib/format_pcapfile.c b/trace/libtrace-3.0.18/lib/format_pcapfile.c index 2ef6417..71d6aff 100644 --- a/trace/libtrace-3.0.18/lib/format_pcapfile.c +++ b/trace/libtrace-3.0.18/lib/format_pcapfile.c @@ -71,6 +71,23 @@ typedef struct pcapfile_header_t {

uint32_t network; /* data link type */

} pcapfile_header_t;

+#define MAGIC1 0xa1b2c3d4 Original +#define MAGIC2 0xa1b23c4d Newer nanosecond format + +static inline int header_is_backwards_magic(pcapfile_header_t *header) {

+ return (header->magic_number == byteswap32(MAGIC1)
header->magic_number == byteswap32(MAGIC2));

+} + +static inline int header_is_magic(pcapfile_header_t *header) {

+ return (header->magic_number == MAGIC1
header->magic_number == MAGIC2

+ header_is_backwards_magic(header)); +} + +static inline int trace_in_nanoseconds(pcapfile_header_t *header) { + Sadly, nothing seems to use sigfigs. Sigh.

+ return (header->magic_number == MAGIC2
header->magic_number == byteswap32(MAGIC2));

+} +

struct pcapfile_format_data_t {

struct {

/* Indicates whether the event API should replicate the pauses

@@ -98,18 +115,20 @@ static int pcapfile_probe_magic(io_t *io)

pcapfile_header_t header; int len; len = wandio_peek(io, &header, sizeof(header));

+

/* Is this long enough? */ if (len < (int)sizeof(header)) {

return 0;

} /* Pcap magic? */

if (header.magic_number == 0xa1b2c3d4
header.magic_number == 0xd4c3b2a1) {

+ if (header_is_magic(&header)) {

return 1;

} /* Nope, not pcap */ return 0;

}

+

static int pcapfile_init_input(libtrace_t *libtrace) {

libtrace->format_data = malloc(sizeof(struct pcapfile_format_data_t));

@@ -145,7 +164,7 @@ static inline uint16_t swaps(libtrace_t *libtrace, uint16_t num)

return num;

/* We can use the PCAP magic number to determine the byte order */

  • if (DATA(libtrace)->header.magic_number == 0xd4c3b2a1)

+ if (header_is_backwards_magic(&(DATA(libtrace)->header)))

return byteswap16(num);

return num;

@@ -160,7 +179,7 @@ static inline uint32_t swapl(libtrace_t *libtrace, uint32_t num)

return num;

/* We can use the PCAP magic number to determine the byte order */

  • if (DATA(libtrace)->header.magic_number == 0xd4c3b2a1)

+ if (header_is_backwards_magic(&(DATA(libtrace)->header)))

return byteswap32(num);

return num;

@@ -196,10 +215,10 @@ static int pcapfile_start_input(libtrace_t *libtrace)

return -1;

}

  • if (swapl(libtrace,DATA(libtrace)->header.magic_number) !=
  • 0xa1b2c3d4) {

+ if (!header_is_magic(&(DATA(libtrace)->header))) {

trace_set_err(libtrace,TRACE_ERR_INIT_FAILED,

"Not a pcap tracefile (magic=%08x)\n",swapl(libtrace,DATA(libtrace)->header.magic_number));

+ fprintf(stderr, "Not a pcap tracefile (magic=%08x)\n",swapl(libtrace,DATA(libtrace)->header.magic_number));

return -1; /* Not a pcap file */

}

@@ -593,7 +612,28 @@ static struct timeval pcapfile_get_timeval(

hdr = (libtrace_pcapfile_pkt_hdr_t*)packet->header; ts.tv_sec = swapl(packet->trace,hdr->ts_sec);

  • ts.tv_usec = swapl(packet->trace,hdr->ts_usec);

+ if (trace_in_nanoseconds(packet->header)) + ts.tv_usec = swapl(packet->trace, hdr->ts_usec) / 1000; + else + ts.tv_usec = swapl(packet->trace,hdr->ts_usec); + return ts; +} + +static struct timespec pcapfile_get_timespec( + const libtrace_packet_t *packet) +{ + libtrace_pcapfile_pkt_hdr_t *hdr; + pcapfile_header_t *header = &(DATA(packet->trace)->header); + struct timespec ts; + + assert(packet->header); + + hdr = (libtrace_pcapfile_pkt_hdr_t*)packet->header; + ts.tv_sec = swapl(packet->trace,hdr->ts_sec); + if (trace_in_nanoseconds(header)) + ts.tv_nsec = swapl(packet->trace, hdr->ts_usec); + else + ts.tv_nsec = swapl(packet->trace, hdr->ts_usec) * 1000;

return ts;

}

@@ -715,7 +755,7 @@ static struct libtrace_format_t pcapfile = {

NULL, /* set_direction */ NULL, /* get_erf_timestamp */ pcapfile_get_timeval, /* get_timeval */

  • NULL, /* get_timespec */

+ pcapfile_get_timespec, /* get_timespec */

NULL, /* get_seconds */ NULL, /* seek_erf */ NULL, /* seek_timeval */

#276 fixed rijndael.c makes gcc 4.4 very sad salcock salcock
Description

We do a crapload of nasty-looking casting in rijndael.c between uint8_t * and uint32_t *.

This tends to make new gcc's strict-aliasing warning go nuts, but actually fixing this is going to be more than a little tricky. Not just in terms of replacing the casts, but doing so in a way that won't actually break the code.

For example, it's not enough to do most of the casts once at the start of the function, because the pointer that they were cast from often gets incremented during the function. As a result, you need to redo the cast.

For now, I've disabled that warning for the traceanon tool. This is far from ideal, but hopefully this is just a case of gcc being whiny. At some point, though, the casting should be fixed and the warning re-instated.

Note: See TracQuery for help on using queries.