Deleted Added
sdiff udiff text old ( 137386 ) new ( 139444 )
full compact
1/*
2 * Copyright (c) 1995, Mike Mitchell
3 * Copyright (c) 1984, 1985, 1986, 1987, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)ipx_usrreq.c
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/netipx/ipx_usrreq.c 137386 2004-11-08 14:44:54Z phk $");
39
40#include "opt_ipx.h"
41
42#include <sys/param.h>
43#include <sys/kernel.h>
44#include <sys/lock.h>
45#include <sys/mbuf.h>
46#include <sys/protosw.h>

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

450{
451 int error;
452 int s;
453 struct ipxpcb *ipxp = sotoipxpcb(so);
454
455 if (ipxp != NULL)
456 return (EINVAL);
457 s = splnet();
458 error = ipx_pcballoc(so, &ipxpcb, td);
459 splx(s);
460 if (error == 0)
461 error = soreserve(so, ipxsendspace, ipxrecvspace);
462 return (error);
463}
464
465static int
466ipx_bind(so, nam, td)

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

611{
612 int error = 0;
613 int s;
614 struct ipxpcb *ipxp = sotoipxpcb(so);
615
616 if (td != NULL && (error = suser(td)) != 0)
617 return (error);
618 s = splnet();
619 error = ipx_pcballoc(so, &ipxrawpcb, td);
620 splx(s);
621 if (error)
622 return (error);
623 error = soreserve(so, ipxsendspace, ipxrecvspace);
624 if (error)
625 return (error);
626 ipxp = sotoipxpcb(so);
627 ipxp->ipxp_faddr.x_host = ipx_broadhost;
628 ipxp->ipxp_flags = IPXP_RAWIN | IPXP_RAWOUT;
629 return (error);
630}