5 /* $NetBSD: if_tun.h,v 1.6 1996/06/25 22:15:18 pk Exp $ */
8 * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
9 * Nottingham University 1987.
11 * This source may be freely distributed, however I would be interested
12 * in any changes that are made.
14 * This driver takes packets off the IP i/f and hands them up to a
15 * user process to have it's wicked way with. This driver has it's
16 * roots in a similar driver written by Phil Cockcroft (formerly) at
17 * UCL. This driver is based much more on read/write/select mode of
20 * : $Header: if_tnreg.h,v 1.1.2.1 1992/07/16 22:39:16 friedl Exp
23 #ifndef __NET_IF_TUN_H
24 #define __NET_IF_TUN_H
27 u_short tun_flags; /* misc flags */
28 #define TUN_OPEN 0x0001
29 #define TUN_INITED 0x0002
30 #define TUN_RCOLL 0x0004
31 #define TUN_IASET 0x0008
32 #define TUN_DSTADDR 0x0010
33 #define TUN_RWAIT 0x0040
34 #define TUN_ASYNC 0x0080
35 #define TUN_NBIO 0x0100
36 #define TUN_PREPADDR 0x0200
38 #define TUN_READY (TUN_OPEN | TUN_INITED | TUN_IASET)
40 struct ifnet tun_if; /* the interface */
41 int tun_pgrp; /* the process group - if any */
42 struct selinfo tun_rsel; /* read select */
43 struct selinfo tun_wsel; /* write select (not used) */
49 /* Maximum packet size */
52 /* ioctl's for get/set debug */
53 #define TUNSDEBUG _IOW('t', 90, int)
54 #define TUNGDEBUG _IOR('t', 89, int)
55 #define TUNSIFMODE _IOW('t', 88, int)
56 #define TUNSLMODE _IOW('t', 87, int)