libpcap0.8-dev does not include pcap-int.h

Bug #397595 reported by Mike Hicks
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libpcap (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: libpcap0.8-dev

I am attempting to compile a tool called Tomahawk, which allows replaying of pcap-formatted traffic dumps. Tomahawk is available at http://www.tomahawktesttool.org/ or http://tomahawk.sourceforge.net/

Tomahawk requires libnet (I used the libnet1 and libnet1-dev Ubuntu packages) and libpcap (I used libpcap0.8 and libpcap0.8-dev).

I modified the Makefile to point at the correct locations, but my attempt to build tomahawk failed when gcc couldn't find pcap-int.h. I downloaded the libpcap 1.0.0 source from http://www.tcpdump.org/ and got the file from there.

Please include pcap-int.h in this package, and check for other missing include headers.

Thanks.

--------

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii libnet1 1.1.2.1-4 library for the construction and handling of
ii libnet1-dev 1.1.2.1-4 development files for libnet
ii libpcap0.8 1.0.0-1 system interface for user-level packet captu
ii libpcap0.8-dev 1.0.0-1 development library and header files for lib

Revision history for this message
Mike Hicks (hick0088) wrote :

*sigh*

Okay, pcap-int.h turned out to be an unneccessary include. Removing the offending '#include "pcap.h"' from the "tomahawk.c" file on my system didn't adversely affect anything -- the program compiled just the same.

Further investigation reveals that pcap-int.h is apparently for internal data structures in the pcap library which shouldn't be exposed.

This bug can be closed.

Revision history for this message
Mokon (david-bond) wrote :

Could you explain this more? I am in a similar situation, however pcap-int.h defines the struct pcap. If I do not include pcap-int.h I get an error dereferencing pointer to incomplete type.

Revision history for this message
Mike Hicks (hick0088) wrote :

Programs using libpcap should avoid directly using things defined in pcap-int.h. It would be better if you can use the functions and data structures declared in the other headers which do get included in the libpcap dev package.

You may really want to be using "pcap_t" instead of "struct pcap".

Evan Huus (eapache)
Changed in libpcap (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.