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.3 (Berkeley) 04/05/90 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 #define ia_flags ia_ifa.ifa_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 /* 98 * This stuff should go in if.h or if_llc.h or someplace else, 99 * but for now . . . 100 */ 101 102 struct llc_etherhdr { 103 char dst[6]; 104 char src[6]; 105 char len[2]; 106 char llc_dsap; 107 char llc_ssap; 108 char llc_ui_byte; 109 }; 110 111 struct snpa_hdr { 112 struct ifnet *snh_ifp; 113 char snh_dhost[6]; 114 char snh_shost[6]; 115 short snh_flags; 116 }; 117 #ifdef KERNEL 118 struct iso_ifaddr *iso_ifaddr; /* linked list of iso address ifaces */ 119 struct iso_ifaddr *iso_localifa(); /* linked list of iso address ifaces */ 120 struct ifqueue clnlintrq; /* clnl packet input queue */ 121 #endif KERNEL 122