From f928a7ec7e94d2a1d65a194f88fb4c00a2bdea89 Mon Sep 17 00:00:00 2001 From: mickey Date: Wed, 24 Apr 1996 08:46:19 +0000 Subject: [PATCH] Fix prototyping. --- sys/netns/ns_ip.c | 22 +++++++++++++++------- sys/netns/ns_var.h | 4 ++-- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/sys/netns/ns_ip.c b/sys/netns/ns_ip.c index a36320a2268..c96a92e13b6 100644 --- a/sys/netns/ns_ip.c +++ b/sys/netns/ns_ip.c @@ -1,4 +1,4 @@ -/* $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 $ */ /* @@ -65,6 +65,8 @@ #include #include +#include + struct ifnet_en { struct ifnet ifen_ifnet; struct route ifen_route; @@ -75,6 +77,7 @@ struct ifnet_en { int nsipoutput(), nsipioctl(); void nsipstart(); +void nsip_rtchange __P((register struct in_addr *dst)); #define LOMTU (1024+512); struct ifnet nsipif; @@ -156,14 +159,19 @@ struct mbuf *nsip_badlen; 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) { @@ -348,9 +356,9 @@ nsip_route(m) 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); } diff --git a/sys/netns/ns_var.h b/sys/netns/ns_var.h index dae424449a8..cb53c35f7c9 100644 --- a/sys/netns/ns_var.h +++ b/sys/netns/ns_var.h @@ -1,4 +1,4 @@ -/* $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; @@ -42,7 +42,7 @@ void ns_watch_output __P((struct mbuf *, struct ifnet *)); /* 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 *)); -- 2.20.1