tcpdump mailing list archives

Re: libpcap and struct canusb_t, src: failure on debian/ubuntu


From: Michael Richardson <mcr () sandelman ca>
Date: Mon, 03 Sep 2012 17:35:47 -0400


"Jakub" == Jakub Zawadzki <darkjames-ws () darkjames pl> writes:
    Jakub> On Mon, Sep 03, 2012 at 02:34:02PM -0400, Michael Richardson
    Jakub> wrote:
    >> The changes introduced in June to deal with "canopy" being picked
    >> up by CANusb interface, introduced a problem:
    >> 
    >> ./pcap-canusb-linux.c:260:20: error: 'struct canusb_t' has no
    >> member named 'src' make: *** [pcap-canusb-linux.o] Error 1

    canusb_t-> src was removed in
    canusb_t-> 2426611584e9099af5f98d18ef37337df9bef025.

    >> I'm not sure what libraries pcap-canusb-linux.c is expecting.
    >> Perhaps we need to have ./configure notice that the libusb-dev is
    >> the wrong one and not configure CANUSB?

    Jakub> Maybe no special libraries required, we just need to restore
    Jakub> canusb_t->src, or variant of it, attaching sample patch.

okay, so as I understand it, basically you have keeping the name that
was in the library in a structure in libcap.

After going that, I get:

gcc -O2 -fpic -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -g -O2 -c ./pcap-canusb-linux.c
gcc -O2 -fpic -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -g -O2 -c ./fad-getad.c
gcc -O2 -fpic -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -g -O2 -c ./pcap.c
In file included from ./pcap.c:101:0:
./pcap-canusb-linux.h:36:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./pcap.c:316:4: error: 'canusb_findalldevs' undeclared here (not in a function)
make: *** [pcap.o] Error 1

looks like a ( is missing from pcap-canusb-linux.h.

https://github.com/mcr/libpcap/commit/5b773e2c159d08464c881817fdcee448a6cec5a5

looks like all the tests now fail with:

reading from file spb.pcap, link-type EN10MB (Ethernet)
tcpdump: direction is not supported on savefiles

so, somebody committed something and didn't run the test cases.
I'll investigate more this week.

-- 
]       He who is tired of Weird Al is tired of life!           |  firewalls  [
]   Michael Richardson, Sandelman Software Works, Ottawa, ON    |net architect[
] mcr () sandelman ottawa on ca http://www.sandelman.ottawa.on.ca/ |device driver[
   Kyoto Plus: watch the video <http://www.youtube.com/watch?v=kzx1ycLXQSE>
                       then sign the petition. 
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: