Wed Jan 20 22:12:22 2016 UTC ()
Give proper prototype to ip_output.


(riastradh)
diff -r1.247 -r1.248 src/sys/netinet/ip_output.c
diff -r1.109 -r1.110 src/sys/netinet/ip_var.h

cvs diff -r1.247 -r1.248 src/sys/netinet/ip_output.c (expand / switch to context diff)
--- src/sys/netinet/ip_output.c 2015/09/02 11:35:11 1.247
+++ src/sys/netinet/ip_output.c 2016/01/20 22:12:22 1.248
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_output.c,v 1.247 2015/09/02 11:35:11 ozaki-r Exp $	*/
+/*	$NetBSD: ip_output.c,v 1.248 2016/01/20 22:12:22 riastradh Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.247 2015/09/02 11:35:11 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.248 2016/01/20 22:12:22 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -332,7 +332,8 @@
  * The mbuf opt, if present, will not be freed.
  */
 int
-ip_output(struct mbuf *m0, ...)
+ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro, int flags,
+    struct ip_moptions *imo, struct socket *so)
 {
 	struct rtentry *rt;
 	struct ip *ip;
@@ -344,13 +345,8 @@
 	const struct sockaddr_in *dst;
 	struct in_ifaddr *ia;
 	int isbroadcast;
-	struct mbuf *opt;
-	struct route *ro;
-	int flags, sw_csum;
+	int sw_csum;
 	u_long mtu;
-	struct ip_moptions *imo;
-	struct socket *so;
-	va_list ap;
 #ifdef IPSEC
 	struct secpolicy *sp = NULL;
 #endif
@@ -365,13 +361,6 @@
 					 */
 
 	len = 0;
-	va_start(ap, m0);
-	opt = va_arg(ap, struct mbuf *);
-	ro = va_arg(ap, struct route *);
-	flags = va_arg(ap, int);
-	imo = va_arg(ap, struct ip_moptions *);
-	so = va_arg(ap, struct socket *);
-	va_end(ap);
 
 	MCLAIM(m, &ip_tx_mowner);
 

cvs diff -r1.109 -r1.110 src/sys/netinet/ip_var.h (expand / switch to context diff)
--- src/sys/netinet/ip_var.h 2016/01/20 22:02:54 1.109
+++ src/sys/netinet/ip_var.h 2016/01/20 22:12:22 1.110
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_var.h,v 1.109 2016/01/20 22:02:54 riastradh Exp $	*/
+/*	$NetBSD: ip_var.h,v 1.110 2016/01/20 22:12:22 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -210,7 +210,8 @@
 void	 ip_freemoptions(struct ip_moptions *);
 int	 ip_optcopy(struct ip *, struct ip *);
 u_int	 ip_optlen(struct inpcb *);
-int	 ip_output(struct mbuf *, ...);
+int	 ip_output(struct mbuf *, struct mbuf *, struct route *, int,
+	    struct ip_moptions *, struct socket *);
 int	 ip_fragment(struct mbuf *, struct ifnet *, u_long);
 
 void	 ip_reass_init(void);