What is the IPv6 equivalent for SIOCADDRT?

Can SIOCADDRT be used to add IPv6 routes? If not, then what is equivalent for ioctl ()?

+3
source share
3 answers

I do not know but

# strace ip route add <ipv6-route>

must tell you.

+2
source

Yes, you can use SIOCADDRT. Just create an AF_INET6 socket for it. For example, look at the implementation of Busybox " route ". Also consider using Netlink, possibly through libnl .

Sorry for the late answer, I searched for it myself and found that the accepted answer is a bit lacking.

+3
source

, , .

-1

All Articles