summaryrefslogtreecommitdiffstats
path: root/sys/netatalk/aarp.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-12-13 21:29:07 +0000
committerwollman <wollman@FreeBSD.org>1996-12-13 21:29:07 +0000
commit3417f9411098d1cd19c5db539c0768e778b83a1c (patch)
tree782c07e423375f5e3235e7a677261301a91e59c6 /sys/netatalk/aarp.c
parent4ad813db29ba756a35db6540961c86a4c1f5592b (diff)
downloadFreeBSD-src-3417f9411098d1cd19c5db539c0768e778b83a1c.zip
FreeBSD-src-3417f9411098d1cd19c5db539c0768e778b83a1c.tar.gz
Convert the interface address and IP interface address structures
to TAILQs. Fix places which referenced these for no good reason that I can see (the references remain, but were fixed to compile again; they are still questionable).
Diffstat (limited to 'sys/netatalk/aarp.c')
-rw-r--r--sys/netatalk/aarp.c27
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;
OpenPOWER on IntegriCloud