xref: /dragonfly/sys/net/tun/if_tun.h (revision 6693db17)
1 /*	$NetBSD: if_tun.h,v 1.5 1994/06/29 06:36:27 cgd Exp $	*/
2 
3 /*
4  * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
5  * Nottingham University 1987.
6  *
7  * This source may be freely distributed, however I would be interested
8  * in any changes that are made.
9  *
10  * This driver takes packets off the IP i/f and hands them up to a
11  * user process to have its wicked way with. This driver has it's
12  * roots in a similar driver written by Phil Cockcroft (formerly) at
13  * UCL. This driver is based much more on read/write/select mode of
14  * operation though.
15  *
16  * $FreeBSD: src/sys/net/if_tun.h,v 1.17 2000/01/23 01:47:12 brian Exp $
17  * $DragonFly: src/sys/net/tun/if_tun.h,v 1.2 2003/06/17 04:28:48 dillon Exp $
18  */
19 
20 #ifndef _NET_IF_TUN_H_
21 #define _NET_IF_TUN_H_
22 
23 #include <sys/ioccom.h>
24 
25 /* Refer to if_tunvar.h for the softc stuff */
26 
27 /* Maximum transmit packet size (default) */
28 #define	TUNMTU		1500
29 
30 /* Maximum receive packet size (hard limit) */
31 #define	TUNMRU		16384
32 
33 struct tuninfo {
34 	int	baudrate;		/* linespeed */
35 	short	mtu;			/* maximum transmission unit */
36 	u_char	type;			/* ethernet, tokenring, etc. */
37 	u_char	dummy;			/* place holder */
38 };
39 
40 /* ioctl's for get/set debug */
41 #define	TUNSDEBUG	_IOW('t', 90, int)
42 #define	TUNGDEBUG	_IOR('t', 89, int)
43 #define	TUNSIFINFO	_IOW('t', 91, struct tuninfo)
44 #define	TUNGIFINFO	_IOR('t', 92, struct tuninfo)
45 #define	TUNSLMODE	_IOW('t', 93, int)
46 #define	TUNSIFMODE	_IOW('t', 94, int)
47 #define	TUNSIFPID	_IO('t', 95)
48 #define	TUNSIFHEAD	_IOW('t', 96, int)
49 #define	TUNGIFHEAD	_IOR('t', 97, int)
50 
51 #endif /* !_NET_IF_TUN_H_ */
52