if_fwipvar.h revision 170374
1178481Sjb/*-
2178481Sjb * Copyright (c) 2004
3178481Sjb *	Doug Rabson
4178481Sjb * Copyright (c) 2002-2003
5178481Sjb * 	Hidetoshi Shimokawa. All rights reserved.
6178481Sjb *
7178481Sjb * Redistribution and use in source and binary forms, with or without
8178481Sjb * modification, are permitted provided that the following conditions
9178481Sjb * are met:
10178481Sjb * 1. Redistributions of source code must retain the above copyright
11178481Sjb *    notice, this list of conditions and the following disclaimer.
12178481Sjb * 2. Redistributions in binary form must reproduce the above copyright
13178481Sjb *    notice, this list of conditions and the following disclaimer in the
14178481Sjb *    documentation and/or other materials provided with the distribution.
15178481Sjb * 3. All advertising materials mentioning features or use of this software
16178481Sjb *    must display the following acknowledgement:
17178481Sjb *
18178481Sjb *	This product includes software developed by Hidetoshi Shimokawa.
19178481Sjb *
20178481Sjb * 4. Neither the name of the author nor the names of its contributors
21178481Sjb *    may be used to endorse or promote products derived from this software
22178481Sjb *    without specific prior written permission.
23178481Sjb *
24178481Sjb * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25178481Sjb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26178481Sjb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27178481Sjb * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28178481Sjb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29178481Sjb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30178481Sjb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31178481Sjb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32178481Sjb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33178481Sjb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34178481Sjb * SUCH DAMAGE.
35178481Sjb *
36178481Sjb * $FreeBSD: head/sys/dev/firewire/if_fwipvar.h 170374 2007-06-06 14:31:36Z simokawa $
37178481Sjb */
38178481Sjb
39178481Sjb#ifndef _NET_IF_FWIPVAR_H_
40178481Sjb#define _NET_IF_FWIPVAR_H_
41178481Sjb
42178481Sjbstruct fwip_softc {
43178481Sjb	/* XXX this must be first for fd.post_explore() */
44178481Sjb	struct firewire_dev_comm fd;
45178481Sjb	short dma_ch;
46178481Sjb	struct fw_bind fwb;
47178481Sjb	struct fw_eui64 last_dest;
48178481Sjb	struct fw_pkt last_hdr;
49178481Sjb	struct task start_send;
50178481Sjb	STAILQ_HEAD(, fw_xfer) xferlist;
51178481Sjb	struct crom_chunk unit4;	/* unit directory for IPv4 */
52178481Sjb	struct crom_chunk spec4;	/* specifier description IPv4 */
53178481Sjb	struct crom_chunk ver4;		/* version description IPv4 */
54178481Sjb	struct crom_chunk unit6;	/* unit directory for IPv6 */
55178481Sjb	struct crom_chunk spec6;	/* specifier description IPv6 */
56178481Sjb	struct crom_chunk ver6;		/* version description IPv6 */
57178481Sjb	struct fwip_eth_softc {
58178481Sjb		struct ifnet *fwip_ifp;
59178481Sjb		struct fwip_softc *fwip;
60178481Sjb	} fw_softc;
61178481Sjb	struct mtx mtx;
62178481Sjb};
63178481Sjb#define FWIP_LOCK(fwip)   mtx_lock(&(fwip)->mtx)
64178481Sjb#define FWIP_UNLOCK(fwip) mtx_unlock(&(fwip)->mtx)
65178481Sjb#endif /* !_NET_IF_FWIPVAR_H_ */
66178481Sjb