Deleted Added
full compact
ipx_usrreq.c (137386) ipx_usrreq.c (139444)
1/*
1/*
2 * Copyright (c) 2004, Robert N. M. Watson
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>
3 * Copyright (c) 1995, Mike Mitchell
4 * Copyright (c) 1984, 1985, 1986, 1987, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright

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

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

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

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

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

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