Add a new TUNSIFPID ioctl to update the tun_pid (recorded in

tunopen) with the current pid.
This commit is contained in:
Brian Somers 2000-01-21 00:31:43 +00:00
parent 341777d004
commit bbdecb957c
2 changed files with 4 additions and 0 deletions

View File

@ -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:

View File

@ -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_ */