summaryrefslogtreecommitdiff
path: root/sys/netiso/iso.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netiso/iso.h')
-rw-r--r--sys/netiso/iso.h87
1 files changed, 43 insertions, 44 deletions
diff --git a/sys/netiso/iso.h b/sys/netiso/iso.h
index 01af3ed2860..de615248e1d 100644
--- a/sys/netiso/iso.h
+++ b/sys/netiso/iso.h
@@ -1,4 +1,5 @@
-/* $NetBSD: iso.h,v 1.7 1995/06/13 07:13:31 mycroft Exp $ */
+/* $OpenBSD: iso.h,v 1.2 1996/03/04 10:35:28 mickey Exp $ */
+/* $NetBSD: iso.h,v 1.8 1996/02/13 22:09:58 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -40,13 +41,13 @@
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of IBM not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -67,34 +68,34 @@ SOFTWARE.
/*
* Return true if this is a multicast address
- * This assumes that the bit transmission is lsb first. This
+ * This assumes that the bit transmission is lsb first. This
* assumption is valid for 802.3 but not 802.5. There is a
* kludge to get around this for 802.5 -- see if_lan.c
* where subnetwork header is setup.
*/
#define IS_MULTICAST(snpa)\
((snpa)[0] & 0x01)
-
+
/*
* Protocols
*/
-#define ISOPROTO_TCP 6 /* IETF experiment */
-#define ISOPROTO_UDP 17 /* IETF experiment */
-#define ISOPROTO_TP0 25 /* connection oriented transport protocol */
-#define ISOPROTO_TP1 26 /* not implemented */
-#define ISOPROTO_TP2 27 /* not implemented */
-#define ISOPROTO_TP3 28 /* not implemented */
-#define ISOPROTO_TP4 29 /* connection oriented transport protocol */
-#define ISOPROTO_TP ISOPROTO_TP4 /* tp-4 with negotiation */
-#define ISOPROTO_CLTP 30 /* connectionless transport (not yet impl.) */
-#define ISOPROTO_CLNP 31 /* connectionless internetworking protocol */
-#define ISOPROTO_X25 32 /* cons */
+#define ISOPROTO_TCP 6 /* IETF experiment */
+#define ISOPROTO_UDP 17 /* IETF experiment */
+#define ISOPROTO_TP0 25 /* connection oriented transport protocol */
+#define ISOPROTO_TP1 26 /* not implemented */
+#define ISOPROTO_TP2 27 /* not implemented */
+#define ISOPROTO_TP3 28 /* not implemented */
+#define ISOPROTO_TP4 29 /* connection oriented transport protocol */
+#define ISOPROTO_TP ISOPROTO_TP4 /* tp-4 with negotiation */
+#define ISOPROTO_CLTP 30 /* connectionless transport (not yet impl.) */
+#define ISOPROTO_CLNP 31 /* connectionless internetworking protocol */
+#define ISOPROTO_X25 32 /* cons */
#define ISOPROTO_INACT_NL 33 /* inactive network layer! */
-#define ISOPROTO_ESIS 34 /* ES-IS protocol */
-#define ISOPROTO_INTRAISIS 35 /* IS-IS protocol */
-#define ISOPROTO_IDRP 36 /* Interdomain Routing Protocol */
+#define ISOPROTO_ESIS 34 /* ES-IS protocol */
+#define ISOPROTO_INTRAISIS 35 /* IS-IS protocol */
+#define ISOPROTO_IDRP 36 /* Interdomain Routing Protocol */
-#define ISOPROTO_RAW 255 /* raw clnp */
+#define ISOPROTO_RAW 255 /* raw clnp */
#define ISOPROTO_MAX 256
#define ISO_PORT_RESERVED 1024
@@ -115,7 +116,7 @@ SOFTWARE.
/*
* Port/socket numbers: public use
*/
-#define ISO_PORT_PUBLIC 1024 /* high bit set --> public */
+#define ISO_PORT_PUBLIC 1024 /* high bit set --> public */
/*
* Network layer protocol identifiers
@@ -130,26 +131,28 @@ SOFTWARE.
#ifndef IN_CLASSA_NET
#include <netinet/in.h>
-#endif /* IN_CLASSA_NET */
+#endif /* IN_CLASSA_NET */
-/* The following looks like a sockaddr
- * to facilitate using tree lookup routines */
+/*
+ * The following looks like a sockaddr to facilitate using tree lookup
+ * routines
+ */
struct iso_addr {
- u_char isoa_len; /* length (in bytes) */
- char isoa_genaddr[20]; /* general opaque address */
+ u_char isoa_len; /* length (in bytes) */
+ char isoa_genaddr[20]; /* general opaque address */
};
struct sockaddr_iso {
- u_char siso_len; /* length */
- u_char siso_family; /* family */
- u_char siso_plen; /* presentation selector length */
- u_char siso_slen; /* session selector length */
- u_char siso_tlen; /* transport selector length */
- struct iso_addr siso_addr; /* network address */
- u_char siso_pad[6]; /* space for gosip v2 sels */
- /* makes struct 32 bytes long */
+ u_char siso_len; /* length */
+ u_char siso_family; /* family */
+ u_char siso_plen; /* presentation selector length */
+ u_char siso_slen; /* session selector length */
+ u_char siso_tlen; /* transport selector length */
+ struct iso_addr siso_addr; /* network address */
+ u_char siso_pad[6]; /* space for gosip v2 sels */
+ /* makes struct 32 bytes long */
};
#define siso_nlen siso_addr.isoa_len
#define siso_data siso_addr.isoa_genaddr
@@ -165,16 +168,12 @@ struct sockaddr_iso {
#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...*/
+#define AFI_SNA 0x00 /* SubNetwork Address; invalid really... */
#ifdef _KERNEL
-extern int iso_netmatch();
-extern int iso_hash();
-extern int iso_addrmatch();
-extern struct iso_ifaddr *iso_iaonnetof();
-extern struct domain isodomain;
-extern struct protosw isosw[];
+extern struct domain isodomain;
+extern struct protosw isosw[];
#define satosiso(sa) ((struct sockaddr_iso *)(sa))
#define sisotosa(siso) ((struct sockaddr *)(siso))
@@ -186,7 +185,7 @@ extern struct protosw isosw[];
__BEGIN_DECLS
struct iso_addr *iso_addr __P((const char *));
-char *iso_ntoa __P((const struct iso_addr *));
+char *iso_ntoa __P((const struct iso_addr *));
/* THESE DON'T EXIST YET */
struct hostent *iso_gethostbyname(), *iso_gethostbyaddr();