diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-04-24 08:46:21 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-04-24 08:46:21 +0000 |
commit | e998f4f20258b23dcb158014d7b5bd4331ce32f5 (patch) | |
tree | d779813bf36a526d460e6d3e473a0997ac80f8f3 | |
parent | 2ce8e160422d52c86414b4fba91b81f3f1b0f9ed (diff) |
Fix prototyping.
-rw-r--r-- | sys/netns/ns_ip.c | 22 | ||||
-rw-r--r-- | 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 <netns/ns_if.h> #include <netns/idp.h> +#include <machine/stdarg.h> + 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 *)); |