-/*
- * Type 37 Address
- *
- * This address is named for the value of its AFI (37). This format
- * supports an X.121 address. A type 37 address has the following format:
- *
- * <----- idp -------> <- dsp ->
- * <- afi -> <- idi -> <- dsp ->
- * | "37" | 7 bytes | 9 bytes |
- *
- * The idi contains 14 bcd digits of X.121 address.
- * The use of the dsp part is unknown.
- *
- * The afi is considered the "network" portion of the address.
- * This means that you can't have multihoming in the x.25 environment.
- * Makes loopback a bear.
- */
-#define BIGSOCKADDRS
-#ifdef BIGSOCKADDRS
-#define ADDR37_IDI_LEN 7 /* 14 bcd digits == 7 octets */
-#define ADDR37_DSP_LEN 9
-#else
-#define ADDR37_IDI_LEN 7 /* 14 bcd digits == 7 octets */
-#define ADDR37_DSP_LEN 3 /* this is a lie to fit in sockaddr */
-#endif BIGSOCKADDRS
-struct addr_37 {
- u_char a37_idi[ADDR37_IDI_LEN]; /* initial domain identifier */
- u_char a37_dsp[ADDR37_DSP_LEN]; /* domain specific part */
-};
-
-struct ovl_37 { /* overlay for type 37 address */
- u_char o37_afi; /* afi */
- u_char o37_x121[ADDR37_IDI_LEN]; /* X.121 address */
- u_char o37_dsp[ADDR37_DSP_LEN]; /* unknown use at this time */
-};
-
-/*
- * OSINET address
- *
- * This style address is used by the OSINET group
- * An OSINET address has the following (variable-length) format
- *
- * <----- idp -------> <---------------- dsp --------------------------->
- * <- afi -> <- idi -> <---------------- dsp --------------------------->
- * | "47" | "0004" | 11 bytes |
- * | afi(1)| osinetid | orgid(2) | subnet id(2) | (4-8) | nsap sel(1) |
- *
- * the afi, orgid, and subnet id are considered the "network" portion of
- * the address.
- */
-#ifdef BIGSOCKADDRS
-#define ADDROSINET_IDI_LEN 2
-#define ADDROSINET_DSP_LEN 11
-#else
-#define ADDROSINET_IDI_LEN 2
-#define ADDROSINET_DSP_LEN 8 /* this is a lie to fit in sockaddr */
-#endif BIGSOCKADDRS
-struct addr_osinet {
- u_char aosi_idi[ADDROSINET_IDI_LEN]; /* initial domain identifier */
- u_char aosi_dsp[ADDROSINET_DSP_LEN]; /* domain specific part */
-};
-
-#define OVLOSINET_ID_LEN 2
-#ifdef BIGSOCKADDRS
-#define OVLOSINET_ORGID_LEN 2
-#define OVLOSINET_SNETID_LEN 2
-#define OVLOSINET_SNPA_LEN 8
-#define OVLOSINET_NSAP_LEN 1
-#else
-#define OVLOSINET_ORGID_LEN 2
-#define OVLOSINET_SNETID_LEN 2
-#define OVLOSINET_SNPA_LEN 5 /* this is a lie to fit in sockaddr */
-#define OVLOSINET_NSAP_LEN 1
-#endif BIGSOCKADDRS
-struct ovl_osinet { /* overlay for osinet address */
- u_char oosi_afi; /* afi */
- u_char oosi_id[OVLOSINET_ID_LEN]; /* osinet id */
- u_char oosi_orgid[OVLOSINET_ORGID_LEN]; /* orgid */
- u_char oosi_snetid[OVLOSINET_SNETID_LEN]; /* subnet id */
- u_char oosi_snpa[OVLOSINET_SNPA_LEN]; /* snpa */
- u_char oosi_nsap[OVLOSINET_NSAP_LEN]; /* nsap sel */
-};
-
-/*
- * RFC 986 address
- *
- * This style address is used when DOD internet addresses are used
- * The format of rfc986 addresses is:
- *
- * <----- idp -------> <---------------- dsp -------------------->
- * <- afi -> <- idi -> <---------------- dsp -------------------->
- * | "47" | "0006" | 6 bytes |
- * | afi(1)| idi(2) | version (1) | inet addr (4) | proto id(1) |
- *
- * the afi, idi, and network portion of the inet address are considered
- * the "network" portion of the address.
- */
-#define ADDRRFC986_IDI_LEN 2
-#define ADDRRFC986_DSP_LEN 6
-struct addr_rfc986 {
- u_char a986_idi[ADDRRFC986_IDI_LEN]; /* initial domain identifier */
- u_char a986_dsp[ADDRRFC986_DSP_LEN]; /* domain specific part */
-};
-
-#define OVLRFC986_INET_LEN 4
-struct ovl_rfc986 {
- u_char o986_afi; /* afi */
- u_char o986_idi[ADDRRFC986_IDI_LEN]; /* idi */
- u_char o986_vers; /* version */
- u_char o986_inetaddr[OVLRFC986_INET_LEN]; /* internet address */
- u_char o986_upid; /* upper protocol id */
-};
-#define RFC986V1 0x01 /* version of 986 addr */
-
-#define AFI_37 0x37 /* bcd of "37" */
-#define AFI_OSINET 0x47 /* bcd of "47" */
-#define AFI_RFC986 0x47 /* bcd of "47" */
-#define AFI_SNA 0x00 /* SubNetwork Address; invalid really...
- - used by ES-IS */
-
-/* the idi for type 37 addresses is very different than the others */
-#define IDI_OSINET 0x0004 /* bcd of "0004" */
-#define IDI_RFC986 0x0006 /* bcd of "0006" */
-
-/*
- * This address type is used to store a subnetwork address in a
- * sockaddr_iso. The isoa_len field should contain the length of the
- * subnetwork address plus the length of the afi (ie +1 ).
- *
- * This address format is used only by the ES-IS protocol
- */
-#define ADDRSNA_IDI_LEN 7
-struct addr_sn {
- char sna_addr[ADDRSNA_IDI_LEN]; /* subnetwork address */
-};