ip_divert.c revision 128019
1/*
2 * Copyright (c) 1982, 1986, 1988, 1993
3 *	The Regents of the University of California.  All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 *    notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 *    notice, this list of conditions and the following disclaimer in the
12 *    documentation and/or other materials provided with the distribution.
13 * 4. Neither the name of the University nor the names of its contributors
14 *    may be used to endorse or promote products derived from this software
15 *    without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/netinet/ip_divert.c 128019 2004-04-07 20:46:16Z imp $
30 */
31
32#include "opt_inet.h"
33#include "opt_ipfw.h"
34#include "opt_ipdivert.h"
35#include "opt_ipsec.h"
36#include "opt_mac.h"
37
38#ifndef INET
39#error "IPDIVERT requires INET."
40#endif
41
42#include <sys/param.h>
43#include <sys/kernel.h>
44#include <sys/lock.h>
45#include <sys/malloc.h>
46#include <sys/mac.h>
47#include <sys/mbuf.h>
48#include <sys/proc.h>
49#include <sys/protosw.h>
50#include <sys/signalvar.h>
51#include <sys/socket.h>
52#include <sys/socketvar.h>
53#include <sys/sx.h>
54#include <sys/sysctl.h>
55#include <sys/systm.h>
56
57#include <vm/uma.h>
58
59#include <net/if.h>
60#include <net/route.h>
61
62#include <netinet/in.h>
63#include <netinet/in_pcb.h>
64#include <netinet/in_systm.h>
65#include <netinet/in_var.h>
66#include <netinet/ip.h>
67#include <netinet/ip_divert.h>
68#include <netinet/ip_var.h>
69
70/*
71 * Divert sockets
72 */
73
74/*
75 * Allocate enough space to hold a full IP packet
76 */
77#define	DIVSNDQ		(65536 + 100)
78#define	DIVRCVQ		(65536 + 100)
79
80/*
81 * Divert sockets work in conjunction with ipfw, see the divert(4)
82 * manpage for features.
83 * Internally, packets selected by ipfw in ip_input() or ip_output(),
84 * and never diverted before, are passed to the input queue of the
85 * divert socket with a given 'divert_port' number (as specified in
86 * the matching ipfw rule), and they are tagged with a 16 bit cookie
87 * (representing the rule number of the matching ipfw rule), which
88 * is passed to process reading from the socket.
89 *
90 * Packets written to the divert socket are again tagged with a cookie
91 * (usually the same as above) and a destination address.
92 * If the destination address is INADDR_ANY then the packet is
93 * treated as outgoing and sent to ip_output(), otherwise it is
94 * treated as incoming and sent to ip_input().
95 * In both cases, the packet is tagged with the cookie.
96 *
97 * On reinjection, processing in ip_input() and ip_output()
98 * will be exactly the same as for the original packet, except that
99 * ipfw processing will start at the rule number after the one
100 * written in the cookie (so, tagging a packet with a cookie of 0
101 * will cause it to be effectively considered as a standard packet).
102 */
103
104/* Internal variables */
105static struct inpcbhead divcb;
106static struct inpcbinfo divcbinfo;
107
108static u_long	div_sendspace = DIVSNDQ;	/* XXX sysctl ? */
109static u_long	div_recvspace = DIVRCVQ;	/* XXX sysctl ? */
110
111/*
112 * Initialize divert connection block queue.
113 */
114void
115div_init(void)
116{
117	INP_INFO_LOCK_INIT(&divcbinfo, "div");
118	LIST_INIT(&divcb);
119	divcbinfo.listhead = &divcb;
120	/*
121	 * XXX We don't use the hash list for divert IP, but it's easier
122	 * to allocate a one entry hash list than it is to check all
123	 * over the place for hashbase == NULL.
124	 */
125	divcbinfo.hashbase = hashinit(1, M_PCB, &divcbinfo.hashmask);
126	divcbinfo.porthashbase = hashinit(1, M_PCB, &divcbinfo.porthashmask);
127	divcbinfo.ipi_zone = uma_zcreate("divcb", sizeof(struct inpcb),
128	    NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
129	uma_zone_set_max(divcbinfo.ipi_zone, maxsockets);
130}
131
132/*
133 * IPPROTO_DIVERT is not in the real IP protocol number space; this
134 * function should never be called.  Just in case, drop any packets.
135 */
136void
137div_input(struct mbuf *m, int off)
138{
139	ipstat.ips_noproto++;
140	m_freem(m);
141}
142
143/*
144 * Divert a packet by passing it up to the divert socket at port 'port'.
145 *
146 * Setup generic address and protocol structures for div_input routine,
147 * then pass them along with mbuf chain.
148 */
149void
150divert_packet(struct mbuf *m, int incoming)
151{
152	struct ip *ip;
153	struct inpcb *inp;
154	struct socket *sa;
155	u_int16_t nport;
156	struct sockaddr_in divsrc;
157	struct m_tag *mtag;
158
159	mtag = m_tag_find(m, PACKET_TAG_DIVERT, NULL);
160	if (mtag == NULL) {
161		printf("%s: no divert tag\n", __func__);
162		m_freem(m);
163		return;
164	}
165	/* Assure header */
166	if (m->m_len < sizeof(struct ip) &&
167	    (m = m_pullup(m, sizeof(struct ip))) == 0)
168		return;
169	ip = mtod(m, struct ip *);
170
171	/*
172	 * Record receive interface address, if any.
173	 * But only for incoming packets.
174	 */
175	bzero(&divsrc, sizeof(divsrc));
176	divsrc.sin_len = sizeof(divsrc);
177	divsrc.sin_family = AF_INET;
178	divsrc.sin_port = divert_cookie(mtag);	/* record matching rule */
179	if (incoming) {
180		struct ifaddr *ifa;
181
182		/* Sanity check */
183		M_ASSERTPKTHDR(m);
184
185		/* Find IP address for receive interface */
186		TAILQ_FOREACH(ifa, &m->m_pkthdr.rcvif->if_addrhead, ifa_link) {
187			if (ifa->ifa_addr == NULL)
188				continue;
189			if (ifa->ifa_addr->sa_family != AF_INET)
190				continue;
191			divsrc.sin_addr =
192			    ((struct sockaddr_in *) ifa->ifa_addr)->sin_addr;
193			break;
194		}
195	}
196	/*
197	 * Record the incoming interface name whenever we have one.
198	 */
199	if (m->m_pkthdr.rcvif) {
200		/*
201		 * Hide the actual interface name in there in the
202		 * sin_zero array. XXX This needs to be moved to a
203		 * different sockaddr type for divert, e.g.
204		 * sockaddr_div with multiple fields like
205		 * sockaddr_dl. Presently we have only 7 bytes
206		 * but that will do for now as most interfaces
207		 * are 4 or less + 2 or less bytes for unit.
208		 * There is probably a faster way of doing this,
209		 * possibly taking it from the sockaddr_dl on the iface.
210		 * This solves the problem of a P2P link and a LAN interface
211		 * having the same address, which can result in the wrong
212		 * interface being assigned to the packet when fed back
213		 * into the divert socket. Theoretically if the daemon saves
214		 * and re-uses the sockaddr_in as suggested in the man pages,
215		 * this iface name will come along for the ride.
216		 * (see div_output for the other half of this.)
217		 */
218		strlcpy(divsrc.sin_zero, m->m_pkthdr.rcvif->if_xname,
219		    sizeof(divsrc.sin_zero));
220	}
221
222	/*
223	 * XXX sbappendaddr must be protected by Giant until
224	 * we have locking at the socket layer.  When entered
225	 * from below we come in w/o Giant and must take it
226	 * here.  Unfortunately we cannot tell whether we're
227	 * entering from above (already holding Giant),
228	 * below (potentially without Giant), or otherwise
229	 * (e.g. from tcp_syncache through a timeout) so we
230	 * have to grab it regardless.  This causes a LOR with
231	 * the tcp lock, at least, and possibly others.  For
232	 * the moment we're ignoring this. Once sockets are
233	 * locked this cruft can be removed.
234	 */
235	mtx_lock(&Giant);
236	/* Put packet on socket queue, if any */
237	sa = NULL;
238	nport = htons((u_int16_t)divert_info(mtag));
239	INP_INFO_RLOCK(&divcbinfo);
240	LIST_FOREACH(inp, &divcb, inp_list) {
241		INP_LOCK(inp);
242		/* XXX why does only one socket match? */
243		if (inp->inp_lport == nport) {
244			sa = inp->inp_socket;
245			if (sbappendaddr(&sa->so_rcv,
246			    (struct sockaddr *)&divsrc, m,
247			    (struct mbuf *)0) == 0)
248				sa = NULL;	/* force mbuf reclaim below */
249			else
250				sorwakeup(sa);
251			INP_UNLOCK(inp);
252			break;
253		}
254		INP_UNLOCK(inp);
255	}
256	INP_INFO_RUNLOCK(&divcbinfo);
257	mtx_unlock(&Giant);
258	if (sa == NULL) {
259		m_freem(m);
260		ipstat.ips_noproto++;
261		ipstat.ips_delivered--;
262        }
263}
264
265/*
266 * Deliver packet back into the IP processing machinery.
267 *
268 * If no address specified, or address is 0.0.0.0, send to ip_output();
269 * otherwise, send to ip_input() and mark as having been received on
270 * the interface with that address.
271 */
272static int
273div_output(struct socket *so, struct mbuf *m,
274	struct sockaddr_in *sin, struct mbuf *control)
275{
276	int error = 0;
277
278	KASSERT(m->m_pkthdr.rcvif == NULL, ("rcvif not null"));
279
280#ifdef MAC
281	mac_create_mbuf_from_socket(so, m);
282#endif
283
284	if (control)
285		m_freem(control);		/* XXX */
286
287	/* Loopback avoidance and state recovery */
288	if (sin) {
289		struct m_tag *mtag;
290		struct divert_tag *dt;
291		int i;
292
293		mtag = m_tag_get(PACKET_TAG_DIVERT,
294				sizeof(struct divert_tag), M_NOWAIT);
295		if (mtag == NULL) {
296			error = ENOBUFS;
297			goto cantsend;
298		}
299		dt = (struct divert_tag *)(mtag+1);
300		dt->info = 0;
301		dt->cookie = sin->sin_port;
302		m_tag_prepend(m, mtag);
303
304		/*
305		 * Find receive interface with the given name, stuffed
306		 * (if it exists) in the sin_zero[] field.
307		 * The name is user supplied data so don't trust its size
308		 * or that it is zero terminated.
309		 */
310		for (i = 0; i < sizeof(sin->sin_zero) && sin->sin_zero[i]; i++)
311			;
312		if ( i > 0 && i < sizeof(sin->sin_zero))
313			m->m_pkthdr.rcvif = ifunit(sin->sin_zero);
314	}
315
316	/* Reinject packet into the system as incoming or outgoing */
317	if (!sin || sin->sin_addr.s_addr == 0) {
318		struct ip *const ip = mtod(m, struct ip *);
319		struct inpcb *inp;
320
321		INP_INFO_WLOCK(&divcbinfo);
322		inp = sotoinpcb(so);
323		INP_LOCK(inp);
324		/*
325		 * Don't allow both user specified and setsockopt options,
326		 * and don't allow packet length sizes that will crash
327		 */
328		if (((ip->ip_hl != (sizeof (*ip) >> 2)) && inp->inp_options) ||
329		     ((u_short)ntohs(ip->ip_len) > m->m_pkthdr.len)) {
330			error = EINVAL;
331			m_freem(m);
332		} else {
333			/* Convert fields to host order for ip_output() */
334			ip->ip_len = ntohs(ip->ip_len);
335			ip->ip_off = ntohs(ip->ip_off);
336
337			/* Send packet to output processing */
338			ipstat.ips_rawout++;			/* XXX */
339
340			error = ip_output(m,
341				    inp->inp_options, NULL,
342				    (so->so_options & SO_DONTROUTE) |
343				    IP_ALLOWBROADCAST | IP_RAWOUTPUT,
344				    inp->inp_moptions, NULL);
345		}
346		INP_UNLOCK(inp);
347		INP_INFO_WUNLOCK(&divcbinfo);
348	} else {
349		if (m->m_pkthdr.rcvif == NULL) {
350			/*
351			 * No luck with the name, check by IP address.
352			 * Clear the port and the ifname to make sure
353			 * there are no distractions for ifa_ifwithaddr.
354			 */
355			struct	ifaddr *ifa;
356
357			bzero(sin->sin_zero, sizeof(sin->sin_zero));
358			sin->sin_port = 0;
359			ifa = ifa_ifwithaddr((struct sockaddr *) sin);
360			if (ifa == NULL) {
361				error = EADDRNOTAVAIL;
362				goto cantsend;
363			}
364			m->m_pkthdr.rcvif = ifa->ifa_ifp;
365		}
366		/* Send packet to input processing */
367		ip_input(m);
368	}
369
370	return error;
371
372cantsend:
373	m_freem(m);
374	return error;
375}
376
377/*
378 * Return a copy of the specified packet, but without
379 * the divert tag.  This is used when packets are ``tee'd''
380 * and we want the cloned copy to not have divert processing.
381 */
382struct mbuf *
383divert_clone(struct mbuf *m)
384{
385	struct mbuf *clone;
386	struct m_tag *mtag;
387
388	clone = m_dup(m, M_DONTWAIT);
389	if (clone != NULL) {
390		/* strip divert tag from copy */
391		mtag = m_tag_find(clone, PACKET_TAG_DIVERT, NULL);
392		if (mtag != NULL)
393			m_tag_delete(clone, mtag);
394	}
395	return clone;
396}
397
398static int
399div_attach(struct socket *so, int proto, struct thread *td)
400{
401	struct inpcb *inp;
402	int error;
403
404	INP_INFO_WLOCK(&divcbinfo);
405	inp  = sotoinpcb(so);
406	if (inp != 0) {
407		INP_INFO_WUNLOCK(&divcbinfo);
408		return EINVAL;
409	}
410	if (td && (error = suser(td)) != 0) {
411		INP_INFO_WUNLOCK(&divcbinfo);
412		return error;
413	}
414	error = soreserve(so, div_sendspace, div_recvspace);
415	if (error) {
416		INP_INFO_WUNLOCK(&divcbinfo);
417		return error;
418	}
419	error = in_pcballoc(so, &divcbinfo, "divinp");
420	if (error) {
421		INP_INFO_WUNLOCK(&divcbinfo);
422		return error;
423	}
424	inp = (struct inpcb *)so->so_pcb;
425	INP_LOCK(inp);
426	INP_INFO_WUNLOCK(&divcbinfo);
427	inp->inp_ip_p = proto;
428	inp->inp_vflag |= INP_IPV4;
429	inp->inp_flags |= INP_HDRINCL;
430	/* The socket is always "connected" because
431	   we always know "where" to send the packet */
432	INP_UNLOCK(inp);
433	so->so_state |= SS_ISCONNECTED;
434	return 0;
435}
436
437static int
438div_detach(struct socket *so)
439{
440	struct inpcb *inp;
441
442	INP_INFO_WLOCK(&divcbinfo);
443	inp = sotoinpcb(so);
444	if (inp == 0) {
445		INP_INFO_WUNLOCK(&divcbinfo);
446		return EINVAL;
447	}
448	INP_LOCK(inp);
449	in_pcbdetach(inp);
450	INP_INFO_WUNLOCK(&divcbinfo);
451	return 0;
452}
453
454static int
455div_abort(struct socket *so)
456{
457	struct inpcb *inp;
458
459	INP_INFO_WLOCK(&divcbinfo);
460	inp = sotoinpcb(so);
461	if (inp == 0) {
462		INP_INFO_WUNLOCK(&divcbinfo);
463		return EINVAL;	/* ??? possible? panic instead? */
464	}
465	INP_LOCK(inp);
466	soisdisconnected(so);
467	in_pcbdetach(inp);
468	INP_INFO_WUNLOCK(&divcbinfo);
469	return 0;
470}
471
472static int
473div_disconnect(struct socket *so)
474{
475	if ((so->so_state & SS_ISCONNECTED) == 0)
476		return ENOTCONN;
477	return div_abort(so);
478}
479
480static int
481div_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
482{
483	struct inpcb *inp;
484	int error;
485
486	INP_INFO_WLOCK(&divcbinfo);
487	inp = sotoinpcb(so);
488	if (inp == 0) {
489		INP_INFO_WUNLOCK(&divcbinfo);
490		return EINVAL;
491	}
492	/* in_pcbbind assumes that nam is a sockaddr_in
493	 * and in_pcbbind requires a valid address. Since divert
494	 * sockets don't we need to make sure the address is
495	 * filled in properly.
496	 * XXX -- divert should not be abusing in_pcbind
497	 * and should probably have its own family.
498	 */
499	if (nam->sa_family != AF_INET)
500		error = EAFNOSUPPORT;
501	else {
502		((struct sockaddr_in *)nam)->sin_addr.s_addr = INADDR_ANY;
503		INP_LOCK(inp);
504		error = in_pcbbind(inp, nam, td->td_ucred);
505		INP_UNLOCK(inp);
506	}
507	INP_INFO_WUNLOCK(&divcbinfo);
508	return error;
509}
510
511static int
512div_shutdown(struct socket *so)
513{
514	struct inpcb *inp;
515
516	INP_INFO_RLOCK(&divcbinfo);
517	inp = sotoinpcb(so);
518	if (inp == 0) {
519		INP_INFO_RUNLOCK(&divcbinfo);
520		return EINVAL;
521	}
522	INP_LOCK(inp);
523	INP_INFO_RUNLOCK(&divcbinfo);
524	socantsendmore(so);
525	INP_UNLOCK(inp);
526	return 0;
527}
528
529static int
530div_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam,
531	 struct mbuf *control, struct thread *td)
532{
533	/* Packet must have a header (but that's about it) */
534	if (m->m_len < sizeof (struct ip) &&
535	    (m = m_pullup(m, sizeof (struct ip))) == 0) {
536		ipstat.ips_toosmall++;
537		m_freem(m);
538		return EINVAL;
539	}
540
541	/* Send packet */
542	return div_output(so, m, (struct sockaddr_in *)nam, control);
543}
544
545void
546div_ctlinput(int cmd, struct sockaddr *sa, void *vip)
547{
548        struct in_addr faddr;
549
550	faddr = ((struct sockaddr_in *)sa)->sin_addr;
551	if (sa->sa_family != AF_INET || faddr.s_addr == INADDR_ANY)
552        	return;
553	if (PRC_IS_REDIRECT(cmd))
554		return;
555}
556
557static int
558div_pcblist(SYSCTL_HANDLER_ARGS)
559{
560	int error, i, n;
561	struct inpcb *inp, **inp_list;
562	inp_gen_t gencnt;
563	struct xinpgen xig;
564
565	/*
566	 * The process of preparing the TCB list is too time-consuming and
567	 * resource-intensive to repeat twice on every request.
568	 */
569	if (req->oldptr == 0) {
570		n = divcbinfo.ipi_count;
571		req->oldidx = 2 * (sizeof xig)
572			+ (n + n/8) * sizeof(struct xinpcb);
573		return 0;
574	}
575
576	if (req->newptr != 0)
577		return EPERM;
578
579	/*
580	 * OK, now we're committed to doing something.
581	 */
582	INP_INFO_RLOCK(&divcbinfo);
583	gencnt = divcbinfo.ipi_gencnt;
584	n = divcbinfo.ipi_count;
585	INP_INFO_RUNLOCK(&divcbinfo);
586
587	error = sysctl_wire_old_buffer(req,
588	    2 * sizeof(xig) + n*sizeof(struct xinpcb));
589	if (error != 0)
590		return (error);
591
592	xig.xig_len = sizeof xig;
593	xig.xig_count = n;
594	xig.xig_gen = gencnt;
595	xig.xig_sogen = so_gencnt;
596	error = SYSCTL_OUT(req, &xig, sizeof xig);
597	if (error)
598		return error;
599
600	inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK);
601	if (inp_list == 0)
602		return ENOMEM;
603
604	INP_INFO_RLOCK(&divcbinfo);
605	for (inp = LIST_FIRST(divcbinfo.listhead), i = 0; inp && i < n;
606	     inp = LIST_NEXT(inp, inp_list)) {
607		INP_LOCK(inp);
608		if (inp->inp_gencnt <= gencnt &&
609		    cr_canseesocket(req->td->td_ucred, inp->inp_socket) == 0)
610			inp_list[i++] = inp;
611		INP_UNLOCK(inp);
612	}
613	INP_INFO_RUNLOCK(&divcbinfo);
614	n = i;
615
616	error = 0;
617	for (i = 0; i < n; i++) {
618		inp = inp_list[i];
619		if (inp->inp_gencnt <= gencnt) {
620			struct xinpcb xi;
621			xi.xi_len = sizeof xi;
622			/* XXX should avoid extra copy */
623			bcopy(inp, &xi.xi_inp, sizeof *inp);
624			if (inp->inp_socket)
625				sotoxsocket(inp->inp_socket, &xi.xi_socket);
626			error = SYSCTL_OUT(req, &xi, sizeof xi);
627		}
628	}
629	if (!error) {
630		/*
631		 * Give the user an updated idea of our state.
632		 * If the generation differs from what we told
633		 * her before, she knows that something happened
634		 * while we were processing this request, and it
635		 * might be necessary to retry.
636		 */
637		INP_INFO_RLOCK(&divcbinfo);
638		xig.xig_gen = divcbinfo.ipi_gencnt;
639		xig.xig_sogen = so_gencnt;
640		xig.xig_count = divcbinfo.ipi_count;
641		INP_INFO_RUNLOCK(&divcbinfo);
642		error = SYSCTL_OUT(req, &xig, sizeof xig);
643	}
644	free(inp_list, M_TEMP);
645	return error;
646}
647
648/*
649 * This is the wrapper function for in_setsockaddr.  We just pass down
650 * the pcbinfo for in_setpeeraddr to lock.
651 */
652static int
653div_sockaddr(struct socket *so, struct sockaddr **nam)
654{
655	return (in_setsockaddr(so, nam, &divcbinfo));
656}
657
658/*
659 * This is the wrapper function for in_setpeeraddr. We just pass down
660 * the pcbinfo for in_setpeeraddr to lock.
661 */
662static int
663div_peeraddr(struct socket *so, struct sockaddr **nam)
664{
665	return (in_setpeeraddr(so, nam, &divcbinfo));
666}
667
668
669SYSCTL_DECL(_net_inet_divert);
670SYSCTL_PROC(_net_inet_divert, OID_AUTO, pcblist, CTLFLAG_RD, 0, 0,
671	    div_pcblist, "S,xinpcb", "List of active divert sockets");
672
673struct pr_usrreqs div_usrreqs = {
674	div_abort, pru_accept_notsupp, div_attach, div_bind,
675	pru_connect_notsupp, pru_connect2_notsupp, in_control, div_detach,
676	div_disconnect, pru_listen_notsupp, div_peeraddr, pru_rcvd_notsupp,
677	pru_rcvoob_notsupp, div_send, pru_sense_null, div_shutdown,
678	div_sockaddr, sosend, soreceive, sopoll, in_pcbsosetlabel
679};
680