1 /*********************************************************** 2 Copyright IBM Corporation 1987 3 4 All Rights Reserved 5 6 Permission to use, copy, modify, and distribute this software and its 7 documentation for any purpose and without fee is hereby granted, 8 provided that the above copyright notice appear in all copies and that 9 both that copyright notice and this permission notice appear in 10 supporting documentation, and that the name of IBM not be 11 used in advertising or publicity pertaining to distribution of the 12 software without specific, written prior permission. 13 14 IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 15 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 16 IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 17 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 18 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 19 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 20 SOFTWARE. 21 22 ******************************************************************/ 23 /* 24 * Modifications, 25 * Copyright (c) 1988 Regents of the University of California. 26 * All rights reserved. 27 * 28 * Redistribution and use in source and binary forms are permitted 29 * provided that the above copyright notice and this paragraph are 30 * duplicated in all such forms and that any documentation, 31 * advertising materials, and other materials related to such 32 * distribution and use acknowledge that the software was developed 33 * by the University of California, Berkeley. The name of the 34 * University may not be used to endorse or promote products derived 35 * from this software without specific prior written permission. 36 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 37 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 38 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 39 * 40 * @(#)iso_var.h 7.2 (Berkeley) 04/22/89 41 */ 42 43 /* 44 * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison 45 */ 46 /* $Header: iso_var.h,v 4.2 88/06/29 15:00:08 hagens Exp $ 47 * $Source: /usr/argo/sys/netiso/RCS/iso_var.h,v $ 48 */ 49 50 /* 51 * Interface address, iso version. One of these structures is 52 * allocated for each interface with an osi address. The ifaddr 53 * structure conatins the protocol-independent part 54 * of the structure, and is assumed to be first. 55 */ 56 struct iso_ifaddr { 57 struct ifaddr ia_ifa; /* protocol-independent info */ 58 #define ia_ifp ia_ifa.ifa_ifp 59 int ia_flags; 60 int ia_snpaoffset; 61 struct iso_ifaddr *ia_next; /* next in list of iso addresses */ 62 struct sockaddr_iso ia_addr; /* reserve space for interface name */ 63 struct sockaddr_iso ia_dstaddr; /* reserve space for broadcast addr */ 64 #define ia_broadaddr ia_dstaddr 65 struct sockaddr_iso ia_sockmask; /* reserve space for general netmask */ 66 }; 67 68 struct iso_aliasreq { 69 char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */ 70 struct sockaddr_iso ifra_addr; 71 struct sockaddr_iso ifra_dstaddr; 72 struct sockaddr_iso ifra_mask; 73 int ifra_snpaoffset; 74 }; 75 76 struct iso_ifreq { 77 char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ 78 struct sockaddr_iso ifr_Addr; 79 }; 80 81 /* 82 * Given a pointer to an iso_ifaddr (ifaddr), 83 * return a pointer to the addr as a sockaddr_iso 84 */ 85 /* 86 #define IA_SIS(ia) ((struct sockaddr_iso *)(ia.ia_ifa->ifa_addr)) 87 * works if sockaddr_iso becomes variable sized. 88 */ 89 #define IA_SIS(ia) (&(((struct iso_ifaddr *)ia)->ia_addr)) 90 91 #define SIOCDIFADDR_ISO _IOW('i',25, struct iso_ifreq) /* delete IF addr */ 92 #define SIOCAIFADDR_ISO _IOW('i',26, struct iso_aliasreq)/* add/chg IFalias */ 93 #define SIOCGIFADDR_ISO _IOWR('i',33, struct iso_ifreq) /* get ifnet address */ 94 #define SIOCGIFDSTADDR_ISO _IOWR('i',34, struct iso_ifreq) /* get dst address */ 95 #define SIOCGIFNETMASK_ISO _IOWR('i',37, struct iso_ifreq) /* get dst address */ 96 97 #ifndef IFA_ROUTE 98 #define IFA_ROUTE 0x01 /* routing entry installed */ 99 #endif 100 101 /* ISO arp IOCTL data structures */ 102 struct arpreq_iso { 103 int arp_flags; /* flags */ 104 struct sockaddr_iso arp_pa; /* protocol address */ 105 struct sockaddr arp_ha; /* hardware address */ 106 }; 107 108 #define SIOCSISOMAP _IOW('a',30, struct arpreq_iso) /* set arp entry */ 109 #define SIOCGISOMAP _IOWR('a',38, struct arpreq_iso)/* get arp entry */ 110 #define SIOCDISOMAP _IOW('a',31, struct arpreq_iso) /* delete arp entry */ 111 /* 112 * This stuff should go in if.h or if_llc.h or someplace else, 113 * but for now . . . 114 */ 115 116 struct llc_etherhdr { 117 char dst[6]; 118 char src[6]; 119 char len[2]; 120 char llc_dsap; 121 char llc_ssap; 122 char llc_ui_byte; 123 }; 124 125 struct snpa_hdr { 126 struct ifnet *snh_ifp; 127 char snh_dhost[6]; 128 char snh_shost[6]; 129 short snh_flags; 130 }; 131 #ifdef KERNEL 132 struct iso_ifaddr *iso_ifaddr; /* linked list of iso address ifaces */ 133 struct iso_ifaddr *iso_localifa(); /* linked list of iso address ifaces */ 134 struct ifqueue clnlintrq; /* clnl packet input queue */ 135 #endif KERNEL 136