-/* $OpenBSD: ipx.h,v 1.4 1996/11/25 08:19:58 mickey Exp $ */
+/* $OpenBSD: ipx.h,v 1.5 1996/12/23 08:47:03 mickey Exp $ */
/*-
*
/* flags passed to ipx_outputfl as last parameter */
-#define IPX_FORWARDING 0x1 /* most of ipx header exists */
-#define IPX_ROUTETOIF 0x10 /* same as SO_DONTROUTE */
-#define IPX_ALLOWBROADCAST SO_BROADCAST /* can send broadcast packets */
+#define IPX_FORWARDING 0x1 /* most of ipx header exists */
+#define IPX_ROUTETOIF 0x10 /* same as SO_DONTROUTE */
+#define IPX_ALLOWBROADCAST SO_BROADCAST /* can send broadcast packets */
#define IPX_MAXHOPS 15
/* flags passed to get/set socket option */
-#define SO_HEADERS_ON_INPUT 1
-#define SO_HEADERS_ON_OUTPUT 2
-#define SO_DEFAULT_HEADERS 3
-#define SO_LAST_HEADER 4
-#define SO_IPXIP_ROUTE 5
-#define SO_SEQNO 6
-#define SO_ALL_PACKETS 7
+#define SO_HEADERS_ON_INPUT 1
+#define SO_HEADERS_ON_OUTPUT 2
+#define SO_DEFAULT_HEADERS 3
+#define SO_LAST_HEADER 4
+#define SO_IPXIP_ROUTE 5
+#define SO_SEQNO 6
+#define SO_ALL_PACKETS 7
#define SO_MTU 8
#define SO_IPXTUN_ROUTE 9
/*
* IPX addressing
*/
-#define IPX_HOSTADDRLEN 6
-#define IPX_NETADDRLEN 4
-#define XXX __attribute__((packed))
+#define IPX_HOSTADDRLEN 6
+#define IPX_NETADDRLEN 4
+#define XXX __attribute__((packed))
typedef
union ipx_host {
-/* $OpenBSD: ipx_input.c,v 1.3 1996/10/26 09:34:51 mickey Exp $ */
+/* $OpenBSD: ipx_input.c,v 1.4 1996/12/23 08:47:04 mickey Exp $ */
/*-
*
case PRC_HOSTDEAD:
case PRC_HOSTUNREACH:
sipx = (struct sockaddr_ipx *)arg;
- if (sipx->sipx_family != AF_IPX)
+ if (sipx == NULL || sipx->sipx_family != AF_IPX)
return NULL;
ipx = &sipx->sipx_addr;
break;
-/* $OpenBSD: ipx_usrreq.c,v 1.3 1996/11/25 08:20:01 mickey Exp $ */
+/* $OpenBSD: ipx_usrreq.c,v 1.4 1996/12/23 08:47:04 mickey Exp $ */
/*-
*
m->m_pkthdr.len -= sizeof (struct ipx);
m->m_data += sizeof (struct ipx);
}
- if (sbappendaddr(&ipxp->ipxp_socket->so_rcv, (struct sockaddr *)&ipx_ipx,
- m, (struct mbuf *)0) == 0)
+ if (sbappendaddr(&ipxp->ipxp_socket->so_rcv, sipxtosa(&ipx_ipx), m,
+ (struct mbuf *)0) == 0)
goto bad;
sorwakeup(ipxp->ipxp_socket);
return;
-/* $OpenBSD: spx_usrreq.c,v 1.4 1996/11/25 08:20:03 mickey Exp $ */
+/* $OpenBSD: spx_usrreq.c,v 1.5 1996/12/23 08:47:05 mickey Exp $ */
/*-
*
case PRC_HOSTDEAD:
case PRC_HOSTUNREACH:
sipx = (struct sockaddr_ipx *)arg;
- if (sipx->sipx_family != AF_IPX)
+ if (sipx == NULL || sipx->sipx_family != AF_IPX)
return NULL;
na = &sipx->sipx_addr;
break;
-/* $OpenBSD: idp_usrreq.c,v 1.2 1996/03/04 08:20:20 niklas Exp $ */
+/* $OpenBSD: idp_usrreq.c,v 1.3 1996/12/23 08:47:06 mickey Exp $ */
/* $NetBSD: idp_usrreq.c,v 1.9 1996/02/13 22:13:43 christos Exp $ */
/*
#include <netns/ns_error.h>
#include <machine/stdarg.h>
+
/*
* IDP protocol implementation.
*/
-struct sockaddr_ns idp_ns = { sizeof(idp_ns), AF_NS };
-
/*
* This may also be called for raw listeners.
*/
register struct nspcb *nsp;
register struct idp *idp = mtod(m, struct idp *);
struct ifnet *ifp = m->m_pkthdr.rcvif;
+ struct sockaddr_ns idp_ns = { sizeof(idp_ns), AF_NS };
va_list ap;
va_start(ap, m);
nsp = va_arg(ap, struct nspcb *);
va_end(ap);
- if (nsp==0)
+ if (nsp == NULL)
panic("No nspcb");
/*
* Construct sockaddr format source address.
-/* $OpenBSD: ns_input.c,v 1.2 1996/03/04 08:20:26 niklas Exp $ */
+
+/* $OpenBSD: ns_input.c,v 1.3 1996/12/23 08:47:07 mickey Exp $ */
/* $NetBSD: ns_input.c,v 1.9 1996/02/13 22:13:56 christos Exp $ */
/*
case PRC_HOSTDEAD:
case PRC_HOSTUNREACH:
sns = arg;
- if (sns->sns_family != AF_NS)
+ if (arg == NULL || sns->sns_family != AF_NS)
return NULL;
ns = &sns->sns_addr;
break;
-/* $OpenBSD: spp_usrreq.c,v 1.3 1996/04/21 22:30:14 deraadt Exp $ */
+/* $OpenBSD: spp_usrreq.c,v 1.4 1996/12/23 08:47:07 mickey Exp $ */
/* $NetBSD: spp_usrreq.c,v 1.9 1996/02/13 22:14:13 christos Exp $ */
/*
case PRC_HOSTDEAD:
case PRC_HOSTUNREACH:
sns = arg;
- if (sns->sns_family != AF_NS)
+ if (sns == NULL || sns->sns_family != AF_NS)
return NULL;
na = &sns->sns_addr;
break;