IPv6 kernel api to find the device name from the IPv6 address
I am writing a kernel module to send IPv6 packets.
I would like to get the corresponding device name of an interface from a IPv6 address. In other words I am looking for a function like ip_dev_find() which is used in IPv4 to get device name from IPv4 address.
My intension is to populate the skb->dev element of the sk_buff structure.
so it should be like this:
skb->dev = function(in6_addr sourceaddress);
Please assist me on this regard. I will appreciate if anyone will provide the code snippet of a IPv6 module to send the packet.