Tunnel.py

Hi!,

I was going through tunnel.py code.

can some one explain the function and particularly the
tune_device_filename significance?
///////////////////////////////////////
def open_tun_interface(tun_device_filename):
from fcntl import ioctl

mode = IFF_TAP | IFF_NO_PI
TUNSETIFF = 0x400454ca

tun = os.open(tun_device_filename, os.O_RDWR)
ifs = ioctl(tun, TUNSETIFF, struct.pack("16sH", "gr%d", mode))
ifname = ifs[:16].strip("\x00")
return (tun, ifname)

////////////////////////////////////////////

Jay Prakash