views:

25

answers:

1

I need to do following tasks:

  • List the interfaces
  • Set/remove/list IPv6 address
  • Add/remove routing entries

AFAIK I cannot use ioctl I need to use netlink. The problem is that I couldn't find good description how to use it (most netlink tutorials concentrate on how to create connection). strace also didn't prove useful.

+1  A: 

I recommend you look at the sources of iproute2. It has all the functionality you describe and uses netlink.

schot
Hmm. I've tried it once and I hoped there is some documentation or description. It seems that I have no choice.
Maciej Piechotka