|
|
1.1 ! root 1: /* isoaddrs.h - ISODE addressing */ ! 2: ! 3: /* ! 4: * $Header: /f/osi/h/RCS/isoaddrs.h,v 7.4 90/07/09 14:37:47 mrose Exp $ ! 5: * ! 6: * ! 7: * $Log: isoaddrs.h,v $ ! 8: * Revision 7.4 90/07/09 14:37:47 mrose ! 9: * sync ! 10: * ! 11: * Revision 7.3 90/05/08 08:54:34 mrose ! 12: * touch-up ! 13: * ! 14: * Revision 7.2 90/03/15 11:17:58 mrose ! 15: * quipu-sync ! 16: * ! 17: * Revision 7.1 89/11/30 23:54:02 mrose ! 18: * pa2str ! 19: * ! 20: * Revision 7.0 89/11/23 21:55:46 mrose ! 21: * Release 6.0 ! 22: * ! 23: */ ! 24: ! 25: /* ! 26: * NOTICE ! 27: * ! 28: * Acquisition, use, and distribution of this module and related ! 29: * materials are subject to the restrictions of a license agreement. ! 30: * Consult the Preface in the User's Manual for the full terms of ! 31: * this agreement. ! 32: * ! 33: */ ! 34: ! 35: ! 36: #ifndef _ISOADDRS_ ! 37: #define _ISOADDRS_ ! 38: ! 39: #ifndef _MANIFEST_ ! 40: #include "manifest.h" ! 41: #endif ! 42: #ifndef _GENERAL_ ! 43: #include "general.h" ! 44: #endif ! 45: ! 46: /* */ ! 47: ! 48: #ifdef NULLPE ! 49: typedef struct AEInfo { /* "real" directory services! */ ! 50: PE aei_ap_title; ! 51: PE aei_ae_qualifier; ! 52: ! 53: int aei_ap_id; ! 54: int aei_ae_id; ! 55: ! 56: int aei_flags; ! 57: #define AEI_NULL 0x00 ! 58: #define AEI_AP_ID 0x01 ! 59: #define AEI_AE_ID 0x02 ! 60: } AEInfo, *AEI; ! 61: #define NULLAEI ((AEI) 0) ! 62: #define AEIFREE(aei) { \ ! 63: if ((aei) -> aei_ap_title) \ ! 64: pe_free ((aei) -> aei_ap_title), \ ! 65: (aei) -> aei_ap_title = NULLPE; \ ! 66: if ((aei) -> aei_ae_qualifier) \ ! 67: pe_free ((aei) -> aei_ae_qualifier), \ ! 68: (aei) -> aei_ae_qualifier = NULLPE; \ ! 69: } ! 70: ! 71: #define str2aei(d,q) _str2aei ((d), (q), NULLCP, 0) ! 72: AEI _str2aei (); ! 73: ! 74: char *sprintaei (); ! 75: #endif ! 76: ! 77: /* */ ! 78: ! 79: struct NSAPaddr { /* this structure shouldn't have holes in it */ ! 80: long na_stack; /* TS-stack */ ! 81: #define NA_NSAP 0 /* native COTS */ ! 82: #define NA_TCP 1 /* RFC1006/TCP */ ! 83: #define NA_X25 2 /* TP0/X.25 */ ! 84: #define NA_BRG 3 /* TP0-bridge */ ! 85: ! 86: long na_community; /* internal community # */ ! 87: #define SUBNET_REALNS (-1) /* hard-wired */ ! 88: #define SUBNET_INT_X25 1 ! 89: #define SUBNET_JANET 2 ! 90: #define SUBNET_INTERNET 3 ! 91: #define SUBNET_DYNAMIC 100 /* dynamic start here... */ ! 92: ! 93: union { ! 94: struct na_nsap { /* real network service */ ! 95: #define NASIZE 64 /* 20 ought to do it */ ! 96: char na_nsap_address[NASIZE]; ! 97: char na_nsap_addrlen; ! 98: } un_na_nsap; ! 99: ! 100: struct na_tcp { /* emulation via RFC1006 */ ! 101: #define NSAP_DOMAINLEN 63 ! 102: char na_tcp_domain[NSAP_DOMAINLEN + 1]; ! 103: ! 104: u_short na_tcp_port; /* non-standard TCP port */ ! 105: u_short na_tcp_tset; /* transport set */ ! 106: #define NA_TSET_TCP 0x0001 /* .. TCP */ ! 107: #define NA_TSET_UDP 0x0002 /* .. UDP */ ! 108: } un_na_tcp; ! 109: ! 110: struct na_x25 { /* X.25 (assume single subnet) */ ! 111: #define NSAP_DTELEN 36 ! 112: char na_x25_dte[NSAP_DTELEN + 1]; /* Numeric DTE + Link */ ! 113: char na_x25_dtelen; /* number of digits used */ ! 114: ! 115: /* Conventionally, the PID sits at the first head bytes of user data and so ! 116: * should probably not be mentioned specially. A macro might do it, if ! 117: * necessary. ! 118: */ ! 119: ! 120: #define NPSIZE 4 ! 121: char na_x25_pid[NPSIZE]; /* X.25 protocol id */ ! 122: char na_x25_pidlen; /* .. */ ! 123: ! 124: #define CUDFSIZE 16 ! 125: char na_x25_cudf[CUDFSIZE];/* call user data field */ ! 126: char na_x25_cudflen; /* .. */ ! 127: /* ! 128: * X25 Facilities field. ! 129: */ ! 130: #define FACSIZE 6 ! 131: char na_x25_fac[FACSIZE]; /* X.25 facilities */ ! 132: char na_x25_faclen; /* .. */ ! 133: } un_na_x25; ! 134: } na_un; ! 135: #define na_address na_un.un_na_nsap.na_nsap_address ! 136: #define na_addrlen na_un.un_na_nsap.na_nsap_addrlen ! 137: ! 138: #define na_domain na_un.un_na_tcp.na_tcp_domain ! 139: #define na_port na_un.un_na_tcp.na_tcp_port ! 140: #define na_tset na_un.un_na_tcp.na_tcp_tset ! 141: ! 142: #define na_dte na_un.un_na_x25.na_x25_dte ! 143: #define na_dtelen na_un.un_na_x25.na_x25_dtelen ! 144: #define na_pid na_un.un_na_x25.na_x25_pid ! 145: #define na_pidlen na_un.un_na_x25.na_x25_pidlen ! 146: #define na_cudf na_un.un_na_x25.na_x25_cudf ! 147: #define na_cudflen na_un.un_na_x25.na_x25_cudflen ! 148: #define na_fac na_un.un_na_x25.na_x25_fac ! 149: #define na_faclen na_un.un_na_x25.na_x25_faclen ! 150: ! 151: /* for backwards compatibility... these two will be removed after ISODE 7.0 */ ! 152: #define na_type na_stack ! 153: #define na_subnet na_community ! 154: }; ! 155: #define NULLNA ((struct NSAPaddr *) 0) ! 156: ! 157: ! 158: struct TSAPaddr { ! 159: #define NTADDR 8 /* according to NIST OIW */ ! 160: struct NSAPaddr ta_addrs[NTADDR]; /* choice of network addresses */ ! 161: int ta_naddr; ! 162: ! 163: #define TSSIZE 64 ! 164: int ta_selectlen; ! 165: ! 166: union { /* TSAP selector */ ! 167: char ta_un_selector[TSSIZE]; ! 168: ! 169: u_short ta_un_port; ! 170: } un_ta; ! 171: #define ta_selector un_ta.ta_un_selector ! 172: #define ta_port un_ta.ta_un_port ! 173: }; ! 174: #define NULLTA ((struct TSAPaddr *) 0) ! 175: ! 176: ! 177: struct SSAPaddr { ! 178: struct TSAPaddr sa_addr; /* transport address */ ! 179: ! 180: #define SSSIZE 64 ! 181: int sa_selectlen; ! 182: ! 183: union { /* SSAP selector */ ! 184: char sa_un_selector[SSSIZE]; ! 185: ! 186: u_short sa_un_port; ! 187: } un_sa; ! 188: #define sa_selector un_sa.sa_un_selector ! 189: #define sa_port un_sa.sa_un_port ! 190: }; ! 191: #define NULLSA ((struct SSAPaddr *) 0) ! 192: ! 193: ! 194: struct PSAPaddr { ! 195: struct SSAPaddr pa_addr; /* session address */ ! 196: ! 197: #define PSSIZE 64 ! 198: int pa_selectlen; ! 199: ! 200: union { /* PSAP selector */ ! 201: char pa_un_selector[PSSIZE]; ! 202: ! 203: u_short pa_un_port; ! 204: } un_pa; ! 205: #define pa_selector un_pa.pa_un_selector ! 206: #define pa_port un_pa.pa_un_port ! 207: }; ! 208: #define NULLPA ((struct PSAPaddr *) 0) ! 209: ! 210: struct PSAPaddr *aei2addr (); /* application entity title to PSAPaddr */ ! 211: ! 212: /* */ ! 213: ! 214: #ifdef NULLPE ! 215: char *alias2name (); ! 216: ! 217: extern PE (*acsap_lookup) (); ! 218: #endif ! 219: ! 220: ! 221: #ifdef NULLOID ! 222: struct isoentity { /* for stub directory service */ ! 223: OIDentifier ie_identifier; ! 224: char *ie_descriptor; ! 225: ! 226: struct PSAPaddr ie_addr; ! 227: }; ! 228: ! 229: int setisoentity (), endisoentity (); ! 230: ! 231: struct isoentity *getisoentity (); ! 232: ! 233: AEI oid2aei (); ! 234: #endif ! 235: ! 236: ! 237: /* old-style */ ! 238: struct PSAPaddr *is2paddr (); /* service entry to PSAPaddr */ ! 239: struct SSAPaddr *is2saddr (); /* service entry to SSAPaddr */ ! 240: struct TSAPaddr *is2taddr (); /* service entry to TSAPaddr */ ! 241: ! 242: /* */ ! 243: ! 244: struct PSAPaddr *str2paddr (); /* string encoding to PSAPaddr */ ! 245: struct SSAPaddr *str2saddr (); /* string encoding to SSAPaddr */ ! 246: struct TSAPaddr *str2taddr (); /* string encoding to TSAPaddr */ ! 247: ! 248: #define paddr2str(pa,na) _paddr2str ((pa), (na), 0) ! 249: ! 250: char *_paddr2str (); /* PSAPaddr to string encoding */ ! 251: char *saddr2str (); /* SSAPaddr to string encoding */ ! 252: char *taddr2str (); /* TSAPaddr to string encoding */ ! 253: ! 254: struct NSAPaddr *na2norm (); /* normalize NSAPaddr */ ! 255: ! 256: char *na2str (); /* pretty-print NSAPaddr */ ! 257: char *pa2str (); /* pretty-print PSAPaddr */ ! 258: ! 259: /* */ ! 260: ! 261: int isodeserver (); /* generic server dispatch */ ! 262: ! 263: /* */ ! 264: ! 265: /* all of this really should be in "isoqos.h" ... */ ! 266: ! 267: struct QOStype { ! 268: /* transport QOS */ ! 269: int qos_reliability; /* "reliability" element */ ! 270: #define HIGH_QUALITY 0 ! 271: #define LOW_QUALITY 1 ! 272: ! 273: /* session QOS */ ! 274: int qos_sversion; /* session version required */ ! 275: int qos_extended; /* extended control */ ! 276: int qos_maxtime; /* for SPM response during S-CONNECT */ ! 277: }; ! 278: #define NULLQOS ((struct QOStype *) 0) ! 279: ! 280: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.