1139823Simp/*- 263670Snsayer * Copyright (C) 1999-2000 by Maksim Yevmenkin <m_evmenkin@yahoo.com> 363670Snsayer * All rights reserved. 463670Snsayer * 563670Snsayer * Redistribution and use in source and binary forms, with or without 663670Snsayer * modification, are permitted provided that the following conditions 763670Snsayer * are met: 863670Snsayer * 1. Redistributions of source code must retain the above copyright 963670Snsayer * notice, this list of conditions and the following disclaimer. 1063670Snsayer * 2. Redistributions in binary form must reproduce the above copyright 1163670Snsayer * notice, this list of conditions and the following disclaimer in the 1263670Snsayer * documentation and/or other materials provided with the distribution. 1363670Snsayer * 1463670Snsayer * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1563670Snsayer * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1663670Snsayer * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1763670Snsayer * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1863670Snsayer * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1963670Snsayer * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2063670Snsayer * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2163670Snsayer * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2263670Snsayer * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2363670Snsayer * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2463670Snsayer * SUCH DAMAGE. 2563670Snsayer * 2663670Snsayer * BASED ON: 2763670Snsayer * ------------------------------------------------------------------------- 2863670Snsayer * 2963670Snsayer * Copyright (c) 1998 Brian Somers <brian@Awfulhak.org> 3063670Snsayer * All rights reserved. 3163670Snsayer * 3263670Snsayer * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk> 3363670Snsayer * Nottingham University 1987. 3463670Snsayer */ 3563670Snsayer 3663670Snsayer/* 3763670Snsayer * $FreeBSD$ 3863670Snsayer * $Id: if_tapvar.h,v 0.6 2000/07/11 02:16:08 max Exp $ 3963670Snsayer */ 4063670Snsayer 4163670Snsayer#ifndef _NET_IF_TAPVAR_H_ 4263670Snsayer#define _NET_IF_TAPVAR_H_ 4363670Snsayer 44127098Srwatson/* 45127098Srwatson * tap_mtx locks tap_flags, tap_pid. tap_next locked with global tapmtx. 46127098Srwatson * Other fields locked by owning subsystems. 47127098Srwatson */ 4863670Snsayerstruct tap_softc { 49147256Sbrooks struct ifnet *tap_ifp; 5063670Snsayer u_short tap_flags; /* misc flags */ 5163670Snsayer#define TAP_OPEN (1 << 0) 5263670Snsayer#define TAP_INITED (1 << 1) 5363670Snsayer#define TAP_RWAIT (1 << 2) 5463670Snsayer#define TAP_ASYNC (1 << 3) 5563670Snsayer#define TAP_READY (TAP_OPEN|TAP_INITED) 5663803Snsayer#define TAP_VMNET (1 << 4) 5763670Snsayer 5863861Snsayer u_int8_t ether_addr[ETHER_ADDR_LEN]; /* ether addr of the remote side */ 5963861Snsayer 6063670Snsayer pid_t tap_pid; /* PID of process to open */ 6163670Snsayer struct sigio *tap_sigio; /* information for async I/O */ 6263670Snsayer struct selinfo tap_rsel; /* read select */ 6383043Sbrooks 6483043Sbrooks SLIST_ENTRY(tap_softc) tap_next; /* next device in chain */ 65130585Sphk struct cdev *tap_dev; 66127098Srwatson struct mtx tap_mtx; /* per-softc mutex */ 6763670Snsayer}; 6863670Snsayer 6963670Snsayer#endif /* !_NET_IF_TAPVAR_H_ */ 70