-/* $OpenBSD: udp_usrreq.c,v 1.183 2014/04/21 12:22:26 henning Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.184 2014/04/23 12:25:35 mpi Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
struct inpcbtable udbtable;
struct udpstat udpstat;
-void udp_detach(struct inpcb *);
-void udp_notify(struct inpcb *, int);
+int udp_output(struct inpcb *, struct mbuf *, struct mbuf *, struct mbuf *);
+void udp_detach(struct inpcb *);
+void udp_notify(struct inpcb *, int);
-#ifndef UDBHASHSIZE
+#ifndef UDBHASHSIZE
#define UDBHASHSIZE 128
#endif
int udbhashsize = UDBHASHSIZE;
}
int
-udp_output(struct mbuf *m, ...)
+udp_output(struct inpcb *inp, struct mbuf *m, struct mbuf *addr,
+ struct mbuf *control)
{
- struct inpcb *inp;
- struct mbuf *addr, *control;
struct sockaddr_in *sin = NULL;
struct udpiphdr *ui;
u_int32_t ipsecflowinfo = 0;
int len = m->m_pkthdr.len;
struct in_addr *laddr;
int error = 0;
- va_list ap;
-
- va_start(ap, m);
- inp = va_arg(ap, struct inpcb *);
- addr = va_arg(ap, struct mbuf *);
- control = va_arg(ap, struct mbuf *);
- va_end(ap);
#ifdef DIAGNOSTIC
if ((inp->inp_flags & INP_IPV6) != 0)
- panic("IPv6 inpcb to udp_output");
+ panic("IPv6 inpcb to %s", __func__);
#endif
/*
if (inp->inp_flags & INP_IPV6)
return (udp6_output(inp, m, addr, control));
else
- return (udp_output(m, inp, addr, control));
+ return (udp_output(inp, m, addr, control));
#else
- return (udp_output(m, inp, addr, control));
+ return (udp_output(inp, m, addr, control));
#endif
case PRU_ABORT:
-/* $OpenBSD: udp_var.h,v 1.25 2014/01/25 10:13:53 deraadt Exp $ */
+/* $OpenBSD: udp_var.h,v 1.26 2014/04/23 12:25:35 mpi Exp $ */
/* $NetBSD: udp_var.h,v 1.12 1996/02/13 23:44:41 christos Exp $ */
/*
int udp6_output(struct inpcb *, struct mbuf *, struct mbuf *,
struct mbuf *);
#endif /* INET6 */
-int udp_output(struct mbuf *, ...);
int udp_sysctl(int *, u_int, void *, size_t *, void *, size_t);
int udp_usrreq(struct socket *,
int, struct mbuf *, struct mbuf *, struct mbuf *, struct proc *);