2003-01-06 08:11:10

by madanagopal

[permalink] [raw]
Subject: doubt in netlink sockets

Please CC the answers/comments in response to this posting to me.

I read about netlink sockets from the URL :
http://qos.ittc.ukans.edu/netlink/html/node16.html

I also tried the sample program given there to add a new route to the
routing table but it is not working(ie the program is compiling properly but
output is not coming). I tried to see the output by executing the
route -n
command to see whether the new route is being added but nothing got
added. I also downloaded iproute2 code and compared the given code in
the website with iproute2 code but found no differences. I am attaching
that file. Please execute and see whether it is
working. If it is not working please tell me what changes should be made.


Attachments:
routeadd.c (5.06 kB)

2004-01-08 23:32:03

by Prasanna Meda

[permalink] [raw]
Subject: Re: doubt in netlink sockets


In reference to
http://www.ussg.iu.edu/hypermail/linux/kernel/0301.0/1341.html
http://qos.ittc.ukans.edu/netlink/html/netlink.html

You did not set the needed rtm_dst_len field. See the section 3.1.1
in http://www.faqs.org/rfcs/rfc3549.html

Thanks,
Prasanna.