git: if_tun: Add TUNGIFNAME ioctl to get the interface name

Aaron LI aly at crater.dragonflybsd.org
Tue Jul 31 05:26:46 PDT 2018


commit 0df03f127ea71fb9dbcedbdc065f211514feefdf
Author: Aaron LI <aly at aaronly.me>
Date:   Tue Jul 31 19:47:37 2018 +0800

    if_tun: Add TUNGIFNAME ioctl to get the interface name
    
    This ioctl helps to get the name of the network interface associated
    with the tun control device via its file descriptor.  One generally
    obtains such a file descriptor by opening the tun autocloner (i.e.,
    /dev/tun).  While the devname(3) or fdevname(3) functions can be used
    to determine the name of the actually created tun device, but there is
    no easy way to get the name of the associated network interface, which
    is though initially the same as the device name but can be renamed.
    
    Bump __DragonFly_version and update tun.4 man page.
    
    See also the relevant Linux patch that added TUNGETIFF to tun:
    https://lists.linuxfoundation.org/pipermail/virtualization/2008-August/011546.html

Summary of changes:
 share/man/man4/tun.4 | 10 +++++++++-
 sys/net/tun/if_tun.c |  6 ++++++
 sys/net/tun/if_tun.h |  5 ++++-
 sys/sys/param.h      |  3 ++-
 4 files changed, 21 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0df03f127ea71fb9dbcedbdc065f211514feefdf


-- 
DragonFly BSD source repository



More information about the Commits mailing list