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 /* 25 * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison 26 */ 27 #define MAX_SNPALEN 8 /* curiously equal to sizeof x.121 ( 28 plus 1 for nibble len) addr */ 29 struct snpa_req { 30 struct iso_addr sr_isoa; /* nsap address */ 31 u_char sr_len; /* length of snpa */ 32 u_char sr_snpa[MAX_SNPALEN]; /* snpa associated 33 with nsap address */ 34 u_char sr_flags; /* true if entry is valid */ 35 u_short sr_ht; /* holding time */ 36 }; 37 38 /* 39 * Structure of the SNPA cache 40 */ 41 struct snpa_cache { 42 struct snpa_req sc_sr; 43 #define sc_nsap sc_sr.sr_isoa /* this could be a NET if entry is 44 for an IS */ 45 #define sc_len sc_sr.sr_len 46 #define sc_snpa sc_sr.sr_snpa 47 #define sc_ht sc_sr.sr_ht 48 #define sc_flags sc_sr.sr_flags 49 struct ifnet *sc_ifp; 50 #define SNPA_VALID 0x01 51 #define SNPA_ES 0x02 52 #define SNPA_IS 0x04 53 #define SNPA_PERM 0x10 54 55 /* redirects only */ 56 struct iso_addr sc_da; /* DA from RD */ 57 struct rtentry *sc_rt; 58 }; 59 60 struct systype_req { 61 short sr_holdt; /* holding timer */ 62 short sr_configt; /* configuration timer */ 63 char sr_type; /* SNPA_ES or SNPA_IS */ 64 }; 65 66 #define SIOCSSTYPE _IOW('a', 39, struct systype_req) /* set system type */ 67 #define SIOCGSTYPE _IOW('a', 40, struct systype_req) /* set system type */ 68 69 #ifdef KERNEL 70 struct snpa_cache *snpac_look(/* struct iso_addr *isoa */); 71 #endif KERNEL 72