netlink
netlink copied to clipboard
What will be the equivalent command of: ip tuntap add tap0 mode tap?
I am trying to configure a tap device on my host. I am compelled to use Golang for it. How can I run a new tap device?
If I were using command line, I would run this:
ip tuntap add tap0 mode tap
device := &netlink.Tuntap{
Mode: netlink.TUNTAP_MODE_TAP,
LinkAttrs: netlink.LinkAttrs{
Name: 'deviceName',
},
}
sudo required