summaryrefslogtreecommitdiffstats
path: root/sys/netipx/ipx_pcb.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-12-30 17:49:40 +0000
committerrwatson <rwatson@FreeBSD.org>2004-12-30 17:49:40 +0000
commit767b9c0b3efe618078d08c4cf137ab912f502ca2 (patch)
treea750ac94e75e406a21cd733a1d3edf909cf38c11 /sys/netipx/ipx_pcb.c
parent547414a25a19e2404c14c52038ec7fe4fa7b4b05 (diff)
downloadFreeBSD-src-767b9c0b3efe618078d08c4cf137ab912f502ca2.zip
FreeBSD-src-767b9c0b3efe618078d08c4cf137ab912f502ca2.tar.gz
Convert netipx to use queue(9) doubly-linked lists instead of home-brew
linked lists for ipxpcb's.
Diffstat (limited to 'sys/netipx/ipx_pcb.c')
-rw-r--r--sys/netipx/ipx_pcb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netipx/ipx_pcb.c b/sys/netipx/ipx_pcb.c
index ebd4df1..6cb8e50 100644
--- a/sys/netipx/ipx_pcb.c
+++ b/sys/netipx/ipx_pcb.c
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2004, Robert N. M. Watson
* Copyright (c) 1995, Mike Mitchell
* Copyright (c) 1984, 1985, 1986, 1987, 1993
* The Regents of the University of California. All rights reserved.
@@ -56,7 +57,7 @@ static struct ipx_addr zeroipx_addr;
int
ipx_pcballoc(so, head, td)
struct socket *so;
- struct ipxpcb *head;
+ struct ipxpcbhead *head;
struct thread *td;
{
register struct ipxpcb *ipxp;
@@ -67,7 +68,7 @@ ipx_pcballoc(so, head, td)
ipxp->ipxp_socket = so;
if (ipxcksum)
ipxp->ipxp_flags |= IPXP_CHECKSUM;
- insque(ipxp, head);
+ LIST_INSERT_HEAD(head, ipxp, ipxp_list);
so->so_pcb = (caddr_t)ipxp;
return (0);
}
@@ -274,7 +275,7 @@ ipx_pcbdetach(ipxp)
sotryfree(so);
if (ipxp->ipxp_route.ro_rt != NULL)
rtfree(ipxp->ipxp_route.ro_rt);
- remque(ipxp);
+ LIST_REMOVE(ipxp, ipxp_list);
FREE(ipxp, M_PCB);
}
@@ -319,7 +320,7 @@ ipx_pcblookup(faddr, lport, wildp)
u_short fport;
fport = faddr->x_port;
- for (ipxp = (&ipxpcb)->ipxp_next; ipxp != (&ipxpcb); ipxp = ipxp->ipxp_next) {
+ LIST_FOREACH(ipxp, &ipxpcb_list, ipxp_list) {
if (ipxp->ipxp_lport != lport)
continue;
wildcard = 0;
OpenPOWER on IntegriCloud