Change llinfo_llc to use queue.h.

This commit is contained in:
mycroft 1995-06-13 08:12:33 +00:00
parent 3bcdd7fb97
commit 4b83f9cc67
3 changed files with 11 additions and 15 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: esis.c,v 1.9 1995/06/13 07:58:17 mycroft Exp $ */
/* $NetBSD: esis.c,v 1.10 1995/06/13 08:12:33 mycroft Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -141,7 +141,6 @@ esis_init()
extern struct clnl_protosw clnl_protox[256];
LIST_INIT(&esis_pcb);
llinfo_llc.lc_next = llinfo_llc.lc_prev = &llinfo_llc;
timeout(snpac_age, (caddr_t)0, hz);
timeout(esis_config, (caddr_t)0, hz);

View File

@ -1,4 +1,4 @@
/* $NetBSD: iso_snpac.c,v 1.9 1995/06/13 07:13:34 mycroft Exp $ */
/* $NetBSD: iso_snpac.c,v 1.10 1995/06/13 08:12:41 mycroft Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -94,6 +94,8 @@ extern void esis_config();
extern int hz;
static void snpac_fixdstandmask();
LIST_HEAD(, llinfo_llc) llinfo_llc;
struct sockaddr_iso blank_siso = {sizeof(blank_siso), AF_ISO};
extern u_long iso_hashchar();
static struct sockaddr_iso
@ -203,7 +205,7 @@ struct sockaddr *sa;
Bzero(lc, sizeof(*lc));
lc->lc_rt = rt;
rt->rt_flags |= RTF_LLINFO;
insque(lc, &llinfo_llc);
LIST_INSERT_HEAD(&llinfo_llc, lc, lc_list);
if (gate->sdl.sdl_alen == sizeof(struct esis_req) + addrlen) {
gate->sdl.sdl_alen -= sizeof(struct esis_req);
bcopy(addrlen + LLADDR(&gate->sdl),
@ -216,7 +218,7 @@ struct sockaddr *sa;
iso_setmcasts(ifp, req);
if (lc == 0)
return;
remque(lc);
LIST_REMOVE(lc, lc_list);
Free(lc);
rt->rt_llinfo = 0;
rt->rt_flags &= ~RTF_LLINFO;
@ -596,8 +598,8 @@ snpac_age()
timeout(snpac_age, (caddr_t)0, SNPAC_AGE * hz);
for (lc = llinfo_llc.lc_next; lc != & llinfo_llc; lc = nlc) {
nlc = lc->lc_next;
for (lc = llinfo_llc.lh_first; lc != 0; lc = nlc) {
nlc = lc->lc_list.le_next;
if (lc->lc_flags & SNPA_VALID) {
rt = lc->lc_rt;
if (rt->rt_rmx.rmx_expire && rt->rt_rmx.rmx_expire < time.tv_sec)
@ -646,7 +648,7 @@ struct ifnet *ifp;
{
register struct llinfo_llc *lc;
for (lc = llinfo_llc.lc_next; lc != & llinfo_llc; lc = lc->lc_next) {
for (lc = llinfo_llc.lh_first; lc != 0; lc = lc->lc_list.le_next) {
if (lc->lc_rt->rt_ifp == ifp && (lc->lc_flags & SNPA_VALID))
snpac_free(lc);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: iso_snpac.h,v 1.7 1995/03/29 22:09:47 briggs Exp $ */
/* $NetBSD: iso_snpac.h,v 1.8 1995/06/13 08:12:46 mycroft Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -95,8 +95,7 @@ struct esis_req {
*/
struct llinfo_llc {
struct llinfo_llc *lc_next; /* keep all llc routes linked */
struct llinfo_llc *lc_prev; /* keep all llc routes linked */
LIST_ENTRY(llinfo_llc) lc_list;
struct rtentry *lc_rt; /* backpointer to route */
struct esis_req lc_er; /* holding time, etc */
#define lc_ht lc_er.er_ht
@ -108,7 +107,3 @@ struct llinfo_llc {
#define SIOCSSTYPE _IOW('a', 39, struct systype_req) /* set system type */
#define SIOCGSTYPE _IOR('a', 40, struct systype_req) /* get system type */
#ifdef _KERNEL
struct llinfo_llc llinfo_llc; /* head for linked lists */
#endif /* _KERNEL */