Deleted Added
full compact
uipc_usrreq.c (25201) uipc_usrreq.c (28270)
1/*
2 * Copyright (c) 1982, 1986, 1989, 1991, 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

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * From: @(#)uipc_usrreq.c 8.3 (Berkeley) 1/4/94
1/*
2 * Copyright (c) 1982, 1986, 1989, 1991, 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

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * From: @(#)uipc_usrreq.c 8.3 (Berkeley) 1/4/94
34 * $Id: uipc_usrreq.c,v 1.22 1997/03/23 03:36:33 bde Exp $
34 * $Id: uipc_usrreq.c,v 1.23 1997/04/27 20:00:46 wollman Exp $
35 */
36
37#include <sys/param.h>
38#include <sys/queue.h>
39#include <sys/systm.h>
40#include <sys/kernel.h>
41#include <sys/domain.h>
42#include <sys/fcntl.h>

--- 19 unchanged lines hidden (view full) ---

62 * rethink name space problems
63 * need a proper out-of-band
64 */
65static struct sockaddr sun_noname = { sizeof(sun_noname), AF_LOCAL };
66static ino_t unp_ino; /* prototype for fake inode numbers */
67
68static int unp_attach __P((struct socket *));
69static void unp_detach __P((struct unpcb *));
35 */
36
37#include <sys/param.h>
38#include <sys/queue.h>
39#include <sys/systm.h>
40#include <sys/kernel.h>
41#include <sys/domain.h>
42#include <sys/fcntl.h>

--- 19 unchanged lines hidden (view full) ---

62 * rethink name space problems
63 * need a proper out-of-band
64 */
65static struct sockaddr sun_noname = { sizeof(sun_noname), AF_LOCAL };
66static ino_t unp_ino; /* prototype for fake inode numbers */
67
68static int unp_attach __P((struct socket *));
69static void unp_detach __P((struct unpcb *));
70static int unp_bind __P((struct unpcb *,struct mbuf *, struct proc *));
71static int unp_connect __P((struct socket *,struct mbuf *, struct proc *));
70static int unp_bind __P((struct unpcb *,struct sockaddr *, struct proc *));
71static int unp_connect __P((struct socket *,struct sockaddr *,
72 struct proc *));
72static void unp_disconnect __P((struct unpcb *));
73static void unp_shutdown __P((struct unpcb *));
74static void unp_drop __P((struct unpcb *, int));
75static void unp_gc __P((void));
76static void unp_scan __P((struct mbuf *, void (*)(struct file *)));
77static void unp_mark __P((struct file *));
78static void unp_discard __P((struct file *));
79static int unp_internalize __P((struct mbuf *, struct proc *));

--- 5 unchanged lines hidden (view full) ---

85
86 if (unp == 0)
87 return EINVAL;
88 unp_drop(unp, ECONNABORTED);
89 return 0;
90}
91
92static int
73static void unp_disconnect __P((struct unpcb *));
74static void unp_shutdown __P((struct unpcb *));
75static void unp_drop __P((struct unpcb *, int));
76static void unp_gc __P((void));
77static void unp_scan __P((struct mbuf *, void (*)(struct file *)));
78static void unp_mark __P((struct file *));
79static void unp_discard __P((struct file *));
80static int unp_internalize __P((struct mbuf *, struct proc *));

--- 5 unchanged lines hidden (view full) ---

86
87 if (unp == 0)
88 return EINVAL;
89 unp_drop(unp, ECONNABORTED);
90 return 0;
91}
92
93static int
93uipc_accept(struct socket *so, struct mbuf *nam)
94uipc_accept(struct socket *so, struct sockaddr **nam)
94{
95 struct unpcb *unp = sotounpcb(so);
96
97 if (unp == 0)
98 return EINVAL;
99
100 /*
101 * Pass back name of connected socket,
102 * if it was bound and we are still connected
103 * (our peer may have closed already!).
104 */
105 if (unp->unp_conn && unp->unp_conn->unp_addr) {
95{
96 struct unpcb *unp = sotounpcb(so);
97
98 if (unp == 0)
99 return EINVAL;
100
101 /*
102 * Pass back name of connected socket,
103 * if it was bound and we are still connected
104 * (our peer may have closed already!).
105 */
106 if (unp->unp_conn && unp->unp_conn->unp_addr) {
106 nam->m_len = unp->unp_conn->unp_addr->m_len;
107 bcopy(mtod(unp->unp_conn->unp_addr, caddr_t),
108 mtod(nam, caddr_t), (unsigned)nam->m_len);
107 *nam = dup_sockaddr((struct sockaddr *)unp->unp_conn->unp_addr,
108 1);
109 } else {
109 } else {
110 nam->m_len = sizeof(sun_noname);
111 *(mtod(nam, struct sockaddr *)) = sun_noname;
110 *nam = dup_sockaddr((struct sockaddr *)&sun_noname, 1);
112 }
113 return 0;
114}
115
116static int
117uipc_attach(struct socket *so, int proto, struct proc *p)
118{
119 struct unpcb *unp = sotounpcb(so);
120
121 if (unp != 0)
122 return EISCONN;
123 return unp_attach(so);
124}
125
126static int
111 }
112 return 0;
113}
114
115static int
116uipc_attach(struct socket *so, int proto, struct proc *p)
117{
118 struct unpcb *unp = sotounpcb(so);
119
120 if (unp != 0)
121 return EISCONN;
122 return unp_attach(so);
123}
124
125static int
127uipc_bind(struct socket *so, struct mbuf *nam, struct proc *p)
126uipc_bind(struct socket *so, struct sockaddr *nam, struct proc *p)
128{
129 struct unpcb *unp = sotounpcb(so);
130
131 if (unp == 0)
132 return EINVAL;
133
134 return unp_bind(unp, nam, p);
135}
136
137static int
127{
128 struct unpcb *unp = sotounpcb(so);
129
130 if (unp == 0)
131 return EINVAL;
132
133 return unp_bind(unp, nam, p);
134}
135
136static int
138uipc_connect(struct socket *so, struct mbuf *nam, struct proc *p)
137uipc_connect(struct socket *so, struct sockaddr *nam, struct proc *p)
139{
140 struct unpcb *unp = sotounpcb(so);
141
142 if (unp == 0)
143 return EINVAL;
144 return unp_connect(so, nam, curproc);
145}
146

--- 39 unchanged lines hidden (view full) ---

186 struct unpcb *unp = sotounpcb(so);
187
188 if (unp == 0 || unp->unp_vnode == 0)
189 return EINVAL;
190 return 0;
191}
192
193static int
138{
139 struct unpcb *unp = sotounpcb(so);
140
141 if (unp == 0)
142 return EINVAL;
143 return unp_connect(so, nam, curproc);
144}
145

--- 39 unchanged lines hidden (view full) ---

185 struct unpcb *unp = sotounpcb(so);
186
187 if (unp == 0 || unp->unp_vnode == 0)
188 return EINVAL;
189 return 0;
190}
191
192static int
194uipc_peeraddr(struct socket *so, struct mbuf *nam)
193uipc_peeraddr(struct socket *so, struct sockaddr **nam)
195{
196 struct unpcb *unp = sotounpcb(so);
197
198 if (unp == 0)
199 return EINVAL;
194{
195 struct unpcb *unp = sotounpcb(so);
196
197 if (unp == 0)
198 return EINVAL;
200 if (unp->unp_conn && unp->unp_conn->unp_addr) {
201 nam->m_len = unp->unp_conn->unp_addr->m_len;
202 bcopy(mtod(unp->unp_conn->unp_addr, caddr_t),
203 mtod(nam, caddr_t), (unsigned)nam->m_len);
204 } else
205 nam->m_len = 0;
199 if (unp->unp_conn && unp->unp_conn->unp_addr)
200 *nam = dup_sockaddr((struct sockaddr *)unp->unp_conn->unp_addr,
201 1);
206 return 0;
207}
208
209static int
210uipc_rcvd(struct socket *so, int flags)
211{
212 struct unpcb *unp = sotounpcb(so);
213 struct socket *so2;

--- 28 unchanged lines hidden (view full) ---

242 panic("uipc_rcvd unknown socktype");
243 }
244 return 0;
245}
246
247/* pru_rcvoob is EOPNOTSUPP */
248
249static int
202 return 0;
203}
204
205static int
206uipc_rcvd(struct socket *so, int flags)
207{
208 struct unpcb *unp = sotounpcb(so);
209 struct socket *so2;

--- 28 unchanged lines hidden (view full) ---

238 panic("uipc_rcvd unknown socktype");
239 }
240 return 0;
241}
242
243/* pru_rcvoob is EOPNOTSUPP */
244
245static int
250uipc_send(struct socket *so, int flags, struct mbuf *m, struct mbuf *nam,
246uipc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam,
251 struct mbuf *control, struct proc *p)
252{
253 int error = 0;
254 struct unpcb *unp = sotounpcb(so);
255 struct socket *so2;
256
257 if (unp == 0) {
258 error = EINVAL;

--- 23 unchanged lines hidden (view full) ---

282 } else {
283 if (unp->unp_conn == 0) {
284 error = ENOTCONN;
285 break;
286 }
287 }
288 so2 = unp->unp_conn->unp_socket;
289 if (unp->unp_addr)
247 struct mbuf *control, struct proc *p)
248{
249 int error = 0;
250 struct unpcb *unp = sotounpcb(so);
251 struct socket *so2;
252
253 if (unp == 0) {
254 error = EINVAL;

--- 23 unchanged lines hidden (view full) ---

278 } else {
279 if (unp->unp_conn == 0) {
280 error = ENOTCONN;
281 break;
282 }
283 }
284 so2 = unp->unp_conn->unp_socket;
285 if (unp->unp_addr)
290 from = mtod(unp->unp_addr, struct sockaddr *);
286 from = (struct sockaddr *)unp->unp_addr;
291 else
292 from = &sun_noname;
293 if (sbappendaddr(&so2->so_rcv, from, m, control)) {
294 sorwakeup(so2);
295 m = 0;
296 control = 0;
297 } else
298 error = ENOBUFS;

--- 98 unchanged lines hidden (view full) ---

397 if (unp == 0)
398 return EINVAL;
399 socantsendmore(so);
400 unp_shutdown(unp);
401 return 0;
402}
403
404static int
287 else
288 from = &sun_noname;
289 if (sbappendaddr(&so2->so_rcv, from, m, control)) {
290 sorwakeup(so2);
291 m = 0;
292 control = 0;
293 } else
294 error = ENOBUFS;

--- 98 unchanged lines hidden (view full) ---

393 if (unp == 0)
394 return EINVAL;
395 socantsendmore(so);
396 unp_shutdown(unp);
397 return 0;
398}
399
400static int
405uipc_sockaddr(struct socket *so, struct mbuf *nam)
401uipc_sockaddr(struct socket *so, struct sockaddr **nam)
406{
407 struct unpcb *unp = sotounpcb(so);
408
409 if (unp == 0)
410 return EINVAL;
402{
403 struct unpcb *unp = sotounpcb(so);
404
405 if (unp == 0)
406 return EINVAL;
411 if (unp->unp_addr) {
412 nam->m_len = unp->unp_addr->m_len;
413 bcopy(mtod(unp->unp_addr, caddr_t),
414 mtod(nam, caddr_t), (unsigned)nam->m_len);
415 } else
416 nam->m_len = 0;
407 if (unp->unp_addr)
408 *nam = dup_sockaddr((struct sockaddr *)unp->unp_addr, 1);
417 return 0;
418}
419
420struct pr_usrreqs uipc_usrreqs = {
421 uipc_abort, uipc_accept, uipc_attach, uipc_bind, uipc_connect,
422 uipc_connect2, pru_control_notsupp, uipc_detach, uipc_disconnect,
423 uipc_listen, uipc_peeraddr, uipc_rcvd, pru_rcvoob_notsupp,
424 uipc_send, uipc_sense, uipc_shutdown, uipc_sockaddr,

--- 48 unchanged lines hidden (view full) ---

473 break;
474
475 default:
476 panic("unp_attach");
477 }
478 if (error)
479 return (error);
480 }
409 return 0;
410}
411
412struct pr_usrreqs uipc_usrreqs = {
413 uipc_abort, uipc_accept, uipc_attach, uipc_bind, uipc_connect,
414 uipc_connect2, pru_control_notsupp, uipc_detach, uipc_disconnect,
415 uipc_listen, uipc_peeraddr, uipc_rcvd, pru_rcvoob_notsupp,
416 uipc_send, uipc_sense, uipc_shutdown, uipc_sockaddr,

--- 48 unchanged lines hidden (view full) ---

465 break;
466
467 default:
468 panic("unp_attach");
469 }
470 if (error)
471 return (error);
472 }
481 m = m_getclr(M_DONTWAIT, MT_PCB);
482 if (m == NULL)
473 MALLOC(unp, struct unpcb *, sizeof *unp, M_PCB, M_NOWAIT);
474 if (unp == NULL)
483 return (ENOBUFS);
475 return (ENOBUFS);
484 unp = mtod(m, struct unpcb *);
476 bzero(unp, sizeof *unp);
485 so->so_pcb = (caddr_t)unp;
486 unp->unp_socket = so;
487 return (0);
488}
489
490static void
491unp_detach(unp)
492 register struct unpcb *unp;
493{
477 so->so_pcb = (caddr_t)unp;
478 unp->unp_socket = so;
479 return (0);
480}
481
482static void
483unp_detach(unp)
484 register struct unpcb *unp;
485{
494
495 if (unp->unp_vnode) {
496 unp->unp_vnode->v_socket = 0;
497 vrele(unp->unp_vnode);
498 unp->unp_vnode = 0;
499 }
500 if (unp->unp_conn)
501 unp_disconnect(unp);
502 while (unp->unp_refs)

--- 6 unchanged lines hidden (view full) ---

509 * in sofree, but if our receive buffer holds references
510 * to descriptors that are now garbage, we will dispose
511 * of those descriptor references after the garbage collector
512 * gets them (resulting in a "panic: closef: count < 0").
513 */
514 sorflush(unp->unp_socket);
515 unp_gc();
516 }
486 if (unp->unp_vnode) {
487 unp->unp_vnode->v_socket = 0;
488 vrele(unp->unp_vnode);
489 unp->unp_vnode = 0;
490 }
491 if (unp->unp_conn)
492 unp_disconnect(unp);
493 while (unp->unp_refs)

--- 6 unchanged lines hidden (view full) ---

500 * in sofree, but if our receive buffer holds references
501 * to descriptors that are now garbage, we will dispose
502 * of those descriptor references after the garbage collector
503 * gets them (resulting in a "panic: closef: count < 0").
504 */
505 sorflush(unp->unp_socket);
506 unp_gc();
507 }
517 m_freem(unp->unp_addr);
518 (void) m_free(dtom(unp));
508 if (unp->unp_addr)
509 FREE(unp->unp_addr, M_SONAME);
510 FREE(unp, M_PCB);
519}
520
521static int
522unp_bind(unp, nam, p)
523 struct unpcb *unp;
511}
512
513static int
514unp_bind(unp, nam, p)
515 struct unpcb *unp;
524 struct mbuf *nam;
516 struct sockaddr *nam;
525 struct proc *p;
526{
517 struct proc *p;
518{
527 struct sockaddr_un *soun = mtod(nam, struct sockaddr_un *);
519 struct sockaddr_un *soun = (struct sockaddr_un *)nam;
528 register struct vnode *vp;
529 struct vattr vattr;
520 register struct vnode *vp;
521 struct vattr vattr;
530 int error;
522 int error, namelen;
531 struct nameidata nd;
523 struct nameidata nd;
524 char buf[SOCK_MAXADDRLEN];
532
525
533 NDINIT(&nd, CREATE, FOLLOW | LOCKPARENT, UIO_SYSSPACE,
534 soun->sun_path, p);
535 if (unp->unp_vnode != NULL)
536 return (EINVAL);
526 if (unp->unp_vnode != NULL)
527 return (EINVAL);
537 if (nam->m_len == MLEN) {
538 if (*(mtod(nam, caddr_t) + nam->m_len - 1) != 0)
539 return (EINVAL);
540 } else
541 *(mtod(nam, caddr_t) + nam->m_len) = 0;
528#define offsetof(s, e) ((char *)&((s *)0)->e - (char *)((s *)0))
529 namelen = soun->sun_len - offsetof(struct sockaddr_un, sun_path);
530 if (namelen <= 0)
531 return EINVAL;
532 strncpy(buf, soun->sun_path, namelen);
533 buf[namelen] = 0; /* null-terminate the string */
534 NDINIT(&nd, CREATE, FOLLOW | LOCKPARENT, UIO_SYSSPACE,
535 buf, p);
542/* SHOULD BE ABLE TO ADOPT EXISTING AND wakeup() ALA FIFO's */
543 error = namei(&nd);
544 if (error)
545 return (error);
546 vp = nd.ni_vp;
547 if (vp != NULL) {
548 VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd);
549 if (nd.ni_dvp == vp)

--- 7 unchanged lines hidden (view full) ---

557 vattr.va_type = VSOCK;
558 vattr.va_mode = (ACCESSPERMS & ~p->p_fd->fd_cmask);
559 VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
560 if (error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr))
561 return (error);
562 vp = nd.ni_vp;
563 vp->v_socket = unp->unp_socket;
564 unp->unp_vnode = vp;
536/* SHOULD BE ABLE TO ADOPT EXISTING AND wakeup() ALA FIFO's */
537 error = namei(&nd);
538 if (error)
539 return (error);
540 vp = nd.ni_vp;
541 if (vp != NULL) {
542 VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd);
543 if (nd.ni_dvp == vp)

--- 7 unchanged lines hidden (view full) ---

551 vattr.va_type = VSOCK;
552 vattr.va_mode = (ACCESSPERMS & ~p->p_fd->fd_cmask);
553 VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
554 if (error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr))
555 return (error);
556 vp = nd.ni_vp;
557 vp->v_socket = unp->unp_socket;
558 unp->unp_vnode = vp;
565 unp->unp_addr = m_copy(nam, 0, (int)M_COPYALL);
559 unp->unp_addr = (struct sockaddr_un *)dup_sockaddr(nam, 1);
566 VOP_UNLOCK(vp, 0, p);
567 return (0);
568}
569
570static int
571unp_connect(so, nam, p)
572 struct socket *so;
560 VOP_UNLOCK(vp, 0, p);
561 return (0);
562}
563
564static int
565unp_connect(so, nam, p)
566 struct socket *so;
573 struct mbuf *nam;
567 struct sockaddr *nam;
574 struct proc *p;
575{
568 struct proc *p;
569{
576 register struct sockaddr_un *soun = mtod(nam, struct sockaddr_un *);
570 register struct sockaddr_un *soun = (struct sockaddr_un *)nam;
577 register struct vnode *vp;
578 register struct socket *so2, *so3;
579 struct unpcb *unp2, *unp3;
571 register struct vnode *vp;
572 register struct socket *so2, *so3;
573 struct unpcb *unp2, *unp3;
580 int error;
574 int error, len;
581 struct nameidata nd;
575 struct nameidata nd;
576 char buf[SOCK_MAXADDRLEN];
582
577
583 NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, soun->sun_path, p);
584 if (nam->m_data + nam->m_len == &nam->m_dat[MLEN]) { /* XXX */
585 if (*(mtod(nam, caddr_t) + nam->m_len - 1) != 0)
586 return (EMSGSIZE);
587 } else
588 *(mtod(nam, caddr_t) + nam->m_len) = 0;
578 len = nam->sa_len - offsetof(struct sockaddr_un, sun_path);
579 if (len <= 0)
580 return EINVAL;
581 strncpy(buf, soun->sun_path, len);
582 buf[len] = 0;
583
584 NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, buf, p);
589 error = namei(&nd);
590 if (error)
591 return (error);
592 vp = nd.ni_vp;
593 if (vp->v_type != VSOCK) {
594 error = ENOTSOCK;
595 goto bad;
596 }

--- 13 unchanged lines hidden (view full) ---

610 if ((so2->so_options & SO_ACCEPTCONN) == 0 ||
611 (so3 = sonewconn(so2, 0)) == 0) {
612 error = ECONNREFUSED;
613 goto bad;
614 }
615 unp2 = sotounpcb(so2);
616 unp3 = sotounpcb(so3);
617 if (unp2->unp_addr)
585 error = namei(&nd);
586 if (error)
587 return (error);
588 vp = nd.ni_vp;
589 if (vp->v_type != VSOCK) {
590 error = ENOTSOCK;
591 goto bad;
592 }

--- 13 unchanged lines hidden (view full) ---

606 if ((so2->so_options & SO_ACCEPTCONN) == 0 ||
607 (so3 = sonewconn(so2, 0)) == 0) {
608 error = ECONNREFUSED;
609 goto bad;
610 }
611 unp2 = sotounpcb(so2);
612 unp3 = sotounpcb(so3);
613 if (unp2->unp_addr)
618 unp3->unp_addr =
619 m_copy(unp2->unp_addr, 0, (int)M_COPYALL);
614 unp3->unp_addr = (struct sockaddr_un *)
615 dup_sockaddr((struct sockaddr *)
616 unp2->unp_addr, 1);
620 so2 = so3;
621 }
622 error = unp_connect2(so, so2);
623bad:
624 vput(vp);
625 return (error);
626}
627

--- 93 unchanged lines hidden (view full) ---

721 int errno;
722{
723 struct socket *so = unp->unp_socket;
724
725 so->so_error = errno;
726 unp_disconnect(unp);
727 if (so->so_head) {
728 so->so_pcb = (caddr_t) 0;
617 so2 = so3;
618 }
619 error = unp_connect2(so, so2);
620bad:
621 vput(vp);
622 return (error);
623}
624

--- 93 unchanged lines hidden (view full) ---

718 int errno;
719{
720 struct socket *so = unp->unp_socket;
721
722 so->so_error = errno;
723 unp_disconnect(unp);
724 if (so->so_head) {
725 so->so_pcb = (caddr_t) 0;
729 m_freem(unp->unp_addr);
730 (void) m_free(dtom(unp));
726 if (unp->unp_addr)
727 FREE(unp->unp_addr, M_SONAME);
728 FREE(unp, M_PCB);
731 sofree(so);
732 }
733}
734
735#ifdef notdef
736void
737unp_drain()
738{

--- 332 unchanged lines hidden ---
729 sofree(so);
730 }
731}
732
733#ifdef notdef
734void
735unp_drain()
736{

--- 332 unchanged lines hidden ---