ipx_if.h revision 169463
12311Sjkh/*- 22311Sjkh * Copyright (c) 1984, 1985, 1986, 1987, 1993 32311Sjkh * The Regents of the University of California. All rights reserved. 42311Sjkh * 52311Sjkh * Redistribution and use in source and binary forms, with or without 62311Sjkh * modification, are permitted provided that the following conditions 72311Sjkh * are met: 82311Sjkh * 1. Redistributions of source code must retain the above copyright 92311Sjkh * notice, this list of conditions and the following disclaimer. 102311Sjkh * 2. Redistributions in binary form must reproduce the above copyright 112311Sjkh * notice, this list of conditions and the following disclaimer in the 122311Sjkh * documentation and/or other materials provided with the distribution. 132311Sjkh * 4. Neither the name of the University nor the names of its contributors 142311Sjkh * may be used to endorse or promote products derived from this software 152311Sjkh * without specific prior written permission. 165176Sache * 172311Sjkh * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 182311Sjkh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 192311Sjkh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2029452Scharnier * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2150479Speter * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 222311Sjkh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 232311Sjkh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 242311Sjkh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 252311Sjkh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 262311Sjkh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 272311Sjkh * SUCH DAMAGE. 282311Sjkh 292311Sjkh * Copyright (c) 1995, Mike Mitchell 302311Sjkh * 312311Sjkh * Redistribution and use in source and binary forms, with or without 322311Sjkh * modification, are permitted provided that the following conditions 332311Sjkh * are met: 34135242Sdds * 1. Redistributions of source code must retain the above copyright 3569793Sobrien * notice, this list of conditions and the following disclaimer. 362311Sjkh * 2. Redistributions in binary form must reproduce the above copyright 372311Sjkh * notice, this list of conditions and the following disclaimer in the 382311Sjkh * documentation and/or other materials provided with the distribution. 392311Sjkh * 3. All advertising materials mentioning features or use of this software 402311Sjkh * must display the following acknowledgement: 412311Sjkh * This product includes software developed by the University of 422311Sjkh * California, Berkeley and its contributors. 432311Sjkh * 4. Neither the name of the University nor the names of its contributors 442311Sjkh * may be used to endorse or promote products derived from this software 452311Sjkh * without specific prior written permission. 462311Sjkh * 472311Sjkh * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 48135242Sdds * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 492311Sjkh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 502311Sjkh * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 512311Sjkh * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 522311Sjkh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 532311Sjkh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 542311Sjkh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 552311Sjkh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 562311Sjkh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 572311Sjkh * SUCH DAMAGE. 582311Sjkh * 592311Sjkh * @(#)ipx_if.h 602311Sjkh * 612311Sjkh * $FreeBSD: head/sys/netipx/ipx_if.h 169463 2007-05-11 10:38:34Z rwatson $ 622311Sjkh */ 632311Sjkh 642311Sjkh#ifndef _NETIPX_IPX_IF_H_ 652311Sjkh#define _NETIPX_IPX_IF_H_ 66173412Skevlo 67173412Skevlo/* 68173412Skevlo * Interface address. One of these structures 69173412Skevlo * is allocated for each interface with an internet address. 70173412Skevlo * The ifaddr structure contains the protocol-independent part 71173412Skevlo * of the structure and is assumed to be first. 72173412Skevlo */ 732311Sjkh 742311Sjkhstruct ipx_ifaddr { 752311Sjkh struct ifaddr ia_ifa; /* protocol-independent info */ 762311Sjkh#define ia_ifp ia_ifa.ifa_ifp 772311Sjkh#define ia_flags ia_ifa.ifa_flags 782311Sjkh struct ipx_ifaddr *ia_next; /* next in list of ipx addresses */ 7929452Scharnier struct sockaddr_ipx ia_addr; /* reserve space for my address */ 8029452Scharnier struct sockaddr_ipx ia_dstaddr; /* space for my broadcast address */ 8129452Scharnier#define ia_broadaddr ia_dstaddr 8229452Scharnier struct sockaddr_ipx ia_netmask; /* space for my network mask */ 832311Sjkh}; 842311Sjkh 852311Sjkhstruct ipx_aliasreq { 862311Sjkh char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */ 872311Sjkh struct sockaddr_ipx ifra_addr; 882311Sjkh struct sockaddr_ipx ifra_broadaddr; 892311Sjkh#define ifra_dstaddr ifra_broadaddr 902311Sjkh}; 912311Sjkh/* 922311Sjkh * Given a pointer to an ipx_ifaddr (ifaddr), 932311Sjkh * return a pointer to the addr as a sockadd_ipx. 942311Sjkh */ 952311Sjkh 962311Sjkh#define IA_SIPX(ia) (&(((struct ipx_ifaddr *)(ia))->ia_addr)) 972311Sjkh 982311Sjkh/* This is not the right place for this but where is? */ 992311Sjkh 1002311Sjkh#define ETHERTYPE_IPX_8022 0x00e0 /* Ethernet_802.2 */ 1012311Sjkh#define ETHERTYPE_IPX_8023 0x0000 /* Ethernet_802.3 */ 1022311Sjkh#define ETHERTYPE_IPX_II 0x8137 /* Ethernet_II */ 1032311Sjkh#define ETHERTYPE_IPX_SNAP 0x8137 /* Ethernet_SNAP */ 1042311Sjkh 1052311Sjkh#define ETHERTYPE_IPX 0x8137 /* Only Ethernet_II Available */ 1062311Sjkh 1072311Sjkh#ifdef IPXIP 10829452Scharnierstruct ipxip_req { 1092311Sjkh struct sockaddr rq_ipx; /* must be ipx format destination */ 1102311Sjkh struct sockaddr rq_ip; /* must be ip format gateway */ 1112311Sjkh short rq_flags; 1122311Sjkh}; 1132311Sjkh#endif 1142311Sjkh 1152311Sjkh#ifdef _KERNEL 1162311Sjkhextern struct ipx_ifaddr *ipx_ifaddr; 1172311Sjkh 1182311Sjkhstruct ipx_ifaddr *ipx_iaonnetof(struct ipx_addr *dst); 1192311Sjkh#endif 1202311Sjkh 1212311Sjkh#endif /* !_NETIPX_IPX_IF_H_ */ 1222311Sjkh