Thread: IpV6 interfaces, routes ... netlink?

  1. #1
    Registered User Maz's Avatar
    Join Date
    Nov 2005
    Location
    Finland
    Posts
    194

    IpV6 interfaces, routes ... netlink?

    Hi dee Ho peeps!

    Long time no see
    Simple question. Has anyone used netlink sockets via libnl? I should rewrite some old platform code which handles abstraction of some route configuations, interface up/down settings, alias interface configs etc for ipv4. The rewrite I am doing should enable same things for ipv6. I've browsed the web for quite a bit, and got the impression that preferred way for doing this is via netlink sockets. However I find netlink interface documenetation a bit hard o use.... Does anyone know if there's some examples, or some additioal ducumentation available?

  2. #2
    Registered User Maz's Avatar
    Join Date
    Nov 2005
    Location
    Finland
    Posts
    194
    Allright... Netlink interface itself is quite well documented. There's even an RFC describing the protocol quite well. My mistake was the attempt to use libnl... I believe libnl could be a great help, but I failed to find sufficient documentation... Eventually I used the netlink sockets without the libnl. Funny. Libnl was written to ease usage of netlink sockets - which admittably are errorprone interface. However I found it easier to use the netlink sockets than the libnl

    Anyways, my problem is solved

  3. #3
    Registered User Maz's Avatar
    Join Date
    Nov 2005
    Location
    Finland
    Posts
    194
    Allright... One thing to ask.

    Does anyone know if linux (2.6) really supports getting a route(s) matching given request attributes?

    I've tried using NLM_F_MATCH flag in RTM_GETROUTE request for AF_INET6 family, and specified the RTA_DST, RTA_SRC, RTA_GATEWAY, RTA_OIF and RTA_PRIORITY attributes. However I get multipart reply with ALL ipv6 routes included - regardless the match to specified attributes...

    So does anyone know if getting only routes matching given values is supported at all?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 05-07-2009, 11:31 AM
  2. geting ipv4 and ipv6 interfaces with ioclt
    By wwwnuwan in forum Networking/Device Communication
    Replies: 0
    Last Post: 04-21-2009, 12:38 AM
  3. pcap and ipv6
    By IsmAvatar2 in forum Networking/Device Communication
    Replies: 1
    Last Post: 06-10-2008, 10:25 AM
  4. Programming RIP2 with kernel routes table
    By jpablo in forum Linux Programming
    Replies: 1
    Last Post: 04-22-2006, 11:26 AM
  5. IPv6 multicast example code
    By Sang-drax in forum Networking/Device Communication
    Replies: 7
    Last Post: 07-25-2005, 09:26 AM