Bind to a veth interface
Trying to bind my code to a veth interface . I need to create a RAW_SOCKET for this.
Creating my veth interface using
ip link add veth10 type veth peer veth10p
Can someone help me with the code for connecting to one end of the veth connection (i.e. veth10 in my example).
You need to get interface index first - under linux you can use struct ifreq and ioctl. I have written my own ARP request which is not actually what you need but you can observe the code to understand working with interfaces (name -> index)
Hope it helped a little