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