Subversion Repositories SvarDOS

Rev

Rev 616 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
207 mateuszvis 1
/*!\file net/if_tun.h
2
 * Interface tunneling.
3
 */
4
 
5
/*      $NetBSD: if_tun.h,v 1.6 1996/06/25 22:15:18 pk Exp $    */
6
 
7
/*
8
 * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
9
 * Nottingham University 1987.
10
 *
11
 * This source may be freely distributed, however I would be interested
12
 * in any changes that are made.
13
 *
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
18
 * operation though.
19
 * 
20
 * : $Header: if_tnreg.h,v 1.1.2.1 1992/07/16 22:39:16 friedl Exp
21
 */
22
 
23
#ifndef __NET_IF_TUN_H
24
#define __NET_IF_TUN_H
25
 
26
struct tun_softc {
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
37
 
38
#define	TUN_READY	(TUN_OPEN | TUN_INITED | TUN_IASET)
39
 
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) */
44
#if NBPFILTER > 0
45
	caddr_t		tun_bpf;
46
#endif
47
};
48
 
49
/* Maximum packet size */
50
#define	TUNMTU		1500
51
 
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)
57
 
58
#endif