if_fwipvar.h revision 1.2.18.4 1 1.2.18.4 yamt /* $NetBSD: if_fwipvar.h,v 1.2.18.4 2007/11/15 11:44:14 yamt Exp $ */
2 1.2.18.2 yamt /*-
3 1.2.18.2 yamt * Copyright (c) 2004
4 1.2.18.2 yamt * Doug Rabson
5 1.2.18.2 yamt * Copyright (c) 2002-2003
6 1.2.18.2 yamt * Hidetoshi Shimokawa. All rights reserved.
7 1.2.18.2 yamt *
8 1.2.18.2 yamt * Redistribution and use in source and binary forms, with or without
9 1.2.18.2 yamt * modification, are permitted provided that the following conditions
10 1.2.18.2 yamt * are met:
11 1.2.18.2 yamt * 1. Redistributions of source code must retain the above copyright
12 1.2.18.2 yamt * notice, this list of conditions and the following disclaimer.
13 1.2.18.2 yamt * 2. Redistributions in binary form must reproduce the above copyright
14 1.2.18.2 yamt * notice, this list of conditions and the following disclaimer in the
15 1.2.18.2 yamt * documentation and/or other materials provided with the distribution.
16 1.2.18.2 yamt * 3. All advertising materials mentioning features or use of this software
17 1.2.18.2 yamt * must display the following acknowledgement:
18 1.2.18.2 yamt *
19 1.2.18.2 yamt * This product includes software developed by Hidetoshi Shimokawa.
20 1.2.18.2 yamt *
21 1.2.18.2 yamt * 4. Neither the name of the author nor the names of its contributors
22 1.2.18.2 yamt * may be used to endorse or promote products derived from this software
23 1.2.18.2 yamt * without specific prior written permission.
24 1.2.18.2 yamt *
25 1.2.18.2 yamt * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26 1.2.18.2 yamt * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 1.2.18.2 yamt * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 1.2.18.2 yamt * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29 1.2.18.2 yamt * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 1.2.18.2 yamt * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 1.2.18.2 yamt * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 1.2.18.2 yamt * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 1.2.18.2 yamt * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 1.2.18.2 yamt * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 1.2.18.2 yamt * SUCH DAMAGE.
36 1.2.18.2 yamt *
37 1.2.18.4 yamt * $FreeBSD: src/sys/dev/firewire/if_fwipvar.h,v 1.5 2007/06/06 14:31:36 simokawa Exp $
38 1.2.18.2 yamt */
39 1.2.18.2 yamt
40 1.2.18.2 yamt #ifndef _NET_IF_FWIPVAR_H_
41 1.2.18.2 yamt #define _NET_IF_FWIPVAR_H_
42 1.2.18.2 yamt
43 1.2.18.2 yamt struct fwip_softc {
44 1.2.18.2 yamt /* XXX this must be first for fd.post_explore() */
45 1.2.18.2 yamt struct firewire_dev_comm fd;
46 1.2.18.2 yamt short dma_ch;
47 1.2.18.2 yamt struct fw_bind fwb;
48 1.2.18.2 yamt struct fw_eui64 last_dest;
49 1.2.18.2 yamt struct fw_pkt last_hdr;
50 1.2.18.4 yamt fw_task_t start_send;
51 1.2.18.2 yamt STAILQ_HEAD(, fw_xfer) xferlist;
52 1.2.18.2 yamt struct crom_chunk unit4; /* unit directory for IPv4 */
53 1.2.18.2 yamt struct crom_chunk spec4; /* specifier description IPv4 */
54 1.2.18.2 yamt struct crom_chunk ver4; /* version description IPv4 */
55 1.2.18.2 yamt struct crom_chunk unit6; /* unit directory for IPv6 */
56 1.2.18.2 yamt struct crom_chunk spec6; /* specifier description IPv6 */
57 1.2.18.2 yamt struct crom_chunk ver6; /* version description IPv6 */
58 1.2.18.2 yamt struct fwip_eth_softc {
59 1.2.18.3 yamt #if defined(__NetBSD__)
60 1.2.18.2 yamt struct ieee1394com fwcom;
61 1.2.18.2 yamt #endif
62 1.2.18.3 yamt struct ifnet *fwip_ifp;
63 1.2.18.2 yamt struct fwip_softc *fwip;
64 1.2.18.2 yamt } fw_softc;
65 1.2.18.4 yamt fw_mtx_t mtx;
66 1.2.18.2 yamt };
67 1.2.18.4 yamt
68 1.2.18.4 yamt #define FWIP_LOCK(fwip) fw_mtx_lock(&(fwip)->mtx)
69 1.2.18.4 yamt #define FWIP_UNLOCK(fwip) fw_mtx_unlock(&(fwip)->mtx)
70 1.2.18.4 yamt
71 1.2.18.2 yamt #endif /* !_NET_IF_FWIPVAR_H_ */
72