Hi,

it should be a linking problem. The header files in the netlink dir could
not find each other. If I manually set 
#include <libnl3/netlink/msg.h>
#include <libnl3/netlink/attr.h>
to the top of mac80211.c the current error
(/usr/include/libnl3/netlink/genl/genl.h:16:25: error: netlink/msg.h: No
such file or directory
/usr/include/libnl3/netlink/genl/genl.h:17:26: error: netlink/attr.h: No
such file or directory In file included from) is eliminated, but than other
files are missing.

Greetings

Markus

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im
Auftrag von Markus Amend
Gesendet: Donnerstag, 1. November 2012 09:55
An: [email protected]
Betreff: AW: [netsniff-ng] libnl3



-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im
Auftrag von Markus Amend
Gesendet: Montag, 29. Oktober 2012 16:43
An: [email protected]
Betreff: Re: [netsniff-ng] libnl3

Hi Daniel,

I will try it at thursday or at the weekend.

Mit freundlichen Grüßen

Markus Amend

Am 24.10.2012 um 21:41 schrieb Daniel Borkmann <[email protected]>:

> On Wed, Oct 24, 2012 at 9:28 PM, Markus Amend <[email protected]>
wrote:
>>> On Wed, Oct 24, 2012 at 3:46 PM, Markus Amend 
>>> <[email protected]>
wrote:
>>>> I have load
>>>> http://www.infradead.org/~tgr/libnl/files/libnl-3.2.14.tar.gz
>>>> extract it and give the following commands as root:
>>>> 
>>>> $ ./configure
>>>> $ make
>>>> $ make install
>>>> 
>>>> All works fine and netsniff-ng's cmake recognize the new libnl (I 
>>>> haven't delete the old libnl1). I've pulled the latest version of 
>>>> netsniff-ng from git and tried to compile, but get the following
errors:
>>> 
>>> I also still have libnl1 installed on my machine, but I removed 
>>> libnl1-dev headers. Maybe that causes the problem? Can you try to 
>>> purge the libnl1-dev (but not the libnl1 library itself)?
>> 
>> Ok, I have uninstalled libnl1-dev with the Ubuntu paketmanager, but 
>> it
doesn't help.
> 
> Ok, here are a few other possibilities:
> 
> * Remove and recreate the build dir, so that cmake has to create new 
> Makefiles
> * My include dir is located at /usr/include/libnl3/netlink/
> * My lib is located at /usr/lib/libnl-3.so resp. 
> /usr/lib/libnl-genl-3.so
> * In case yours is not, exec the configure script with --prefix=/usr/
> 
Hi, without "--prefix=/usr/" the path is  "usr/local/lib". I have change
this. Cmake find libnl3 in both cases (/usr/lib and /usr/local/lib, always
tried with cleaned netsniff-ng build dir). 
With files located in "/usr/lib" the new error during compilation:

[  3%] Building C object netsniff-ng/CMakeFiles/netsniff-ng.dir/__/hash.c.o
[  6%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/dissector.c.o
[  9%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/dissector_eth.c.o
[  9%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/dissector_80211.c.o
[ 12%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_arp.c.o
[ 16%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_ethernet.c.o
[ 16%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_icmpv4.c.o
[ 19%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_icmpv6.c.o
[ 22%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_igmp.c.o
[ 25%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_ip_authentication_hdr.c.o
[ 25%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_ip_esp.c.o
[ 29%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_ipv4.c.o
[ 32%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_ipv6.c.o
[ 32%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_ipv6_dest_opts.c.o
[ 35%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_ipv6_fragm.c.o
[ 38%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_ipv6_hop_by_hop.c.o
[ 41%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_ipv6_in_ipv4.c.o
[ 41%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_ipv6_mobility_hdr.c.o
[ 45%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_ipv6_no_nxt_hdr.c.o
[ 48%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_ipv6_routing.c.o
[ 48%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_none.c.o
[ 51%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_tcp.c.o
[ 54%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_udp.c.o
[ 58%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_vlan.c.o
[ 58%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_vlan_q_in_q.c.o
[ 61%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_mpls_unicast.c.o
[ 64%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_80211_mac_hdr.c.o
[ 67%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/xmalloc.c.o
[ 67%] Building C object netsniff-ng/CMakeFiles/netsniff-ng.dir/__/oui.c.o
[ 70%] Building C object netsniff-ng/CMakeFiles/netsniff-ng.dir/__/xio.c.o
[ 74%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/xutils.c.o
[ 74%] Building C object netsniff-ng/CMakeFiles/netsniff-ng.dir/__/bpf.c.o
[ 77%] Building C object
netsniff-ng/CMakeFiles/netsniff-ng.dir/__/mac80211.c.o
In file included from
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:20:
/usr/include/libnl3/netlink/genl/genl.h:15:29: error: netlink/netlink.h: No
such file or directory
/usr/include/libnl3/netlink/genl/genl.h:16:25: error: netlink/msg.h: No such
file or directory
/usr/include/libnl3/netlink/genl/genl.h:17:26: error: netlink/attr.h: No
such file or directory In file included from
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:20:
/usr/include/libnl3/netlink/genl/genl.h:27: error: expected declaration
specifiers or ‘...’ before ‘uint32_t’
/usr/include/libnl3/netlink/genl/genl.h:27: error: expected declaration
specifiers or ‘...’ before ‘uint32_t’
/usr/include/libnl3/netlink/genl/genl.h:28: error: expected declaration
specifiers or ‘...’ before ‘uint8_t’
/usr/include/libnl3/netlink/genl/genl.h:28: error: expected declaration
specifiers or ‘...’ before ‘uint8_t’
In file included from
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:21:
/usr/include/libnl3/netlink/genl/family.h:16:27: error: netlink/cache.h: No
such file or directory In file included from
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:21:
/usr/include/libnl3/netlink/genl/family.h:31: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or ‘__attribute__’ before ‘genl_family_get_version’
/usr/include/libnl3/netlink/genl/family.h:32: error: expected declaration
specifiers or ‘...’ before ‘uint8_t’
/usr/include/libnl3/netlink/genl/family.h:33: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or ‘__attribute__’ before ‘genl_family_get_hdrsize’
/usr/include/libnl3/netlink/genl/family.h:34: error: expected declaration
specifiers or ‘...’ before ‘uint32_t’
/usr/include/libnl3/netlink/genl/family.h:35: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or ‘__attribute__’ before ‘genl_family_get_maxattr’
/usr/include/libnl3/netlink/genl/family.h:36: error: expected declaration
specifiers or ‘...’ before ‘uint32_t’
/usr/include/libnl3/netlink/genl/family.h:39: error: expected declaration
specifiers or ‘...’ before ‘uint32_t’
In file included from
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:22:
/usr/include/libnl3/netlink/genl/ctrl.h:17:26: error: netlink/addr.h: No
such file or directory In file included from
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:23:
/usr/include/libnl3/netlink/msg.h:16:28: error: netlink/object.h: No such
file or directory In file included from
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:23:
/usr/include/libnl3/netlink/msg.h:82: error: expected declaration specifiers
or ‘...’ before ‘uint32_t’
/usr/include/libnl3/netlink/msg.h:82: error: expected declaration specifiers
or ‘...’ before ‘uint32_t’
In file included from
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:24:
/usr/include/libnl3/netlink/attr.h:18:26: error: netlink/data.h: No such
file or directory In file included from
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:24:
/usr/include/libnl3/netlink/attr.h:62: error: expected
specifier-qualifier-list before ‘uint16_t’
/usr/include/libnl3/netlink/attr.h:101: error: expected ‘=’, ‘,’, ‘;’, ‘asm’
or ‘__attribute__’ before ‘nla_get_u8’
/usr/include/libnl3/netlink/attr.h:102: error: expected declaration
specifiers or ‘...’ before ‘uint8_t’
/usr/include/libnl3/netlink/attr.h:103: error: expected ‘=’, ‘,’, ‘;’, ‘asm’
or ‘__attribute__’ before ‘nla_get_u16’
/usr/include/libnl3/netlink/attr.h:104: error: expected declaration
specifiers or ‘...’ before ‘uint16_t’
/usr/include/libnl3/netlink/attr.h:105: error: expected ‘=’, ‘,’, ‘;’, ‘asm’
or ‘__attribute__’ before ‘nla_get_u32’
/usr/include/libnl3/netlink/attr.h:106: error: expected declaration
specifiers or ‘...’ before ‘uint32_t’
/usr/include/libnl3/netlink/attr.h:107: error: expected ‘=’, ‘,’, ‘;’, ‘asm’
or ‘__attribute__’ before ‘nla_get_u64’
/usr/include/libnl3/netlink/attr.h:108: error: expected declaration
specifiers or ‘...’ before ‘uint64_t’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c: In function
‘nl80211_nl_socket_xalloc’:
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:70: error:
implicit declaration of function ‘nl_socket_alloc’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:70: warning:
initialization makes pointer from integer without a cast
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c: In function
‘nl80211_init’:
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:82: warning:
passing argument 1 of ‘genl_connect’ from incompatible pointer type
/usr/include/libnl3/netlink/genl/genl.h:23: note: expected ‘struct nl_sock
*’ but argument is of type ‘struct nl_sock *’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:86: warning:
passing argument 1 of ‘genl_ctrl_alloc_cache’ from incompatible pointer type
/usr/include/libnl3/netlink/genl/ctrl.h:25: note: expected ‘struct nl_sock
*’ but argument is of type ‘struct nl_sock *’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:86: warning:
passing argument 2 of ‘genl_ctrl_alloc_cache’ from incompatible pointer type
/usr/include/libnl3/netlink/genl/ctrl.h:25: note: expected ‘struct nl_cache
**’ but argument is of type ‘struct nl_cache **’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:89: error:
implicit declaration of function ‘nl_geterror’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:89: warning:
format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:91: warning:
passing argument 1 of ‘genl_ctrl_search_by_name’ from incompatible pointer
type
/usr/include/libnl3/netlink/genl/ctrl.h:28: note: expected ‘struct nl_cache
*’ but argument is of type ‘struct nl_cache *’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c: In function
‘nl80211_cleanup’:
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:100: error:
implicit declaration of function ‘nl_cache_free’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:101: error:
implicit declaration of function ‘nl_socket_free’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c: In function
‘nl80211_add_mon_if’:
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:115: warning:
passing argument 1 of ‘genlmsg_put’ from incompatible pointer type
/usr/include/libnl3/netlink/genl/genl.h:27: note: expected ‘struct nl_msg *’
but argument is of type ‘struct nl_msg *’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:115: error: too
many arguments to function ‘genlmsg_put’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:121: error:
implicit declaration of function ‘nl_send_auto_complete’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:131: error:
implicit declaration of function ‘nl_wait_for_ack’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c: In function
‘nl80211_del_mon_if’:
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:160: warning:
passing argument 1 of ‘genlmsg_put’ from incompatible pointer type
/usr/include/libnl3/netlink/genl/genl.h:27: note: expected ‘struct nl_msg *’
but argument is of type ‘struct nl_msg *’
/home/markus/Desktop/git_netsniff/netsniff-ng/src/mac80211.c:160: error: too
many arguments to function ‘genlmsg_put’
make[2]: *** [netsniff-ng/CMakeFiles/netsniff-ng.dir/__/mac80211.c.o] Error
1
make[1]: *** [netsniff-ng/CMakeFiles/netsniff-ng.dir/all] Error 2
make: *** [all] Error 2


-- 



-- 


Reply via email to