xref: /freebsd/sys/net/if_tun.h (revision 90aac0d83bc9645f51ef0c2aeae6f9c0540bb031)
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 
17 #ifndef _NET_IF_TUN_H_
18 #define _NET_IF_TUN_H_
19 
20 /* Refer to if_tunvar.h for the softc stuff */
21 
22 /* Maximum transmit packet size (default) */
23 #define	TUNMTU		1500
24 
25 /* Maximum receive packet size (hard limit) */
26 #define	TUNMRU		65535
27 
28 struct tuninfo {
29 	int	baudrate;		/* linespeed */
30 	unsigned short	mtu;		/* maximum transmission unit */
31 	u_char	type;			/* ethernet, tokenring, etc. */
32 	u_char	dummy;			/* place holder */
33 };
34 
35 /* ioctl's for get/set debug */
36 #define	TUNSDEBUG	_IOW('t', 90, int)
37 #define	TUNGDEBUG	_IOR('t', 89, int)
38 #define	TUNSIFINFO	_IOW('t', 91, struct tuninfo)
39 #define	TUNGIFINFO	_IOR('t', 92, struct tuninfo)
40 #define	TUNSLMODE	_IOW('t', 93, int)
41 #define	TUNGIFNAME	_IOR('t', 93, struct ifreq)
42 #define	TUNSIFMODE	_IOW('t', 94, int)
43 #define	TUNSIFPID	_IO('t', 95)
44 #define	TUNSIFHEAD	_IOW('t', 96, int)
45 #define	TUNGIFHEAD	_IOR('t', 97, int)
46 
47 #endif /* !_NET_IF_TUN_H_ */
48