summaryrefslogtreecommitdiffstats
path: root/sys/netatalk
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1997-09-21 22:02:25 +0000
committergibbs <gibbs@FreeBSD.org>1997-09-21 22:02:25 +0000
commita415512fd4b3c95c87808401c97e649c8ac7f41e (patch)
tree8463ee0d001498dfdefc34fc8911c491b2f0ecf0 /sys/netatalk
parent52ace446d29ab170f74f1db02832f24b01e04f20 (diff)
downloadFreeBSD-src-a415512fd4b3c95c87808401c97e649c8ac7f41e.zip
FreeBSD-src-a415512fd4b3c95c87808401c97e649c8ac7f41e.tar.gz
Update for new callout interface.
Diffstat (limited to 'sys/netatalk')
-rw-r--r--sys/netatalk/aarp.c13
-rw-r--r--sys/netatalk/at_control.c2
-rw-r--r--sys/netatalk/at_var.h17
3 files changed, 18 insertions, 14 deletions
diff --git a/sys/netatalk/aarp.c b/sys/netatalk/aarp.c
index cc54102..56c8924 100644
--- a/sys/netatalk/aarp.c
+++ b/sys/netatalk/aarp.c
@@ -64,13 +64,16 @@ u_char aarp_org_code[ 3 ] = {
0x00, 0x00, 0x00,
};
+static struct callout_handle aarptimer_ch =
+ CALLOUT_HANDLE_INITIALIZER(&aarptimer_ch);
+
static void
aarptimer(void *ignored)
{
struct aarptab *aat;
int i, s;
- timeout( aarptimer, (caddr_t)0, AARPT_AGE * hz );
+ aarptimer_ch = timeout( aarptimer, (caddr_t)0, AARPT_AGE * hz );
aat = aarptab;
for ( i = 0; i < AARPTAB_SIZE; i++, aat++ ) {
if ( aat->aat_flags == 0 || ( aat->aat_flags & ATF_PERM ))
@@ -362,7 +365,7 @@ at_aarpinput( struct arpcom *ac, struct mbuf *m)
* probed for the same address we'd like to use. Change the
* address we're probing for.
*/
- untimeout( aarpprobe, ac );
+ untimeout( aarpprobe, ac, aa->aa_ch );
wakeup( aa );
m_freem( m );
return;
@@ -488,7 +491,7 @@ aarptnew( addr )
if ( first ) {
first = 0;
- timeout( aarptimer, (caddr_t)0, hz );
+ aarptimer_ch = timeout( aarptimer, (caddr_t)0, hz );
}
aat = &aarptab[ AARPTAB_HASH( *addr ) * AARPTAB_BSIZ ];
for ( n = 0; n < AARPTAB_BSIZ; n++, aat++ ) {
@@ -547,7 +550,7 @@ aarpprobe( void *arg )
wakeup( aa );
return;
} else {
- timeout( aarpprobe, (caddr_t)ac, hz / 5 );
+ aa->aa_ch = timeout( aarpprobe, (caddr_t)ac, hz / 5 );
}
if (( m = m_gethdr( M_DONTWAIT, MT_DATA )) == NULL ) {
@@ -612,7 +615,7 @@ aarp_clean(void)
struct aarptab *aat;
int i;
- untimeout( aarptimer, 0 );
+ untimeout( aarptimer, 0, aarptimer_ch );
for ( i = 0, aat = aarptab; i < AARPTAB_SIZE; i++, aat++ ) {
if ( aat->aat_hold ) {
m_freem( aat->aat_hold );
diff --git a/sys/netatalk/at_control.c b/sys/netatalk/at_control.c
index 030105f..3777a23 100644
--- a/sys/netatalk/at_control.c
+++ b/sys/netatalk/at_control.c
@@ -520,7 +520,7 @@ at_ifinit( ifp, aa, sat )
* start off the probes as an asynchronous activity.
* though why wait 200mSec?
*/
- timeout( aarpprobe, (caddr_t)ifp, hz / 5 );
+ aa->aa_ch = timeout( aarpprobe, (caddr_t)ifp, hz / 5 );
if ( tsleep( aa, PPAUSE|PCATCH, "at_ifinit", 0 )) {
/*
* theoretically we shouldn't time out here
diff --git a/sys/netatalk/at_var.h b/sys/netatalk/at_var.h
index 0e070f7..b6829ba 100644
--- a/sys/netatalk/at_var.h
+++ b/sys/netatalk/at_var.h
@@ -28,16 +28,17 @@
* but also the legal networks on the interface.
*/
struct at_ifaddr {
- struct ifaddr aa_ifa;
+ struct ifaddr aa_ifa;
# define aa_ifp aa_ifa.ifa_ifp
- struct sockaddr_at aa_addr;
- struct sockaddr_at aa_broadaddr;
+ struct sockaddr_at aa_addr;
+ struct sockaddr_at aa_broadaddr;
# define aa_dstaddr aa_broadaddr;
- struct sockaddr_at aa_netmask;
- int aa_flags;
- u_short aa_firstnet, aa_lastnet;
- int aa_probcnt;
- struct at_ifaddr *aa_next;
+ struct sockaddr_at aa_netmask;
+ int aa_flags;
+ u_short aa_firstnet, aa_lastnet;
+ int aa_probcnt;
+ struct callout_handle aa_ch;
+ struct at_ifaddr *aa_next;
};
struct at_aliasreq {
OpenPOWER on IntegriCloud