diff options
Diffstat (limited to 'sys/netatalk/aarp.c')
-rw-r--r-- | sys/netatalk/aarp.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/sys/netatalk/aarp.c b/sys/netatalk/aarp.c index 1d7e029..d81d177 100644 --- a/sys/netatalk/aarp.c +++ b/sys/netatalk/aarp.c @@ -95,14 +95,15 @@ aarptimer(void *ignored) * consideration. */ struct ifaddr * -at_ifawithnet( sat, ifa ) +at_ifawithnet( sat, ifah ) struct sockaddr_at *sat; - struct ifaddr *ifa; + struct ifaddrhead *ifah; { struct sockaddr_at *sat2; struct netrange *nr; + struct ifaddr *ifa; - for (; ifa; ifa = ifa->ifa_next ) { + for (ifa = ifah->tqh_first; ifa; ifa = ifa->ifa_link.tqe_next ) { if ( ifa->ifa_addr->sa_family != AF_APPLETALK ) { continue; } @@ -155,8 +156,8 @@ aarpwhohas( struct arpcom *ac, struct sockaddr_at *sat ) * interface with the same address as we're looking for. If the * net is phase 2, generate an 802.2 and SNAP header. */ - if (( aa = (struct at_ifaddr *)at_ifawithnet( sat, ac->ac_if.if_addrlist )) - == NULL ) { + if ((aa = (struct at_ifaddr *)at_ifawithnet(sat, &ac->ac_if.if_addrhead)) + == NULL) { m_freem( m ); return; } @@ -213,8 +214,8 @@ aarpresolve( ac, m, destsat, desten ) int s; if ( at_broadcast( destsat )) { - if (( aa = (struct at_ifaddr *)at_ifawithnet( destsat, - ((struct ifnet *)ac)->if_addrlist )) == NULL ) { + if ((aa = (struct at_ifaddr *)at_ifawithnet(destsat, + &((struct ifnet *)ac)->if_addrhead)) == NULL) { m_freem( m ); return( 0 ); } @@ -325,8 +326,8 @@ at_aarpinput( struct arpcom *ac, struct mbuf *m) sat.sat_len = sizeof(struct sockaddr_at); sat.sat_family = AF_APPLETALK; sat.sat_addr.s_net = net; - if (( aa = (struct at_ifaddr *)at_ifawithnet( &sat, - ac->ac_if.if_addrlist )) == NULL ) { + if ((aa = (struct at_ifaddr *)at_ifawithnet(&sat, + &ac->ac_if.if_addrhead)) == NULL) { m_freem( m ); return; } @@ -337,8 +338,8 @@ at_aarpinput( struct arpcom *ac, struct mbuf *m) * Since we don't know the net, we just look for the first * phase 1 address on the interface. */ - for ( aa = (struct at_ifaddr *)ac->ac_if.if_addrlist; aa; - aa = (struct at_ifaddr *)aa->aa_ifa.ifa_next ) { + for (aa = (struct at_ifaddr *)ac->ac_if.if_addrhead.tqh_first; aa; + aa = (struct at_ifaddr *)aa->aa_ifa.ifa_link.tqe_next) { if ( AA_SAT( aa )->sat_family == AF_APPLETALK && ( aa->aa_flags & AFA_PHASE2 ) == 0 ) { break; @@ -533,8 +534,8 @@ aarpprobe( struct arpcom *ac ) * interface with the same address as we're looking for. If the * net is phase 2, generate an 802.2 and SNAP header. */ - for ( aa = (struct at_ifaddr *)ac->ac_if.if_addrlist; aa; - aa = (struct at_ifaddr *)aa->aa_ifa.ifa_next ) { + for (aa = (struct at_ifaddr *)ac->ac_if.if_addrhead.tqh_first; aa; + aa = (struct at_ifaddr *)aa->aa_ifa.ifa_link.tqe_next) { if ( AA_SAT( aa )->sat_family == AF_APPLETALK && ( aa->aa_flags & AFA_PROBING )) { break; |