diff options
author | brian <brian@FreeBSD.org> | 2000-01-21 00:31:43 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-01-21 00:31:43 +0000 |
commit | b5a9af645e9609d1aa46a41309b617b059bcf66e (patch) | |
tree | e2ef255db8613dc41071c0fc3e28fd30ed7c8637 /sys/net | |
parent | ac7818da203e78d3ce5712161676189545230d9b (diff) | |
download | FreeBSD-src-b5a9af645e9609d1aa46a41309b617b059bcf66e.zip FreeBSD-src-b5a9af645e9609d1aa46a41309b617b059bcf66e.tar.gz |
Add a new TUNSIFPID ioctl to update the tun_pid (recorded in
tunopen) with the current pid.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_tun.c | 3 | ||||
-rw-r--r-- | sys/net/if_tun.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index ff60749..7ad4d59 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -461,6 +461,9 @@ tunioctl(dev, cmd, data, flag, p) return(EINVAL); } break; + case TUNSIFPID: + tp->tun_pid = curproc->p_pid; + break; case FIONBIO: break; case FIOASYNC: diff --git a/sys/net/if_tun.h b/sys/net/if_tun.h index 999372b..273bb30e 100644 --- a/sys/net/if_tun.h +++ b/sys/net/if_tun.h @@ -41,5 +41,6 @@ struct tuninfo { #define TUNGIFINFO _IOR('t', 92, struct tuninfo) #define TUNSLMODE _IOW('t', 93, int) #define TUNSIFMODE _IOW('t', 94, int) +#define TUNSIFPID _IO('t', 95) #endif /* !_NET_IF_TUN_H_ */ |