Deleted Added
full compact
ipx_pcb.c (139924) ipx_pcb.c (139925)
1/*-
2 * Copyright (c) 2004-2005 Robert N. M. Watson
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

--- 22 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_pcb.c
36 */
37
38#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2004-2005 Robert N. M. Watson
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

--- 22 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_pcb.c
36 */
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/sys/netipx/ipx_pcb.c 139924 2005-01-09 04:47:42Z rwatson $");
39__FBSDID("$FreeBSD: head/sys/netipx/ipx_pcb.c 139925 2005-01-09 05:00:41Z rwatson $");
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/malloc.h>
44#include <sys/socket.h>
45#include <sys/socketvar.h>
46
47#include <net/if.h>

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

61 struct ipxpcbhead *head;
62 struct thread *td;
63{
64 register struct ipxpcb *ipxp;
65
66 MALLOC(ipxp, struct ipxpcb *, sizeof *ipxp, M_PCB, M_NOWAIT | M_ZERO);
67 if (ipxp == NULL)
68 return (ENOBUFS);
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/malloc.h>
44#include <sys/socket.h>
45#include <sys/socketvar.h>
46
47#include <net/if.h>

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

61 struct ipxpcbhead *head;
62 struct thread *td;
63{
64 register struct ipxpcb *ipxp;
65
66 MALLOC(ipxp, struct ipxpcb *, sizeof *ipxp, M_PCB, M_NOWAIT | M_ZERO);
67 if (ipxp == NULL)
68 return (ENOBUFS);
69 IPX_LOCK_INIT(ipxp);
69 ipxp->ipxp_socket = so;
70 if (ipxcksum)
71 ipxp->ipxp_flags |= IPXP_CHECKSUM;
72 LIST_INSERT_HEAD(head, ipxp, ipxp_list);
73 so->so_pcb = (caddr_t)ipxp;
74 return (0);
75}
76

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

272
273 ACCEPT_LOCK();
274 SOCK_LOCK(so);
275 so->so_pcb = NULL;
276 sotryfree(so);
277 if (ipxp->ipxp_route.ro_rt != NULL)
278 RTFREE(ipxp->ipxp_route.ro_rt);
279 LIST_REMOVE(ipxp, ipxp_list);
70 ipxp->ipxp_socket = so;
71 if (ipxcksum)
72 ipxp->ipxp_flags |= IPXP_CHECKSUM;
73 LIST_INSERT_HEAD(head, ipxp, ipxp_list);
74 so->so_pcb = (caddr_t)ipxp;
75 return (0);
76}
77

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

273
274 ACCEPT_LOCK();
275 SOCK_LOCK(so);
276 so->so_pcb = NULL;
277 sotryfree(so);
278 if (ipxp->ipxp_route.ro_rt != NULL)
279 RTFREE(ipxp->ipxp_route.ro_rt);
280 LIST_REMOVE(ipxp, ipxp_list);
281 IPX_LOCK_DESTROY(ipxp);
280 FREE(ipxp, M_PCB);
281}
282
283void
284ipx_setsockaddr(ipxp, nam)
285 register struct ipxpcb *ipxp;
286 struct sockaddr **nam;
287{

--- 68 unchanged lines hidden ---
282 FREE(ipxp, M_PCB);
283}
284
285void
286ipx_setsockaddr(ipxp, nam)
287 register struct ipxpcb *ipxp;
288 struct sockaddr **nam;
289{

--- 68 unchanged lines hidden ---