linux/sock_diag.h for use with netlink sockets

Zubin Mithra zubin.mithra at gmail.com
Thu Aug 7 04:10:56 UTC 2014


Hello everyone,

I was trying out some netlink socket code and I needed to use the
header file "linux/sock_diag.h".

Doing a locate for the file gave me the following result(I do have
kernel headers installed and I'm on an Ubuntu machine).

$ locate linux/sock_diag.h
/usr/arm-linux-gnueabi/include/linux/sock_diag.h
/usr/src/linux-headers-3.8.0-29/include/linux/sock_diag.h
/usr/src/linux-headers-3.8.0-29/include/uapi/linux/sock_diag.h
/usr/src/linux-headers-3.8.0-29-generic/include/linux/sock_diag.h

Upon compiling my code I got the error stating :-
fatal error: linux/sock_diag.h: No such file or directory

As per instructions I found, I tried doing the following :-
sudo ln -sfn /usr/src/linux-headers-3.8.0-29-generic /usr/src/linux

However, the error seems to persist. Is there something obvious that
I'm missing/doing wrong? An alternative would be to move the
macros/structures in sock_diag.h to the codebase but I don't think
thats a good idea.


Thanks,
-- zm




More information about the Strace-devel mailing list