Eric W. Biederman wrote: > etun is a simple two headed tunnel driver that at the link layer looks > like ethernet. It's target audience is communicating between network > namespaces but it is general enough it has other valid uses as well. > > Ben Greear implemented a similar device called redir-dev, for network > emulation. > > OpenVZ has a similar device that goes by the name veth. > > I didn't want to mess with ioctls or weird non-general network > interfaces for creating devices, so I used sysfs as my control > mechanism. > > To create a pair of devices called veth0 and veth1: > echo -n 'veth0,veth1' > /sys/module/etun/parameters/newif > > To destroy a pair of devices: > echo -n 'veth0' > /sys/module/etun/parameters/delif > Is there any way to tell for certain if an interface is a etun or not? Maybe a file could be found (or not) in sysfs somewhere? Also, how do you find the peer device from user-space? This would be very useful for anyone trying to manage these devices with a user-space program. When you are creating new devices, I think you should check to make sure there isn't already a device with that name. In general though, I look forward to this being in the kernel so I can drop my redirect device code from my out-of-tree patch. Thanks, Ben -- Ben Greear <greearb@xxxxxxxxxxxxxxx> Candela Technologies Inc http://www.candelatech.com _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers