1139749Simp/*- 2130407Sdfr * Copyright (c) 2004 3130407Sdfr * Doug Rabson 4130407Sdfr * Copyright (c) 2002-2003 5130407Sdfr * Hidetoshi Shimokawa. All rights reserved. 6130407Sdfr * 7130407Sdfr * Redistribution and use in source and binary forms, with or without 8130407Sdfr * modification, are permitted provided that the following conditions 9130407Sdfr * are met: 10130407Sdfr * 1. Redistributions of source code must retain the above copyright 11130407Sdfr * notice, this list of conditions and the following disclaimer. 12130407Sdfr * 2. Redistributions in binary form must reproduce the above copyright 13130407Sdfr * notice, this list of conditions and the following disclaimer in the 14130407Sdfr * documentation and/or other materials provided with the distribution. 15130407Sdfr * 3. All advertising materials mentioning features or use of this software 16130407Sdfr * must display the following acknowledgement: 17130407Sdfr * 18130407Sdfr * This product includes software developed by Hidetoshi Shimokawa. 19130407Sdfr * 20130407Sdfr * 4. Neither the name of the author nor the names of its contributors 21130407Sdfr * may be used to endorse or promote products derived from this software 22130407Sdfr * without specific prior written permission. 23130407Sdfr * 24130407Sdfr * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25130407Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26130407Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27130407Sdfr * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28130407Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29130407Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30130407Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31130407Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32130407Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33130407Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34130407Sdfr * SUCH DAMAGE. 35130407Sdfr * 36130407Sdfr * $FreeBSD$ 37130407Sdfr */ 38130407Sdfr 39130407Sdfr#ifndef _NET_IF_FWIPVAR_H_ 40130407Sdfr#define _NET_IF_FWIPVAR_H_ 41130407Sdfr 42130407Sdfrstruct fwip_softc { 43130407Sdfr /* XXX this must be first for fd.post_explore() */ 44130407Sdfr struct firewire_dev_comm fd; 45130407Sdfr short dma_ch; 46130407Sdfr struct fw_bind fwb; 47130407Sdfr struct fw_eui64 last_dest; 48130407Sdfr struct fw_pkt last_hdr; 49130407Sdfr struct task start_send; 50130407Sdfr STAILQ_HEAD(, fw_xfer) xferlist; 51130411Sdfr struct crom_chunk unit4; /* unit directory for IPv4 */ 52130411Sdfr struct crom_chunk spec4; /* specifier description IPv4 */ 53130411Sdfr struct crom_chunk ver4; /* version description IPv4 */ 54130411Sdfr struct crom_chunk unit6; /* unit directory for IPv6 */ 55130411Sdfr struct crom_chunk spec6; /* specifier description IPv6 */ 56130411Sdfr struct crom_chunk ver6; /* version description IPv6 */ 57130407Sdfr struct fwip_eth_softc { 58147256Sbrooks struct ifnet *fwip_ifp; 59130407Sdfr struct fwip_softc *fwip; 60130407Sdfr } fw_softc; 61170374Ssimokawa struct mtx mtx; 62130407Sdfr}; 63170374Ssimokawa#define FWIP_LOCK(fwip) mtx_lock(&(fwip)->mtx) 64170374Ssimokawa#define FWIP_UNLOCK(fwip) mtx_unlock(&(fwip)->mtx) 65130407Sdfr#endif /* !_NET_IF_FWIPVAR_H_ */ 66