Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet Give proper prototype to ip_output.



details:   https://anonhg.NetBSD.org/src/rev/1e9dcb280c73
branches:  trunk
changeset: 343057:1e9dcb280c73
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jan 20 22:12:22 2016 +0000

description:
Give proper prototype to ip_output.

diffstat:

 sys/netinet/ip_output.c |  21 +++++----------------
 sys/netinet/ip_var.h    |   5 +++--
 2 files changed, 8 insertions(+), 18 deletions(-)

diffs (76 lines):

diff -r 3158d39066ad -r 1e9dcb280c73 sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c   Wed Jan 20 22:11:23 2016 +0000
+++ b/sys/netinet/ip_output.c   Wed Jan 20 22:12:22 2016 +0000
@@ -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);
 
diff -r 3158d39066ad -r 1e9dcb280c73 sys/netinet/ip_var.h
--- a/sys/netinet/ip_var.h      Wed Jan 20 22:11:23 2016 +0000
+++ b/sys/netinet/ip_var.h      Wed Jan 20 22:12:22 2016 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index