2 * Copyright (c) 2006 Apple Computer, Inc. All Rights Reserved.
4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
31 * Copyright (c) 1982, 1986, 1988, 1993
32 * The Regents of the University of California. All rights reserved.
34 * Redistribution and use in source and binary forms, with or without
35 * modification, are permitted provided that the following conditions
37 * 1. Redistributions of source code must retain the above copyright
38 * notice, this list of conditions and the following disclaimer.
39 * 2. Redistributions in binary form must reproduce the above copyright
40 * notice, this list of conditions and the following disclaimer in the
41 * documentation and/or other materials provided with the distribution.
42 * 3. All advertising materials mentioning features or use of this software
43 * must display the following acknowledgement:
44 * This product includes software developed by the University of
45 * California, Berkeley and its contributors.
46 * 4. Neither the name of the University nor the names of its contributors
47 * may be used to endorse or promote products derived from this software
48 * without specific prior written permission.
50 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
51 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
52 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
53 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
54 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
55 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
56 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
57 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
58 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
59 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
62 * $FreeBSD: src/sys/netinet/ip_divert.c,v 1.98 2004/08/17 22:05:54 andre Exp $
66 #error "IPDIVERT requires INET."
69 #include <sys/param.h>
70 #include <sys/kernel.h>
71 #include <sys/malloc.h>
73 #include <sys/socket.h>
74 #include <sys/domain.h>
75 #include <sys/protosw.h>
76 #include <sys/socketvar.h>
77 #include <sys/sysctl.h>
78 #include <sys/systm.h>
83 #include <net/route.h>
85 #include <netinet/in.h>
86 #include <netinet/in_systm.h>
87 #include <netinet/ip.h>
88 #include <netinet/in_pcb.h>
89 #include <netinet/in_var.h>
90 #include <netinet/ip_var.h>
91 #include <netinet/ip_fw.h>
92 #include <netinet/ip_divert.h>
94 #include <kern/zalloc.h>
101 * Allocate enough space to hold a full IP packet
103 #define DIVSNDQ (65536 + 100)
104 #define DIVRCVQ (65536 + 100)
107 * Divert sockets work in conjunction with ipfw, see the divert(4)
108 * manpage for features.
109 * Internally, packets selected by ipfw in ip_input() or ip_output(),
110 * and never diverted before, are passed to the input queue of the
111 * divert socket with a given 'divert_port' number (as specified in
112 * the matching ipfw rule), and they are tagged with a 16 bit cookie
113 * (representing the rule number of the matching ipfw rule), which
114 * is passed to process reading from the socket.
116 * Packets written to the divert socket are again tagged with a cookie
117 * (usually the same as above) and a destination address.
118 * If the destination address is INADDR_ANY then the packet is
119 * treated as outgoing and sent to ip_output(), otherwise it is
120 * treated as incoming and sent to ip_input().
121 * In both cases, the packet is tagged with the cookie.
123 * On reinjection, processing in ip_input() and ip_output()
124 * will be exactly the same as for the original packet, except that
125 * ipfw processing will start at the rule number after the one
126 * written in the cookie (so, tagging a packet with a cookie of 0
127 * will cause it to be effectively considered as a standard packet).
130 /* Internal variables */
131 static struct inpcbhead divcb
;
132 static struct inpcbinfo divcbinfo
;
134 static u_long div_sendspace
= DIVSNDQ
; /* XXX sysctl ? */
135 static u_long div_recvspace
= DIVRCVQ
; /* XXX sysctl ? */
137 /* Optimization: have this preinitialized */
138 static struct sockaddr_in divsrc
= { sizeof(divsrc
), AF_INET
, };
140 /* Internal functions */
141 static int div_output(struct socket
*so
,
142 struct mbuf
*m
, struct sockaddr
*addr
, struct mbuf
*control
);
144 extern int load_ipfw(void);
146 * Initialize divert connection block queue.
151 struct inpcbinfo
*pcbinfo
;
153 divcbinfo
.listhead
= &divcb
;
155 * XXX We don't use the hash list for divert IP, but it's easier
156 * to allocate a one entry hash list than it is to check all
157 * over the place for hashbase == NULL.
159 divcbinfo
.hashbase
= hashinit(1, M_PCB
, &divcbinfo
.hashmask
);
160 divcbinfo
.porthashbase
= hashinit(1, M_PCB
, &divcbinfo
.porthashmask
);
161 divcbinfo
.ipi_zone
= (void *) zinit(sizeof(struct inpcb
),(maxsockets
* sizeof(struct inpcb
)),
163 pcbinfo
= &divcbinfo
;
165 * allocate lock group attribute and group for udp pcb mutexes
167 pcbinfo
->mtx_grp_attr
= lck_grp_attr_alloc_init();
169 pcbinfo
->mtx_grp
= lck_grp_alloc_init("divcb", pcbinfo
->mtx_grp_attr
);
172 * allocate the lock attribute for divert pcb mutexes
174 pcbinfo
->mtx_attr
= lck_attr_alloc_init();
175 lck_attr_setdefault(pcbinfo
->mtx_attr
);
177 if ((pcbinfo
->mtx
= lck_rw_alloc_init(pcbinfo
->mtx_grp
, pcbinfo
->mtx_attr
)) == NULL
)
178 return; /* pretty much dead if this fails... */
186 * IPPROTO_DIVERT is not a real IP protocol; don't allow any packets
187 * with that protocol number to enter the system from the outside.
190 div_input(struct mbuf
*m
, __unused
int off
)
192 ipstat
.ips_noproto
++;
197 * Divert a packet by passing it up to the divert socket at port 'port'.
199 * Setup generic address and protocol structures for div_input routine,
200 * then pass them along with mbuf chain.
201 * ###LOCK called in ip_mutex from ip_output/ip_input
204 divert_packet(struct mbuf
*m
, int incoming
, int port
, int rule
)
212 KASSERT(port
!= 0, ("%s: port=0", __FUNCTION__
));
214 divsrc
.sin_port
= rule
; /* record matching rule */
217 if (m
->m_len
< sizeof(struct ip
) &&
218 (m
= m_pullup(m
, sizeof(struct ip
))) == 0) {
221 ip
= mtod(m
, struct ip
*);
224 * Record receive interface address, if any.
225 * But only for incoming packets.
227 divsrc
.sin_addr
.s_addr
= 0;
232 KASSERT((m
->m_flags
& M_PKTHDR
), ("%s: !PKTHDR", __FUNCTION__
));
234 /* Find IP address for receive interface */
235 ifnet_lock_shared(m
->m_pkthdr
.rcvif
);
236 TAILQ_FOREACH(ifa
, &m
->m_pkthdr
.rcvif
->if_addrhead
, ifa_link
) {
237 if (ifa
->ifa_addr
== NULL
)
239 if (ifa
->ifa_addr
->sa_family
!= AF_INET
)
242 ((struct sockaddr_in
*) ifa
->ifa_addr
)->sin_addr
;
245 ifnet_lock_done(m
->m_pkthdr
.rcvif
);
248 * Record the incoming interface name whenever we have one.
250 bzero(&divsrc
.sin_zero
, sizeof(divsrc
.sin_zero
));
251 if (m
->m_pkthdr
.rcvif
) {
253 * Hide the actual interface name in there in the
254 * sin_zero array. XXX This needs to be moved to a
255 * different sockaddr type for divert, e.g.
256 * sockaddr_div with multiple fields like
257 * sockaddr_dl. Presently we have only 7 bytes
258 * but that will do for now as most interfaces
259 * are 4 or less + 2 or less bytes for unit.
260 * There is probably a faster way of doing this,
261 * possibly taking it from the sockaddr_dl on the iface.
262 * This solves the problem of a P2P link and a LAN interface
263 * having the same address, which can result in the wrong
264 * interface being assigned to the packet when fed back
265 * into the divert socket. Theoretically if the daemon saves
266 * and re-uses the sockaddr_in as suggested in the man pages,
267 * this iface name will come along for the ride.
268 * (see div_output for the other half of this.)
270 snprintf(divsrc
.sin_zero
, sizeof(divsrc
.sin_zero
),
271 "%s%d", m
->m_pkthdr
.rcvif
->if_name
,
272 m
->m_pkthdr
.rcvif
->if_unit
);
275 /* Put packet on socket queue, if any */
277 nport
= htons((u_int16_t
)port
);
278 lck_rw_lock_shared(divcbinfo
.mtx
);
279 LIST_FOREACH(inp
, &divcb
, inp_list
) {
280 if (inp
->inp_lport
== nport
)
281 sa
= inp
->inp_socket
;
287 if (sbappendaddr(&sa
->so_rcv
, (struct sockaddr
*)&divsrc
,
288 m
, (struct mbuf
*)0, &error
) != 0)
290 socket_unlock(sa
, 1);
293 ipstat
.ips_noproto
++;
294 ipstat
.ips_delivered
--;
296 lck_rw_done(divcbinfo
.mtx
);
300 * Deliver packet back into the IP processing machinery.
302 * If no address specified, or address is 0.0.0.0, send to ip_output();
303 * otherwise, send to ip_input() and mark as having been received on
304 * the interface with that address.
305 * ###LOCK called in inet_proto mutex when from div_send.
308 div_output(so
, m
, addr
, control
)
310 register struct mbuf
*m
;
311 struct sockaddr
*addr
;
312 struct mbuf
*control
;
314 register struct inpcb
*const inp
= sotoinpcb(so
);
315 register struct ip
*const ip
= mtod(m
, struct ip
*);
316 struct sockaddr_in
*sin
= (struct sockaddr_in
*)addr
;
320 m_freem(control
); /* XXX */
322 /* Loopback avoidance and state recovery */
325 struct divert_tag
*dt
;
327 char *c
= sin
->sin_zero
;
329 mtag
= m_tag_alloc(KERNEL_MODULE_TAG_ID
, KERNEL_TAG_TYPE_DIVERT
,
330 sizeof(struct divert_tag
), M_NOWAIT
);
335 dt
= (struct divert_tag
*)(mtag
+1);
337 dt
->cookie
= sin
->sin_port
;
338 m_tag_prepend(m
, mtag
);
341 * Find receive interface with the given name or IP address.
342 * The name is user supplied data so don't trust it's size or
343 * that it is zero terminated. The name has priority.
344 * We are presently assuming that the sockaddr_in
345 * has not been replaced by a sockaddr_div, so we limit it
346 * to 16 bytes in total. the name is stuffed (if it exists)
347 * in the sin_zero[] field.
349 while (*c
++ && (len
++ < sizeof(sin
->sin_zero
)));
350 if ((len
> 0) && (len
< sizeof(sin
->sin_zero
)))
351 m
->m_pkthdr
.rcvif
= ifunit(sin
->sin_zero
);
354 /* Reinject packet into the system as incoming or outgoing */
355 if (!sin
|| sin
->sin_addr
.s_addr
== 0) {
357 * Don't allow both user specified and setsockopt options,
358 * and don't allow packet length sizes that will crash
360 if (((ip
->ip_hl
!= (sizeof (*ip
) >> 2)) && inp
->inp_options
) ||
361 ((u_short
)ntohs(ip
->ip_len
) > m
->m_pkthdr
.len
)) {
366 /* Convert fields to host order for ip_output() */
370 /* Send packet to output processing */
371 ipstat
.ips_rawout
++; /* XXX */
372 socket_unlock(so
, 0);
374 inp
->inp_options
, &inp
->inp_route
,
375 (so
->so_options
& SO_DONTROUTE
) |
376 IP_ALLOWBROADCAST
| IP_RAWOUTPUT
,
382 /* If no luck with the name above. check by IP address. */
383 if (m
->m_pkthdr
.rcvif
== NULL
) {
385 * Make sure there are no distractions
386 * for ifa_ifwithaddr. Clear the port and the ifname.
387 * Maybe zap all 8 bytes at once using a 64bit write?
389 bzero(sin
->sin_zero
, sizeof(sin
->sin_zero
));
390 /* *((u_int64_t *)sin->sin_zero) = 0; */ /* XXX ?? */
392 if (!(ifa
= ifa_ifwithaddr((struct sockaddr
*) sin
))) {
393 error
= EADDRNOTAVAIL
;
396 m
->m_pkthdr
.rcvif
= ifa
->ifa_ifp
;
400 if ((~IF_HWASSIST_CSUM_FLAGS(m
->m_pkthdr
.rcvif
->if_hwassist
) &
401 m
->m_pkthdr
.csum_flags
) == 0) {
402 if (m
->m_pkthdr
.csum_flags
& CSUM_DELAY_DATA
) {
403 m
->m_pkthdr
.csum_flags
&= ~CSUM_DELAY_DATA
;
405 m
->m_pkthdr
.csum_flags
|=
406 CSUM_DATA_VALID
| CSUM_PSEUDO_HDR
|
407 CSUM_IP_CHECKED
| CSUM_IP_VALID
;
408 m
->m_pkthdr
.csum_data
= 0xffff;
410 else if (m
->m_pkthdr
.csum_flags
& CSUM_DELAY_DATA
) {
414 hlen
= IP_VHL_HL(ip
->ip_vhl
) << 2;
416 hlen
= ip
->ip_hl
<< 2;
419 m
->m_pkthdr
.csum_flags
&= ~CSUM_DELAY_DATA
;
420 ip
->ip_sum
= in_cksum(m
, hlen
);
423 /* Send packet to input processing */
424 proto_inject(PF_INET
, m
);
435 div_attach(struct socket
*so
, int proto
, struct proc
*p
)
444 if (p
&& (error
= proc_suser(p
)) != 0)
447 error
= soreserve(so
, div_sendspace
, div_recvspace
);
450 error
= in_pcballoc(so
, &divcbinfo
, p
);
453 inp
= (struct inpcb
*)so
->so_pcb
;
454 inp
->inp_ip_p
= proto
;
455 inp
->inp_vflag
|= INP_IPV4
;
456 inp
->inp_flags
|= INP_HDRINCL
;
457 /* The socket is always "connected" because
458 we always know "where" to send the packet */
459 so
->so_state
|= SS_ISCONNECTED
;
461 #ifdef MORE_DICVLOCK_DEBUG
462 printf("div_attach: so=%x sopcb=%x lock=%x ref=%x\n",
463 so
, so
->so_pcb
, ((struct inpcb
*)so
->so_pcb
)->inpcb_mtx
, so
->so_usecount
);
469 div_detach(struct socket
*so
)
473 #ifdef MORE_DICVLOCK_DEBUG
474 printf("div_detach: so=%x sopcb=%x lock=%x ref=%x\n",
475 so
, so
->so_pcb
, ((struct inpcb
*)so
->so_pcb
)->inpcb_mtx
, so
->so_usecount
);
479 panic("div_detach: so=%x null inp\n", so
);
481 inp
->inp_state
= INPCB_STATE_DEAD
;
486 div_abort(struct socket
*so
)
488 soisdisconnected(so
);
489 return div_detach(so
);
493 div_disconnect(struct socket
*so
)
495 if ((so
->so_state
& SS_ISCONNECTED
) == 0)
497 return div_abort(so
);
501 div_bind(struct socket
*so
, struct sockaddr
*nam
, struct proc
*p
)
507 /* in_pcbbind assumes that the socket is a sockaddr_in
508 * and in_pcbbind requires a valid address. Since divert
509 * sockets don't we need to make sure the address is
510 * filled in properly.
511 * XXX -- divert should not be abusing in_pcbind
512 * and should probably have its own family.
514 if (nam
->sa_family
!= AF_INET
) {
515 error
= EAFNOSUPPORT
;
517 ((struct sockaddr_in
*)nam
)->sin_addr
.s_addr
= INADDR_ANY
;
518 error
= in_pcbbind(inp
, nam
, p
);
524 div_shutdown(struct socket
*so
)
531 div_send(struct socket
*so
, __unused
int flags
, struct mbuf
*m
, struct sockaddr
*nam
,
532 struct mbuf
*control
, __unused
struct proc
*p
)
534 /* Packet must have a header (but that's about it) */
535 if (m
->m_len
< sizeof (struct ip
) &&
536 (m
= m_pullup(m
, sizeof (struct ip
))) == 0) {
537 ipstat
.ips_toosmall
++;
543 return div_output(so
, m
, nam
, control
);
547 div_pcblist SYSCTL_HANDLER_ARGS
550 struct inpcb
*inp
, **inp_list
;
555 * The process of preparing the TCB list is too time-consuming and
556 * resource-intensive to repeat twice on every request.
558 lck_rw_lock_exclusive(divcbinfo
.mtx
);
559 if (req
->oldptr
== USER_ADDR_NULL
) {
560 n
= divcbinfo
.ipi_count
;
561 req
->oldidx
= 2 * (sizeof xig
)
562 + (n
+ n
/8) * sizeof(struct xinpcb
);
563 lck_rw_done(divcbinfo
.mtx
);
567 if (req
->newptr
!= USER_ADDR_NULL
) {
568 lck_rw_done(divcbinfo
.mtx
);
573 * OK, now we're committed to doing something.
575 gencnt
= divcbinfo
.ipi_gencnt
;
576 n
= divcbinfo
.ipi_count
;
578 bzero(&xig
, sizeof(xig
));
579 xig
.xig_len
= sizeof xig
;
581 xig
.xig_gen
= gencnt
;
582 xig
.xig_sogen
= so_gencnt
;
583 error
= SYSCTL_OUT(req
, &xig
, sizeof xig
);
585 lck_rw_done(divcbinfo
.mtx
);
589 inp_list
= _MALLOC(n
* sizeof *inp_list
, M_TEMP
, M_WAITOK
);
591 lck_rw_done(divcbinfo
.mtx
);
595 for (inp
= LIST_FIRST(divcbinfo
.listhead
), i
= 0; inp
&& i
< n
;
596 inp
= LIST_NEXT(inp
, inp_list
)) {
598 if (inp
->inp_gencnt
<= gencnt
&& inp
->inp_state
!= INPCB_STATE_DEAD
)
600 if (inp
->inp_gencnt
<= gencnt
&& !prison_xinpcb(req
->p
, inp
))
607 for (i
= 0; i
< n
; i
++) {
609 if (inp
->inp_gencnt
<= gencnt
&& inp
->inp_state
!= INPCB_STATE_DEAD
) {
612 bzero(&xi
, sizeof(xi
));
613 xi
.xi_len
= sizeof xi
;
614 /* XXX should avoid extra copy */
615 inpcb_to_compat(inp
, &xi
.xi_inp
);
617 sotoxsocket(inp
->inp_socket
, &xi
.xi_socket
);
618 error
= SYSCTL_OUT(req
, &xi
, sizeof xi
);
623 * Give the user an updated idea of our state.
624 * If the generation differs from what we told
625 * her before, she knows that something happened
626 * while we were processing this request, and it
627 * might be necessary to retry.
629 bzero(&xig
, sizeof(xig
));
630 xig
.xig_len
= sizeof xig
;
631 xig
.xig_gen
= divcbinfo
.ipi_gencnt
;
632 xig
.xig_sogen
= so_gencnt
;
633 xig
.xig_count
= divcbinfo
.ipi_count
;
634 error
= SYSCTL_OUT(req
, &xig
, sizeof xig
);
636 FREE(inp_list
, M_TEMP
);
637 lck_rw_done(divcbinfo
.mtx
);
641 __private_extern__
int
642 div_lock(struct socket
*so
, int refcount
, int lr
)
647 __asm__
volatile("mflr %0" : "=r" (lr_saved
));
652 #ifdef MORE_DICVLOCK_DEBUG
653 printf("div_lock: so=%x sopcb=%x lock=%x ref=%x lr=%x\n",
656 so
->so_pcb
? ((struct inpcb
*)so
->so_pcb
)->inpcb_mtx
: 0,
661 lck_mtx_lock(((struct inpcb
*)so
->so_pcb
)->inpcb_mtx
);
663 panic("div_lock: so=%x NO PCB! lr=%x\n", so
, lr_saved
);
664 lck_mtx_lock(so
->so_proto
->pr_domain
->dom_mtx
);
667 if (so
->so_usecount
< 0)
668 panic("div_lock: so=%x so_pcb=%x lr=%x ref=%x\n",
669 so
, so
->so_pcb
, lr_saved
, so
->so_usecount
);
673 so
->reserved3
= (void *)lr_saved
;
678 __private_extern__
int
679 div_unlock(struct socket
*so
, int refcount
, int lr
)
682 lck_mtx_t
* mutex_held
;
683 struct inpcb
*inp
= sotoinpcb(so
);
686 __asm__
volatile("mflr %0" : "=r" (lr_saved
));
691 #ifdef MORE_DICVLOCK_DEBUG
692 printf("div_unlock: so=%x sopcb=%x lock=%x ref=%x lr=%x\n",
695 so
->so_pcb
? ((struct inpcb
*)so
->so_pcb
)->inpcb_mtx
: 0,
702 if (so
->so_usecount
< 0)
703 panic("div_unlock: so=%x usecount=%x\n", so
, so
->so_usecount
);
704 if (so
->so_pcb
== NULL
) {
705 panic("div_unlock: so=%x NO PCB usecount=%x lr=%x\n", so
, so
->so_usecount
, lr_saved
);
706 mutex_held
= so
->so_proto
->pr_domain
->dom_mtx
;
708 mutex_held
= ((struct inpcb
*)so
->so_pcb
)->inpcb_mtx
;
711 if (so
->so_usecount
== 0 && (inp
->inp_wantcnt
== WNT_STOPUSING
)) {
712 lck_rw_lock_exclusive(divcbinfo
.mtx
);
714 lck_rw_done(divcbinfo
.mtx
);
717 lck_mtx_assert(mutex_held
, LCK_MTX_ASSERT_OWNED
);
718 lck_mtx_unlock(mutex_held
);
719 so
->reserved4
= (void *)lr_saved
;
723 __private_extern__ lck_mtx_t
*
724 div_getlock(struct socket
*so
, __unused
int locktype
)
726 struct inpcb
*inpcb
= (struct inpcb
*)so
->so_pcb
;
729 if (so
->so_usecount
< 0)
730 panic("div_getlock: so=%x usecount=%x\n", so
, so
->so_usecount
);
731 return(inpcb
->inpcb_mtx
);
733 panic("div_getlock: so=%x NULL so_pcb\n", so
);
734 return (so
->so_proto
->pr_domain
->dom_mtx
);
739 struct pr_usrreqs div_usrreqs
= {
740 div_abort
, pru_accept_notsupp
, div_attach
, div_bind
,
741 pru_connect_notsupp
, pru_connect2_notsupp
, in_control
, div_detach
,
742 div_disconnect
, pru_listen_notsupp
, in_setpeeraddr
, pru_rcvd_notsupp
,
743 pru_rcvoob_notsupp
, div_send
, pru_sense_null
, div_shutdown
,
744 in_setsockaddr
, sosend
, soreceive
, pru_sopoll_notsupp