why
why

Reputation: 24851

error: ‘LIBNET_ERR_FATAL’ with libnet

I write a demo with libnet, but get an error when call the function:

libnet_error(LIBNET_ERR_FATAL, "libnet_open_link_interface: %s\n", errbuf);

The error is "error: ‘LIBNET_ERR_FATAL’ undeclared (first use in this function)".

my gcc command is: "gcc demo.c libnet-config --defines --cflags --libs", and run on ubuntu.

I want to know who got the same error before ?

Upvotes: 1

Views: 1102

Answers (2)

smwikipedia
smwikipedia

Reputation: 64205

To complete the answer, the LIBNET_ERR_FATAL and the function libnet_error() and some other good old things are included in libnet-1.0.2a. You can still download a compilable source here: https://code.google.com/p/ips-builder/downloads/detail?name=libnet-1.0.2a.tar.gz&can=2&q=

As I tried, it can be compiled on Ubuntu 12.04 with gcc 4.6.3. Do remember to add sudo before running the make install. Otherwise, it will fail to create the user/include/libnet due to permission issue.

Upvotes: 0

why
why

Reputation: 24851

It's the version problem, LIBNET_ERR_FATAL have been removed in 1.1!

Upvotes: 1

Related Questions