Forum: GNU Radio

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
2253f229de2a90490d242cd781878d37?d=identicon&s=25 Jay Prakash (Guest)
on 2013-05-30 18:28
(Received via mailing list)

I was going through 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.O_RDWR)
    ifs = ioctl(tun, TUNSETIFF, struct.pack("16sH", "gr%d", mode))
    ifname = ifs[:16].strip("\x00")
    return (tun, ifname)


Jay Prakash
This topic is locked and can not be replied to.