Rename 'at_ifaddr' list to 'at_ifaddr_list' so that the variable is

more easily mechanically distinguished from 'struct at_ifaddr'.
This commit is contained in:
Robert Watson 2004-03-22 04:50:36 +00:00
parent f2aa178725
commit 4ddd6a81e0
6 changed files with 23 additions and 23 deletions

View File

@ -106,7 +106,7 @@ at_ifawithnet(struct sockaddr_at *sat)
struct at_ifaddr *aa;
struct sockaddr_at *sat2;
for (aa = at_ifaddr; aa; aa = aa->aa_next) {
for (aa = at_ifaddr_list; aa != NULL; aa = aa->aa_next) {
sat2 = &(aa->aa_addr);
if (sat2->sat_addr.s_net == sat->sat_addr.s_net) {
break;

View File

@ -21,7 +21,7 @@
#include <netatalk/at_var.h>
#include <netatalk/at_extern.h>
struct at_ifaddr *at_ifaddr;
struct at_ifaddr *at_ifaddr_list;
static int aa_dorangeroute(struct ifaddr *ifa,
u_int first, u_int last, int cmd);
@ -57,7 +57,7 @@ at_control(struct socket *so, u_long cmd, caddr_t data,
* If we have an ifp, then find the matching at_ifaddr if it exists
*/
if (ifp != NULL) {
for (aa = at_ifaddr; aa; aa = aa->aa_next) {
for (aa = at_ifaddr_list; aa != NULL; aa = aa->aa_next) {
if (aa->aa_ifp == ifp) break;
}
}
@ -139,7 +139,7 @@ at_control(struct socket *so, u_long cmd, caddr_t data,
*/
if (aa == NULL) {
aa0 = malloc(sizeof(struct at_ifaddr), M_IFADDR, M_WAITOK | M_ZERO);
if ((aa = at_ifaddr) != NULL) {
if ((aa = at_ifaddr_list) != NULL) {
/*
* Don't let the loopback be first, since the first
* address is the machine's default address for
@ -147,17 +147,17 @@ at_control(struct socket *so, u_long cmd, caddr_t data,
* If it is, stick ourself in front, otherwise
* go to the back of the list.
*/
if (at_ifaddr->aa_ifp->if_flags & IFF_LOOPBACK) {
if (at_ifaddr_list->aa_ifp->if_flags & IFF_LOOPBACK) {
aa = aa0;
aa->aa_next = at_ifaddr;
at_ifaddr = aa;
aa->aa_next = at_ifaddr_list;
at_ifaddr_list = aa;
} else {
for (; aa->aa_next; aa = aa->aa_next)
;
aa->aa_next = aa0;
}
} else {
at_ifaddr = aa0;
at_ifaddr_list = aa0;
}
aa = aa0;
@ -277,8 +277,8 @@ at_control(struct socket *so, u_long cmd, caddr_t data,
* as well, or we'd be in deep trouble
*/
aa0 = aa;
if (aa0 == (aa = at_ifaddr)) {
at_ifaddr = aa->aa_next;
if (aa0 == (aa = at_ifaddr_list)) {
at_ifaddr_list = aa->aa_next;
} else {
while (aa->aa_next && (aa->aa_next != aa0)) {
aa = aa->aa_next;
@ -670,7 +670,7 @@ at_broadcast(sat)
/*
* failing that, if the net is one we have, it's a broadcast as well.
*/
for (aa = at_ifaddr; aa; aa = aa->aa_next) {
for (aa = at_ifaddr_list; aa != NULL; aa = aa->aa_next) {
if ((aa->aa_ifp->if_flags & IFF_BROADCAST)
&& (ntohs(sat->sat_addr.s_net) >= ntohs(aa->aa_firstnet)
&& ntohs(sat->sat_addr.s_net) <= ntohs(aa->aa_lastnet))) {
@ -801,10 +801,10 @@ aa_clean(void)
struct ifaddr *ifa;
struct ifnet *ifp;
while (aa = at_ifaddr) {
while ((aa = at_ifaddr_list) != NULL) {
ifp = aa->aa_ifp;
at_scrub(ifp, aa);
at_ifaddr = aa->aa_next;
at_ifaddr_list = aa->aa_next;
if ((ifa = ifp->if_addrlist) == (struct ifaddr *)aa) {
ifp->if_addrlist = ifa->ifa_next;
} else {

View File

@ -60,7 +60,7 @@ struct at_aliasreq {
#define AFA_PHASE2 0x0004
#ifdef _KERNEL
extern struct at_ifaddr *at_ifaddr;
extern struct at_ifaddr *at_ifaddr_list;
#endif
#endif /* _NETATALK_AT_VAR_H_ */

View File

@ -126,7 +126,7 @@ ddp_input(m, ifp, elh, phase)
* Make sure that we point to the phase1 ifaddr info
* and that it's valid for this packet.
*/
for (aa = at_ifaddr; aa; aa = aa->aa_next) {
for (aa = at_ifaddr_list; aa != NULL; aa = aa->aa_next) {
if ((aa->aa_ifp == ifp)
&& ((aa->aa_flags & AFA_PHASE2) == 0)
&& ((to.sat_addr.s_node == AA_SAT(aa)->sat_addr.s_node)
@ -185,7 +185,7 @@ ddp_input(m, ifp, elh, phase)
* this node number will match (which may NOT be what we want,
* but it's probably safe in 99.999% of cases.
*/
for (aa = at_ifaddr; aa; aa = aa->aa_next) {
for (aa = at_ifaddr_list; aa != NULL; aa = aa->aa_next) {
if (phase == 1 && (aa->aa_flags & AFA_PHASE2)) {
continue;
}
@ -204,7 +204,7 @@ ddp_input(m, ifp, elh, phase)
* A destination network was given. We just try to find
* which ifaddr info matches it.
*/
for (aa = at_ifaddr; aa; aa = aa->aa_next) {
for (aa = at_ifaddr_list; aa != NULL; aa = aa->aa_next) {
/*
* This is a kludge. Accept packets that are
* for any router on a local netrange.

View File

@ -149,7 +149,7 @@ ddp_route(struct mbuf *m, struct route *ro)
&& (ro->ro_rt->rt_ifa)
&& (ifp = ro->ro_rt->rt_ifa->ifa_ifp)) {
net = ntohs(satosat(ro->ro_rt->rt_gateway)->sat_addr.s_net);
for (aa = at_ifaddr; aa; aa = aa->aa_next) {
for (aa = at_ifaddr_list; aa != NULL; aa = aa->aa_next) {
if (((net == 0) || (aa->aa_ifp == ifp)) &&
net >= ntohs(aa->aa_firstnet) &&
net <= ntohs(aa->aa_lastnet)) {

View File

@ -50,7 +50,7 @@ at_pcbsetaddr(struct ddpcb *ddp, struct sockaddr *addr, struct thread *td)
if (sat->sat_addr.s_node != ATADDR_ANYNODE ||
sat->sat_addr.s_net != ATADDR_ANYNET) {
for (aa = at_ifaddr; aa; aa = aa->aa_next) {
for (aa = at_ifaddr_list; aa != NULL; aa = aa->aa_next) {
if ((sat->sat_addr.s_net == AA_SAT(aa)->sat_addr.s_net) &&
(sat->sat_addr.s_node == AA_SAT(aa)->sat_addr.s_node)) {
break;
@ -82,10 +82,10 @@ at_pcbsetaddr(struct ddpcb *ddp, struct sockaddr *addr, struct thread *td)
if (sat->sat_addr.s_node == ATADDR_ANYNODE &&
sat->sat_addr.s_net == ATADDR_ANYNET) {
if (at_ifaddr == NULL) {
if (at_ifaddr_list == NULL) {
return (EADDRNOTAVAIL);
}
sat->sat_addr = AA_SAT(at_ifaddr)->sat_addr;
sat->sat_addr = AA_SAT(at_ifaddr_list)->sat_addr;
}
ddp->ddp_lsat = *sat;
@ -165,7 +165,7 @@ at_pcbconnect(struct ddpcb *ddp, struct sockaddr *addr, struct thread *td)
}
aa = NULL;
if ((ifp = ro->ro_rt->rt_ifp) != NULL) {
for (aa = at_ifaddr; aa; aa = aa->aa_next) {
for (aa = at_ifaddr_list; aa != NULL; aa = aa->aa_next) {
if (aa->aa_ifp == ifp &&
ntohs(net) >= ntohs(aa->aa_firstnet) &&
ntohs(net) <= ntohs(aa->aa_lastnet)) {
@ -202,7 +202,7 @@ at_pcbconnect(struct ddpcb *ddp, struct sockaddr *addr, struct thread *td)
*/
aa = NULL;
if (ro->ro_rt && (ifp = ro->ro_rt->rt_ifp)) {
for (aa = at_ifaddr; aa; aa = aa->aa_next) {
for (aa = at_ifaddr_list; aa != NULL; aa = aa->aa_next) {
if (aa->aa_ifp == ifp) {
break;
}