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