Home | History | Annotate | Line # | Download | only in net
if_tun.h revision 1.1
      1  1.1  deraadt /*
      2  1.1  deraadt  * Copyright (c) 1988, Julian Onions.
      3  1.1  deraadt  *
      4  1.1  deraadt  * This source may be freely distributed, however I would be interested
      5  1.1  deraadt  * in any changes that are made.
      6  1.1  deraadt  *
      7  1.1  deraadt  * from: $Header: if_tnreg.h,v 1.1.2.1 1992/07/16 22:39:16 friedl Exp
      8  1.1  deraadt  * $Id: if_tun.h,v 1.1 1993/11/14 20:07:23 deraadt Exp $
      9  1.1  deraadt  */
     10  1.1  deraadt 
     11  1.1  deraadt #ifndef _NET_IF_TUN_H_
     12  1.1  deraadt #define _NET_IF_TUN_H_
     13  1.1  deraadt 
     14  1.1  deraadt struct tun_softc {
     15  1.1  deraadt 	u_short	tun_flags;		/* misc flags */
     16  1.1  deraadt #define	TUN_OPEN	0x0001
     17  1.1  deraadt #define	TUN_INITED	0x0002
     18  1.1  deraadt #define	TUN_RCOLL	0x0004
     19  1.1  deraadt #define	TUN_IASET	0x0008
     20  1.1  deraadt #define	TUN_DSTADDR	0x0010
     21  1.1  deraadt #define	TUN_READY	0x0020
     22  1.1  deraadt #define	TUN_RWAIT	0x0040
     23  1.1  deraadt #define	TUN_ASYNC	0x0080
     24  1.1  deraadt #define	TUN_NBIO	0x0100
     25  1.1  deraadt 	struct	ifnet tun_if;		/* the interface */
     26  1.1  deraadt 	int	tun_pgrp;		/* the process group - if any */
     27  1.1  deraadt 	struct	selinfo	tun_rsel;	/* read select */
     28  1.1  deraadt 	struct	selinfo	tun_wsel;	/* write select (not used) */
     29  1.1  deraadt };
     30  1.1  deraadt 
     31  1.1  deraadt /* Maximum packet size */
     32  1.1  deraadt #define	TUNMTU		0x1000
     33  1.1  deraadt 
     34  1.1  deraadt /* ioctl's for get/set debug */
     35  1.1  deraadt #define	TUNSDEBUG	_IOW('t', 90, int)
     36  1.1  deraadt #define	TUNGDEBUG	_IOR('t', 89, int)
     37  1.1  deraadt 
     38  1.1  deraadt #endif /* !_NET_IF_TUN_H_ */
     39