How to interface with the Linux tun driver

后端 未结 3 1809
攒了一身酷
攒了一身酷 2020-12-13 04:56

I\'m having a hard time figuring this problem out - I am trying to write a program that will interact with the Linux tunnel driver. At a very basic level, I simply want to c

3条回答
  •  感情败类
    2020-12-13 05:36

    Read /usr/src/linux/Documentation/networking/tuntap.rst.

    You are supposed to open the /dev/net/tun device. A subsequent ioctl on the open fd will create the tun0 (or whatever you wish to name it) network interface. Linux's network interfaces do not correspond to any /dev/* device.

提交回复
热议问题