Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What package do i need to install for using routing sockets?

i am trying code given in Unix Network Programming by Richard Stevens. but i am not able to get the code to compile.

here is the source code. http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15213-f00/unpv12e/libroute/

i don't have the header file net/if_dl.h and the net/route.h header file does not include the constants and structures that the code uses.

like image 905
Rohit Banga Avatar asked Oct 05 '09 15:10

Rohit Banga


2 Answers

Please note, you DO NOT need to make in that folder "libroute"

See the Document:

cd ../libroute # only if your system supports 4.4BSD style routing sockets
make           # only if your system supports 4.4BSD style routing sockets

cd ../libxti   # only if your system supports XTI
make           # only if your system supports XTI

Linux is not BSD style routing, just go to ../intro and build examples~!

like image 128
Haoran Feng Avatar answered Oct 23 '22 21:10

Haoran Feng


That is a BSD-specific API, and linux doesn't support it. The equivalent functionality (not source-compatible) is provided by the netlink socket family. "man 7 netlink" should get you started, but you're likely going to need to do some porting work.

like image 5
Andy Ross Avatar answered Oct 23 '22 23:10

Andy Ross