-/* $OpenBSD: ns_ip.c,v 1.2 1996/03/04 08:20:27 niklas Exp $ */
+/* $OpenBSD: ns_ip.c,v 1.3 1996/04/24 08:46:19 mickey Exp $ */
/* $NetBSD: ns_ip.c,v 1.14 1996/02/13 22:13:58 christos Exp $ */
/*
#include <netns/ns_if.h>
#include <netns/idp.h>
+#include <machine/stdarg.h>
+
struct ifnet_en {
struct ifnet ifen_ifnet;
struct route ifen_route;
int nsipoutput(), nsipioctl();
void nsipstart();
+void nsip_rtchange __P((register struct in_addr *dst));
#define LOMTU (1024+512);
struct ifnet nsipif;
struct mbuf *nsip_lastin;
int nsip_hold_input;
-idpip_input(m, ifp)
- register struct mbuf *m;
- struct ifnet *ifp;
+void
+idpip_input(struct mbuf *m, ...)
{
+ struct ifnet *ifp;
register struct ip *ip;
register struct idp *idp;
register struct ifqueue *ifq = &nsintrq;
int len, s;
+ va_list ap;
+
+ va_start(ap, m);
+ ifp = va_arg(ap, struct ifnet *);
+ va_end(ap);
if (nsip_hold_input) {
if (nsip_lastin) {
ia = ia->ia_list.tqe_next)
if (ia->ia_ifp == ifp)
break;
- if (ia == 0)
- ia = in_ifaddr;
- if (ia == 0) {
+ if (ia == NULL)
+ ia = in_ifaddr.tqh_first;
+ if (ia == NULL) {
RTFREE(ro.ro_rt);
return (EADDRNOTAVAIL);
}
-/* $OpenBSD: ns_var.h,v 1.2 1996/04/21 22:30:13 deraadt Exp $ */
+/* $OpenBSD: ns_var.h,v 1.3 1996/04/24 08:46:20 mickey Exp $ */
#ifdef _KERNEL
struct socket;
/* ns_ip.c */
struct ifnet_en *nsipattach __P((void));
int nsipioctl __P((struct ifnet *, u_long, caddr_t));
-int idpip_input __P((struct mbuf *, struct ifnet *));
+void idpip_input __P((struct mbuf *, ...));
int nsipoutput __P((struct ifnet_en *, struct mbuf *, struct sockaddr *));
void nsipstart __P((struct ifnet *));
int nsip_route __P((struct mbuf *));