diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-06-18 17:32:49 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-06-18 17:32:49 +0000 |
commit | 3e0485a346912994c93f111e1e01dbe37013880a (patch) | |
tree | 94078ad3aef8c72847caaed104975a61e385baa1 /sys/netinet | |
parent | 6f3edb3da4672239356c7ac3fbc3355585785290 (diff) |
sync with KAME udp6_output(). udp output logic is very different between
IPv4/v6 so the separation should make more sense.
TODO: remove IPv6 case from udp_output()
TODO: remove/comment out/#if 0 IPv4 mapped address cases
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/in_pcb.h | 3 | ||||
-rw-r--r-- | sys/netinet/udp_usrreq.c | 9 | ||||
-rw-r--r-- | sys/netinet/udp_var.h | 6 |
3 files changed, 15 insertions, 3 deletions
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 0ed2bc044aa..6ac62c01529 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in_pcb.h,v 1.24 2000/06/13 10:12:00 itojun Exp $ */ +/* $OpenBSD: in_pcb.h,v 1.25 2000/06/18 17:32:48 itojun Exp $ */ /* $NetBSD: in_pcb.h,v 1.14 1996/02/13 23:42:00 christos Exp $ */ /* @@ -271,6 +271,7 @@ struct in6_addr *in6_selectsrc __P((struct sockaddr_in6 *, struct route_in6 *, struct in6_addr *, int *)); int in6_selecthlim __P((struct inpcb *, struct ifnet *)); +int in6_pcbsetport __P((struct in6_addr *, struct inpcb *)); int in6_embedscope __P((struct in6_addr *, const struct sockaddr_in6 *, struct inpcb *, struct ifnet **)); int in6_recoverscope __P((struct sockaddr_in6 *, const struct in6_addr *, diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 090a52b1d5f..f57471be513 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp_usrreq.c,v 1.44 2000/06/13 11:47:24 itojun Exp $ */ +/* $OpenBSD: udp_usrreq.c,v 1.45 2000/06/18 17:32:48 itojun Exp $ */ /* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */ /* @@ -1165,7 +1165,14 @@ udp_usrreq(so, req, m, addr, control) if (error) return (error); #endif +#ifdef INET6 + if (inp->inp_flags & INP_IPV6) + return (udp6_output(inp, m, addr, control)); + else + return (udp_output(m, inp, addr, control)); +#else return (udp_output(m, inp, addr, control)); +#endif case PRU_ABORT: soisdisconnected(so); diff --git a/sys/netinet/udp_var.h b/sys/netinet/udp_var.h index e1e409e3985..b6064b0cc89 100644 --- a/sys/netinet/udp_var.h +++ b/sys/netinet/udp_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: udp_var.h,v 1.9 1999/12/08 06:50:20 itojun Exp $ */ +/* $OpenBSD: udp_var.h,v 1.10 2000/06/18 17:32:48 itojun Exp $ */ /* $NetBSD: udp_var.h,v 1.12 1996/02/13 23:44:41 christos Exp $ */ /* @@ -99,6 +99,10 @@ int udp6_usrreq __P((struct socket *, void *udp_ctlinput __P((int, struct sockaddr *, void *)); void udp_init __P((void)); void udp_input __P((struct mbuf *, ...)); +#ifdef INET6 +int udp6_output __P((struct inpcb *, struct mbuf *, struct mbuf *, + struct mbuf *)); +#endif int udp_output __P((struct mbuf *, ...)); int udp_sysctl __P((int *, u_int, void *, size_t *, void *, size_t)); int udp_usrreq __P((struct socket *, |