WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Broken libpcap-dev  (Read 3769 times)

Offline Pitel

  • Newbie
  • *
  • Posts: 3
    • Pitlova FITwiki
Broken libpcap-dev
« on: February 19, 2011, 11:17:16 AM »
First some intro: I've a school project -- write software implementation of network switch using libpcap and libnet. Since I have to get some testing environment witch multiple network cards, I chose VirtualBox and TCL to keep it as minimal as possible. So I installed development metapackage, and aslo libpcap-dev and libnet-dev.

But when I try to build testing application from libpcap tutorial, it doesn't work. It ends up with lots of undefined reference to... messages. Sure I'm building it with -lpcap parameter to gcc.



So, I guess libpcap is somehow broken in TCL, because the sniffex app works in Ubuntu.

There seems to be similar bugs in Arch and Gentoo, both fixed.

Offline Pitel

  • Newbie
  • *
  • Posts: 3
    • Pitlova FITwiki
Re: Broken libpcap-dev
« Reply #1 on: February 19, 2011, 11:28:48 AM »
Oh, building also with -lnl works!

But... must it be necessary?

And anyway, using function pcap_findalldevs() doesn't work, also ending with undefined reference to error. And this function should be in libpcap 1.1.1, which is also in Ubuntu and it works here.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: Broken libpcap-dev
« Reply #2 on: February 19, 2011, 12:47:39 PM »
Oh, building also with -lnl works!

But... must it be necessary?

And anyway, using function pcap_findalldevs() doesn't work, also ending with undefined reference to error. And this function should be in libpcap 1.1.1, which is also in Ubuntu and it works here.
libpcap depends on libnl

libpcap is not a dependency of libpcap-dev. try installing libpcap as well if it not already installed.
libpcap should be added to the dep file of libpcap-dev.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline Pitel

  • Newbie
  • *
  • Posts: 3
    • Pitlova FITwiki
Re: Broken libpcap-dev
« Reply #3 on: February 19, 2011, 02:09:13 PM »
libpcap is not a dependency of libpcap-dev. try installing libpcap as well if it not already installed.
libpcap should be added to the dep file of libpcap-dev.

Oh, that's true. I had to be blind to not notice that. My project builds now. And I agree there should be dependency.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Broken libpcap-dev
« Reply #4 on: February 19, 2011, 07:36:20 PM »
libpcap.tcz added to libpcap-dev.tcz.dep.