Module Name: src Committed By: maxv Date: Fri Sep 7 06:13:14 UTC 2018
Modified Files: src/sys/net: raw_cb.h raw_usrreq.c Log Message: Make raw_input non-variadic. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/net/raw_cb.h cvs rdiff -u -r1.61 -r1.62 src/sys/net/raw_usrreq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/raw_cb.h diff -u src/sys/net/raw_cb.h:1.29 src/sys/net/raw_cb.h:1.30 --- src/sys/net/raw_cb.h:1.29 Fri May 11 09:43:59 2018 +++ src/sys/net/raw_cb.h Fri Sep 7 06:13:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_cb.h,v 1.29 2018/05/11 09:43:59 roy Exp $ */ +/* $NetBSD: raw_cb.h,v 1.30 2018/09/07 06:13:14 maxv Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -65,7 +65,8 @@ int raw_attach(struct socket *, int, str void *raw_ctlinput(int, const struct sockaddr *, void *); void raw_detach(struct socket *); void raw_disconnect(struct rawcb *); -void raw_input(struct mbuf *, ...); +void raw_input(struct mbuf *, struct sockproto *, struct sockaddr *, + struct sockaddr *, struct rawcbhead *); int raw_usrreq(struct socket *, int, struct mbuf *, struct mbuf *, struct mbuf *, struct lwp *); void raw_setsockaddr(struct rawcb *, struct sockaddr *); Index: src/sys/net/raw_usrreq.c diff -u src/sys/net/raw_usrreq.c:1.61 src/sys/net/raw_usrreq.c:1.62 --- src/sys/net/raw_usrreq.c:1.61 Wed May 9 06:35:10 2018 +++ src/sys/net/raw_usrreq.c Fri Sep 7 06:13:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_usrreq.c,v 1.61 2018/05/09 06:35:10 maxv Exp $ */ +/* $NetBSD: raw_usrreq.c,v 1.62 2018/09/07 06:13:14 maxv Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: raw_usrreq.c,v 1.61 2018/05/09 06:35:10 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_usrreq.c,v 1.62 2018/09/07 06:13:14 maxv Exp $"); #include <sys/param.h> #include <sys/mbuf.h> @@ -65,22 +65,12 @@ equal(const struct sockaddr *a1, const s * If nothing exists for this packet, drop it. */ void -raw_input(struct mbuf *m0, ...) +raw_input(struct mbuf *m0, struct sockproto *proto, struct sockaddr *src, + struct sockaddr *dst, struct rawcbhead *rawcbhead) { struct rawcb *rp; struct mbuf *m = m0; struct socket *last; - va_list ap; - struct sockproto *proto; - struct sockaddr *src, *dst; - struct rawcbhead *rawcbhead; - - va_start(ap, m0); - proto = va_arg(ap, struct sockproto *); - src = va_arg(ap, struct sockaddr *); - dst = va_arg(ap, struct sockaddr *); - rawcbhead = va_arg(ap, struct rawcbhead *); - va_end(ap); last = NULL; LIST_FOREACH(rp, rawcbhead, rcb_list) {