1 /* $FreeBSD: src/sys/netinet6/udp6_usrreq.c,v 1.6.2.13 2003/01/24 05:11:35 sam Exp $ */
2 /* $KAME: udp6_usrreq.c,v 1.27 2001/05/21 05:45:10 jinmei Exp $ */
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. Neither the name of the project nor the names of its contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * Copyright (c) 1982, 1986, 1989, 1993
35 * The Regents of the University of California. All rights reserved.
37 * Redistribution and use in source and binary forms, with or without
38 * modification, are permitted provided that the following conditions
40 * 1. Redistributions of source code must retain the above copyright
41 * notice, this list of conditions and the following disclaimer.
42 * 2. Redistributions in binary form must reproduce the above copyright
43 * notice, this list of conditions and the following disclaimer in the
44 * documentation and/or other materials provided with the distribution.
45 * 3. Neither the name of the University nor the names of its contributors
46 * may be used to endorse or promote products derived from this software
47 * without specific prior written permission.
49 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
50 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
51 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
52 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
53 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
55 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
57 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
58 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
61 * @(#)udp_var.h 8.1 (Berkeley) 6/10/93
65 #include "opt_inet6.h"
66 #include "opt_ipsec.h"
68 #include <sys/param.h>
69 #include <sys/kernel.h>
71 #include <sys/protosw.h>
72 #include <sys/socket.h>
73 #include <sys/socketvar.h>
74 #include <sys/sysctl.h>
75 #include <sys/errno.h>
77 #include <sys/systm.h>
78 #include <sys/syslog.h>
82 #include <sys/thread2.h>
83 #include <sys/socketvar2.h>
84 #include <sys/msgport2.h>
87 #include <net/route.h>
88 #include <net/if_types.h>
89 #include <net/netisr2.h>
91 #include <netinet/in.h>
92 #include <netinet/in_systm.h>
93 #include <netinet/ip.h>
94 #include <netinet/in_pcb.h>
95 #include <netinet/in_var.h>
96 #include <netinet/ip_var.h>
97 #include <netinet/udp.h>
98 #include <netinet/udp_var.h>
99 #include <netinet/ip6.h>
100 #include <netinet6/ip6_var.h>
101 #include <netinet6/in6_pcb.h>
102 #include <netinet/icmp6.h>
103 #include <netinet6/udp6_var.h>
104 #include <netinet6/ip6protosw.h>
107 #include <netinet6/ipsec.h>
108 #include <netinet6/ipsec6.h>
112 #include <netproto/ipsec/ipsec.h>
113 #include <netproto/ipsec/ipsec6.h>
114 #endif /* FAST_IPSEC */
117 * UDP protocol inplementation.
118 * Per RFC 768, August, 1980.
121 extern struct protosw inetsw[];
122 static int in6_mcmatch (struct inpcb *, struct in6_addr *, struct ifnet *);
125 in6_mcmatch(struct inpcb *in6p, struct in6_addr *ia6, struct ifnet *ifp)
127 struct ip6_moptions *im6o = in6p->in6p_moptions;
128 struct in6_multi_mship *imm;
133 for (imm = im6o->im6o_memberships.lh_first; imm != NULL;
134 imm = imm->i6mm_chain.le_next) {
136 imm->i6mm_maddr->in6m_ifp == ifp) &&
137 IN6_ARE_ADDR_EQUAL(&imm->i6mm_maddr->in6m_addr,
145 udp6_input(struct mbuf **mp, int *offp, int proto)
147 struct mbuf *m = *mp;
151 struct mbuf *opts = NULL;
154 struct sockaddr_in6 udp_in6;
157 IP6_EXTHDR_CHECK(m, off, sizeof(struct udphdr), IPPROTO_DONE);
159 ip6 = mtod(m, struct ip6_hdr *);
161 if (faithprefix_p != NULL && (*faithprefix_p)(&ip6->ip6_dst)) {
162 /* XXX send icmp6 host/port unreach? */
167 udp_stat.udps_ipackets++;
169 plen = ntohs(ip6->ip6_plen) - off + sizeof(*ip6);
170 uh = (struct udphdr *)((caddr_t)ip6 + off);
171 ulen = ntohs((u_short)uh->uh_ulen);
174 udp_stat.udps_badlen++;
179 * Checksum extended UDP header and data.
182 udp_stat.udps_nosum++;
183 else if (in6_cksum(m, IPPROTO_UDP, off, ulen) != 0) {
184 udp_stat.udps_badsum++;
188 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
192 * Deliver a multicast datagram to all sockets
193 * for which the local and remote addresses and ports match
194 * those of the incoming datagram. This allows more than
195 * one process to receive multicasts on the same port.
196 * (This really ought to be done for unicast datagrams as
197 * well, but that would cause problems with existing
198 * applications that open both address-specific sockets and
199 * a wildcard socket listening to the same port -- they would
200 * end up receiving duplicates of every unicast datagram.
201 * Those applications open the multiple sockets to overcome an
202 * inadequacy of the UDP socket interface, but for backwards
203 * compatibility we avoid the problem here rather than
204 * fixing the interface. Maybe 4.5BSD will remedy this?)
208 * In a case that laddr should be set to the link-local
209 * address (this happens in RIPng), the multicast address
210 * specified in the received packet does not match with
211 * laddr. To cure this situation, the matching is relaxed
212 * if the receiving interface is the same as one specified
213 * in the socket and if the destination multicast address
214 * matches one of the multicast groups specified in the socket.
218 * Construct sockaddr format source address.
220 init_sin6(&udp_in6, m); /* general init */
221 udp_in6.sin6_port = uh->uh_sport;
223 * KAME note: traditionally we dropped udpiphdr from mbuf here.
224 * We need udphdr for IPsec processing so we do that later.
228 * Locate pcb(s) for datagram.
229 * (Algorithm copied from raw_intr().)
232 LIST_FOREACH(in6p, &udbinfo.pcblisthead, inp_list) {
233 KKASSERT((in6p->inp_flags & INP_PLACEMARKER) == 0);
235 if (!(in6p->inp_vflag & INP_IPV6))
237 if (in6p->in6p_lport != uh->uh_dport)
239 if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_laddr)) {
240 if (!IN6_ARE_ADDR_EQUAL(&in6p->in6p_laddr,
242 !in6_mcmatch(in6p, &ip6->ip6_dst,
246 if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr)) {
247 if (!IN6_ARE_ADDR_EQUAL(&in6p->in6p_faddr,
249 in6p->in6p_fport != uh->uh_sport)
258 * Check AH/ESP integrity.
260 if (ipsec6_in_reject_so(m, last->inp_socket))
261 ipsec6stat.in_polvio++;
262 /* do not inject data into pcb */
267 * Check AH/ESP integrity.
269 if (ipsec6_in_reject(m, last))
272 #endif /* FAST_IPSEC */
273 if ((n = m_copy(m, 0, M_COPYALL)) != NULL) {
276 * m_copy(m, offset, ...) above.
277 * ssb_appendaddr() expects M_PKTHDR,
278 * and m_copy() will copy M_PKTHDR
279 * only if offset is 0.
281 so = last->in6p_socket;
282 if ((last->in6p_flags & IN6P_CONTROLOPTS) ||
283 (so->so_options & SO_TIMESTAMP)) {
284 ip6_savecontrol(last, &opts,
287 m_adj(n, off + sizeof(struct udphdr));
288 lwkt_gettoken(&so->so_rcv.ssb_token);
289 if (ssb_appendaddr(&so->so_rcv,
290 (struct sockaddr *)&udp_in6,
295 udp_stat.udps_fullsock++;
299 lwkt_reltoken(&so->so_rcv.ssb_token);
305 * Don't look for additional matches if this one does
306 * not have either the SO_REUSEPORT or SO_REUSEADDR
307 * socket options set. This heuristic avoids searching
308 * through all pcbs in the common case of a non-shared
309 * port. It assumes that an application will never
310 * clear these options after setting them.
312 if ((last->in6p_socket->so_options &
313 (SO_REUSEPORT | SO_REUSEADDR)) == 0)
319 * No matching pcb found; discard datagram.
320 * (No need to send an ICMP Port Unreachable
321 * for a broadcast or multicast datgram.)
323 udp_stat.udps_noport++;
324 udp_stat.udps_noportmcast++;
329 * Check AH/ESP integrity.
331 if (ipsec6_in_reject_so(m, last->inp_socket)) {
332 ipsec6stat.in_polvio++;
338 * Check AH/ESP integrity.
340 if (ipsec6_in_reject(m, last)) {
343 #endif /* FAST_IPSEC */
344 if (last->in6p_flags & IN6P_CONTROLOPTS
345 || last->in6p_socket->so_options & SO_TIMESTAMP)
346 ip6_savecontrol(last, &opts, ip6, m);
348 m_adj(m, off + sizeof(struct udphdr));
349 so = last->in6p_socket;
350 lwkt_gettoken(&so->so_rcv.ssb_token);
351 if (ssb_appendaddr(&so->so_rcv, (struct sockaddr *)&udp_in6,
353 udp_stat.udps_fullsock++;
354 lwkt_reltoken(&so->so_rcv.ssb_token);
358 lwkt_reltoken(&so->so_rcv.ssb_token);
362 * Locate pcb for datagram.
364 in6p = in6_pcblookup_hash(&udbinfo, &ip6->ip6_src, uh->uh_sport,
365 &ip6->ip6_dst, uh->uh_dport, 1,
369 char buf[INET6_ADDRSTRLEN];
371 strcpy(buf, ip6_sprintf(&ip6->ip6_dst));
373 "Connection attempt to UDP [%s]:%d from [%s]:%d\n",
374 buf, ntohs(uh->uh_dport),
375 ip6_sprintf(&ip6->ip6_src), ntohs(uh->uh_sport));
377 udp_stat.udps_noport++;
378 if (m->m_flags & M_MCAST) {
379 kprintf("UDP6: M_MCAST is set in a unicast packet.\n");
380 udp_stat.udps_noportmcast++;
383 icmp6_error(m, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOPORT, 0);
388 * Check AH/ESP integrity.
390 if (ipsec6_in_reject_so(m, in6p->in6p_socket)) {
391 ipsec6stat.in_polvio++;
397 * Check AH/ESP integrity.
399 if (ipsec6_in_reject(m, in6p)) {
402 #endif /* FAST_IPSEC */
405 * Construct sockaddr format source address.
406 * Stuff source address and datagram in user buffer.
408 init_sin6(&udp_in6, m); /* general init */
409 udp_in6.sin6_port = uh->uh_sport;
410 if (in6p->in6p_flags & IN6P_CONTROLOPTS
411 || in6p->in6p_socket->so_options & SO_TIMESTAMP)
412 ip6_savecontrol(in6p, &opts, ip6, m);
413 m_adj(m, off + sizeof(struct udphdr));
414 so = in6p->in6p_socket;
415 lwkt_gettoken(&so->so_rcv.ssb_token);
416 if (ssb_appendaddr(&so->so_rcv, (struct sockaddr *)&udp_in6,
418 udp_stat.udps_fullsock++;
419 lwkt_reltoken(&so->so_rcv.ssb_token);
423 lwkt_reltoken(&so->so_rcv.ssb_token);
434 udp6_ctlinput(netmsg_t msg)
436 int cmd = msg->ctlinput.nm_cmd;
437 struct sockaddr *sa = msg->ctlinput.nm_arg;
438 void *d = msg->ctlinput.nm_extra;
443 struct ip6ctlparam *ip6cp = NULL;
444 const struct sockaddr_in6 *sa6_src = NULL;
445 void (*notify) (struct inpcb *, int) = udp_notify;
446 struct udp_portonly {
451 if (sa->sa_family != AF_INET6 ||
452 sa->sa_len != sizeof(struct sockaddr_in6))
455 if ((unsigned)cmd >= PRC_NCMDS)
457 if (PRC_IS_REDIRECT(cmd))
458 notify = in6_rtchange, d = NULL;
459 else if (cmd == PRC_HOSTDEAD)
461 else if (inet6ctlerrmap[cmd] == 0)
464 /* if the parameter is from icmp6, decode it. */
466 ip6cp = (struct ip6ctlparam *)d;
468 ip6 = ip6cp->ip6c_ip6;
469 off = ip6cp->ip6c_off;
470 sa6_src = ip6cp->ip6c_src;
479 * XXX: We assume that when IPV6 is non NULL,
480 * M and OFF are valid.
483 /* check if we can safely examine src and dst ports */
484 if (m->m_pkthdr.len < off + sizeof(*uhp))
487 bzero(&uh, sizeof(uh));
488 m_copydata(m, off, sizeof(*uhp), (caddr_t)&uh);
490 in6_pcbnotify(&udbinfo.pcblisthead, sa, uh.uh_dport,
491 (struct sockaddr *)ip6cp->ip6c_src, uh.uh_sport,
494 in6_pcbnotify(&udbinfo.pcblisthead, sa, 0,
495 (const struct sockaddr *)sa6_src, 0,
499 lwkt_replymsg(&msg->ctlinput.base.lmsg, 0);
503 udp6_getcred(SYSCTL_HANDLER_ARGS)
505 struct sockaddr_in6 addrs[2];
509 error = priv_check(req->td, PRIV_ROOT);
513 if (req->newlen != sizeof(addrs))
515 if (req->oldlen != sizeof(struct ucred))
517 error = SYSCTL_IN(req, addrs, sizeof(addrs));
521 inp = in6_pcblookup_hash(&udbinfo, &addrs[1].sin6_addr,
523 &addrs[0].sin6_addr, addrs[0].sin6_port,
525 if (!inp || !inp->inp_socket) {
529 error = SYSCTL_OUT(req, inp->inp_socket->so_cred,
530 sizeof(struct ucred));
537 SYSCTL_PROC(_net_inet6_udp6, OID_AUTO, getcred, CTLTYPE_OPAQUE|CTLFLAG_RW,
539 udp6_getcred, "S,ucred", "Get the ucred of a UDP6 connection");
542 * NOTE: (so) is referenced from soabort*() and netmsg_pru_abort()
543 * will sofree() it when we return.
546 udp6_abort(netmsg_t msg)
548 struct socket *so = msg->abort.base.nm_so;
554 soisdisconnected(so);
556 udbinfo_barrier_set();
558 udbinfo_barrier_rem();
563 lwkt_replymsg(&msg->abort.base.lmsg, error);
567 udp6_attach(netmsg_t msg)
569 struct socket *so = msg->attach.base.nm_so;
570 struct pru_attach_info *ai = msg->attach.nm_ai;
580 if (so->so_snd.ssb_hiwat == 0 || so->so_rcv.ssb_hiwat == 0) {
581 error = soreserve(so, udp_sendspace, udp_recvspace,
587 udbinfo_barrier_set();
588 error = in_pcballoc(so, &udbinfo);
589 udbinfo_barrier_rem();
594 sosetport(so, netisr_cpuport(0));
595 inp = (struct inpcb *)so->so_pcb;
596 inp->inp_vflag |= INP_IPV6;
598 inp->inp_vflag |= INP_IPV4;
599 inp->in6p_hops = -1; /* use kernel default */
600 inp->in6p_cksum = -1; /* just to be sure */
603 * IPv4 TTL initialization is necessary for an IPv6 socket as well,
604 * because the socket may be bound to an IPv6 wildcard address,
605 * which may match an IPv4-mapped IPv6 address.
607 inp->inp_ip_ttl = ip_defttl;
610 lwkt_replymsg(&msg->attach.base.lmsg, error);
614 udp6_bind(netmsg_t msg)
616 struct socket *so =msg->bind.base.nm_so;
617 struct sockaddr *nam = msg->bind.nm_nam;
618 struct thread *td = msg->bind.nm_td;
619 struct sockaddr_in6 *sin6_p = (struct sockaddr_in6 *)nam;
629 inp->inp_vflag &= ~INP_IPV4;
630 inp->inp_vflag |= INP_IPV6;
631 if (!(inp->inp_flags & IN6P_IPV6_V6ONLY)) {
632 if (IN6_IS_ADDR_UNSPECIFIED(&sin6_p->sin6_addr))
633 inp->inp_vflag |= INP_IPV4;
634 else if (IN6_IS_ADDR_V4MAPPED(&sin6_p->sin6_addr)) {
635 struct sockaddr_in sin;
637 in6_sin6_2_sin(&sin, sin6_p);
638 inp->inp_vflag |= INP_IPV4;
639 inp->inp_vflag &= ~INP_IPV6;
641 error = in_pcbbind(inp, (struct sockaddr *)&sin, td);
648 error = in6_pcbbind(inp, nam, td);
651 if (IN6_IS_ADDR_UNSPECIFIED(&sin6_p->sin6_addr))
652 inp->inp_flags |= INP_WASBOUND_NOTANY;
654 udbinfo_barrier_set();
655 in_pcbinswildcardhash(inp);
656 udbinfo_barrier_rem();
659 lwkt_replymsg(&msg->bind.base.lmsg, error);
663 udp6_connect(netmsg_t msg)
665 struct socket *so = msg->connect.base.nm_so;
666 struct sockaddr *nam = msg->connect.nm_nam;
667 struct thread *td = msg->connect.nm_td;
671 udbinfo_barrier_set();
679 if (!(inp->inp_flags & IN6P_IPV6_V6ONLY)) {
680 struct sockaddr_in6 *sin6_p;
682 sin6_p = (struct sockaddr_in6 *)nam;
683 if (IN6_IS_ADDR_V4MAPPED(&sin6_p->sin6_addr)) {
684 struct sockaddr_in sin;
686 if (inp->inp_faddr.s_addr != INADDR_ANY) {
690 in6_sin6_2_sin(&sin, sin6_p);
692 if (inp->inp_flags & INP_WILDCARD)
693 in_pcbremwildcardhash(inp);
694 error = in_pcbconnect(inp, (struct sockaddr *)&sin, td);
697 inp->inp_vflag |= INP_IPV4;
698 inp->inp_vflag &= ~INP_IPV6;
704 if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) {
708 if (inp->inp_flags & INP_WILDCARD)
709 in_pcbremwildcardhash(inp);
710 if (!prison_remote_ip(td, nam)) {
711 error = EAFNOSUPPORT; /* IPv4 only jail */
715 error = in6_pcbconnect(inp, nam, td);
718 if (!ip6_v6only) { /* should be non mapped addr */
719 inp->inp_vflag &= ~INP_IPV4;
720 inp->inp_vflag |= INP_IPV6;
723 } else if (error == EAFNOSUPPORT) { /* connection dissolved */
725 * Follow traditional BSD behavior and retain
726 * the local port binding. But, fix the old misbehavior
727 * of overwriting any previously bound local address.
729 if (!(inp->inp_flags & INP_WASBOUND_NOTANY))
730 inp->in6p_laddr = kin6addr_any;
731 in_pcbinswildcardhash(inp);
734 udbinfo_barrier_rem();
735 lwkt_replymsg(&msg->connect.base.lmsg, error);
739 udp6_detach(netmsg_t msg)
741 struct socket *so = msg->detach.base.nm_so;
747 udbinfo_barrier_set();
749 udbinfo_barrier_rem();
754 lwkt_replymsg(&msg->detach.base.lmsg, error);
758 udp6_disconnect(netmsg_t msg)
760 struct socket *so = msg->disconnect.base.nm_so;
770 if (inp->inp_vflag & INP_IPV4) {
771 const struct pr_usrreqs *pru;
773 pru = inetsw[ip_protox[IPPROTO_UDP]].pr_usrreqs;
774 pru->pru_disconnect(msg); /* XXX on right port? */
778 if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) {
781 udbinfo_barrier_set();
782 in6_pcbdisconnect(inp);
783 udbinfo_barrier_rem();
784 soclrstate(so, SS_ISCONNECTED); /* XXX */
788 lwkt_replymsg(&msg->disconnect.base.lmsg, error);
792 udp6_send(netmsg_t msg)
794 struct socket *so = msg->send.base.nm_so;
795 struct mbuf *m = msg->send.nm_m;
796 struct sockaddr *addr = msg->send.nm_addr;
797 struct mbuf *control = msg->send.nm_control;
798 struct thread *td = msg->send.nm_td;
809 if (addr->sa_len != sizeof(struct sockaddr_in6)) {
813 if (addr->sa_family != AF_INET6) {
814 error = EAFNOSUPPORT;
821 struct sockaddr_in6 *sin6 = NULL;
824 hasv4addr = (inp->inp_vflag & INP_IPV4);
826 sin6 = (struct sockaddr_in6 *)addr;
827 hasv4addr = IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)
831 const struct pr_usrreqs *pru;
834 in6_sin6_2_sin_in_sock(addr);
835 pru = inetsw[ip_protox[IPPROTO_UDP]].pr_usrreqs;
837 /* msg invalid now */
842 error = udp6_output(inp, m, addr, control, td);
843 lwkt_replymsg(&msg->send.base.lmsg, error);
847 lwkt_replymsg(&msg->send.base.lmsg, error);
850 struct pr_usrreqs udp6_usrreqs = {
851 .pru_abort = udp6_abort,
852 .pru_accept = pr_generic_notsupp,
853 .pru_attach = udp6_attach,
854 .pru_bind = udp6_bind,
855 .pru_connect = udp6_connect,
856 .pru_connect2 = pr_generic_notsupp,
857 .pru_control = in6_control_dispatch,
858 .pru_detach = udp6_detach,
859 .pru_disconnect = udp6_disconnect,
860 .pru_listen = pr_generic_notsupp,
861 .pru_peeraddr = in6_mapped_peeraddr_dispatch,
862 .pru_rcvd = pr_generic_notsupp,
863 .pru_rcvoob = pr_generic_notsupp,
864 .pru_send = udp6_send,
865 .pru_sense = pru_sense_null,
866 .pru_shutdown = udp_shutdown,
867 .pru_sockaddr = in6_mapped_sockaddr_dispatch,
868 .pru_sosend = sosend,
869 .pru_soreceive = soreceive