16735Samurai/* $NetBSD: if_tun.h,v 1.5 1994/06/29 06:36:27 cgd Exp $ */ 26735Samurai 3139823Simp/*- 46053Samurai * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk> 56053Samurai * Nottingham University 1987. 66053Samurai * 76053Samurai * This source may be freely distributed, however I would be interested 86053Samurai * in any changes that are made. 96053Samurai * 106053Samurai * This driver takes packets off the IP i/f and hands them up to a 1135256Sdes * user process to have its wicked way with. This driver has it's 126053Samurai * roots in a similar driver written by Phil Cockcroft (formerly) at 136053Samurai * UCL. This driver is based much more on read/write/select mode of 146053Samurai * operation though. 158876Srgrimes * 1650477Speter * $FreeBSD$ 176053Samurai */ 186053Samurai 196053Samurai#ifndef _NET_IF_TUN_H_ 206053Samurai#define _NET_IF_TUN_H_ 216053Samurai 2232441Sbrian/* Refer to if_tunvar.h for the softc stuff */ 236735Samurai 2426566Sjulian/* Maximum transmit packet size (default) */ 2520559Sfenner#define TUNMTU 1500 266053Samurai 2726566Sjulian/* Maximum receive packet size (hard limit) */ 2826566Sjulian#define TUNMRU 16384 2926566Sjulian 306735Samuraistruct tuninfo { 316735Samurai int baudrate; /* linespeed */ 326735Samurai short mtu; /* maximum transmission unit */ 336735Samurai u_char type; /* ethernet, tokenring, etc. */ 346735Samurai u_char dummy; /* place holder */ 356735Samurai}; 366735Samurai 376053Samurai/* ioctl's for get/set debug */ 386053Samurai#define TUNSDEBUG _IOW('t', 90, int) 396053Samurai#define TUNGDEBUG _IOR('t', 89, int) 406053Samurai#define TUNSIFINFO _IOW('t', 91, struct tuninfo) 416053Samurai#define TUNGIFINFO _IOR('t', 92, struct tuninfo) 4245014Sdes#define TUNSLMODE _IOW('t', 93, int) 4345014Sdes#define TUNSIFMODE _IOW('t', 94, int) 4456349Sbrian#define TUNSIFPID _IO('t', 95) 4556410Sbrian#define TUNSIFHEAD _IOW('t', 96, int) 4656410Sbrian#define TUNGIFHEAD _IOR('t', 97, int) 476053Samurai 486053Samurai#endif /* !_NET_IF_TUN_H_ */ 49