Skip to content

Commit

Permalink
Removed MIP6_CALLOUTTEST code
Browse files Browse the repository at this point in the history
  • Loading branch information
t-momose committed Aug 8, 2003
1 parent 8d2ae57 commit 0dc8b9b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 62 deletions.
49 changes: 1 addition & 48 deletions kame/sys/netinet6/mip6_cncore.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $KAME: mip6_cncore.c,v 1.27 2003/08/07 09:30:58 keiichi Exp $ */
/* $KAME: mip6_cncore.c,v 1.28 2003/08/08 11:59:11 t-momose Exp $ */

/*
* Copyright (C) 2003 WIDE Project. All rights reserved.
Expand Down Expand Up @@ -807,9 +807,6 @@ mip6_bc_init()
callout_init(&mip6_bc_ch);
#endif
bzero(&mip6_bc_hash, sizeof(mip6_bc_hash));
#ifdef MIP6_CALLOUTTEST
TAILQ_INIT(&mip6_bc_timeout_list);
#endif
}

struct mip6_bc *
Expand Down Expand Up @@ -849,9 +846,6 @@ mip6_bc_create(phaddr, pcoa, addr, flags, seqno, lifetime, ifp)
mbc->mbc_expire = 0x7fffffff;
mbc->mbc_state = MIP6_BC_FSM_STATE_BOUND;
mbc->mbc_mpa_exp = time_second; /* set to current time to send mpa as soon as created it */
#ifdef MIP6_CALLOUTTEST
/* It isn't necessary to create timeout entry here because it will be done when inserting mbc to the list */
#endif /* MIP6_CALLOUTTEST */
mbc->mbc_state = 0;
mbc->mbc_ifp = ifp;
mbc->mbc_llmbc = NULL;
Expand Down Expand Up @@ -904,11 +898,6 @@ mip6_bc_list_insert(mbc_list, mbc)

mbc->mbc_refcnt++;

#ifdef MIP6_CALLOUTTEST
mbc->mbc_timeout = mip6_timeoutentry_insert(mbc->mbc_expire, (caddr_t)mbc); /* For BC expiration */
mbc->mbc_brr_timeout = mip6_timeoutentry_insert(mbc->mbc_expire - mbc->mbc_lifetime / 4, (caddr_t)mbc); /* For BRR */
#endif

if (mip6_bc_count == 0) {
mip6log((LOG_INFO, "%s:%d: BC timer started.\n",
__FILE__, __LINE__));
Expand Down Expand Up @@ -943,11 +932,6 @@ mip6_bc_list_remove(mbc_list, mbc)
mip6_bc_hash[id] = NULL;
}
}
#ifdef MIP6_CALLOUTTEST
if (mbc->mbc_timeout) {
mip6_timeoutentry_remove(mbc->mbc_timeout);
}
#endif

mbc->mbc_refcnt--;
if (mbc->mbc_flags & IP6MU_CLONED) {
Expand Down Expand Up @@ -1061,10 +1045,6 @@ mip6_bc_update(mbc, coa_sa, dst_sa, flags, seqno, lifetime)
if (mbc->mbc_expire < time_second)
mbc->mbc_expire = 0x7fffffff;
mbc->mbc_state = MIP6_BC_FSM_STATE_BOUND;
#ifdef MIP6_CALLOUTTEST
mip6_timeoutentry_update(mbc->mbc_timeout, mbc->mbc_expire);
mip6_timeoutentry_update(mbc->mbc_brr_timeout, mbc->mbc_expire - mbc->mbc_lifetime / 4);
#endif /* MIP6_CALLOUTTEST */

return (0);
}
Expand Down Expand Up @@ -1295,16 +1275,10 @@ mip6_bc_timeout(dummy)
void *dummy;
{
int s;
#ifdef MIP6_CALLOUTTEST
struct mip6_bc *mbc;
struct mip6_timeout *mto, *mto_next;
struct mip6_timeout_entry *mtoe, *mtoe_next;
#else
struct mip6_bc *mbc, *mbc_next;
#ifdef MIP6_HOME_AGENT
int error = 0;
#endif /* MIP6_HOME_AGENT */
#endif /* MIP6_CALLOUTTEST */
#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
long time_second = time.tv_sec;
#endif
Expand All @@ -1315,26 +1289,6 @@ mip6_bc_timeout(dummy)
s = splnet();
#endif

#ifdef MIP6_CALLOUTTEST
for (mto = TAILQ_FIRST(&mip6_bc_timeout_list); mto; mto = mto_next) {
mto_next = TAILQ_NEXT(mto, mto_entry);

if (mto->mto_expire > time_second)
break;
for (mtoe = LIST_FIRST(&mto->mto_timelist); mtoe; mtoe = mtoe_next) {
mtoe_next = LIST_NEXT(mtoe, mtoe_entry);
mbc = (struct mip6_bc *)mtoe->mtoe_ptr;
if (mbc->mbc_expire <= time_second) {
mip6_bc_list_remove(&mip6_bc_list,
(struct mip6_bc *)mtoe->mtoe_ptr);
} else {
/* This entry shows BRR timeout */
mbc->mbc_state |= MIP6_BC_STATE_BR_WAITSENT;
mip6_timeoutentry_remove(mtoe);
}
}
}
#else
for (mbc = LIST_FIRST(&mip6_bc_list); mbc; mbc = mbc_next) {
mbc_next = LIST_NEXT(mbc, mbc_entry);
switch (mbc->mbc_state) {
Expand Down Expand Up @@ -1390,7 +1344,6 @@ mip6_bc_timeout(dummy)
break;
}
}
#endif

if (mip6_bc_count != 0)
mip6_bc_starttimer();
Expand Down
10 changes: 1 addition & 9 deletions kame/sys/netinet6/mip6_hacore.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $KAME: mip6_hacore.c,v 1.11 2003/07/31 09:56:39 keiichi Exp $ */
/* $KAME: mip6_hacore.c,v 1.12 2003/08/08 11:59:11 t-momose Exp $ */

/*
* Copyright (C) 2003 WIDE Project. All rights reserved.
Expand Down Expand Up @@ -213,10 +213,6 @@ mip6_process_hrbu(bi)
if (llmbc->mbc_expire < time_second)
llmbc->mbc_expire = 0x7fffffff;
llmbc->mbc_state = MIP6_BC_FSM_STATE_BOUND;
#ifdef MIP6_CALLOUTTEST
mip6_timeoutentry_update(llmbc->mbc_timeout, llmbc->mbc_expire);
mip6_timeoutentry_update(llmbc->mbc_brr_timeout, llmbc->mbc_expire - mbc->mbc_lifetime / 4);
#endif /* MIP6_CALLOUTTEST */
/* modify encapsulation entry */
/* XXX */
if (mip6_tunnel_control(MIP6_TUNNEL_CHANGE, llmbc,
Expand Down Expand Up @@ -271,10 +267,6 @@ mip6_process_hrbu(bi)
if (mbc->mbc_expire < time_second)
mbc->mbc_expire = 0x7fffffff;
mbc->mbc_state = MIP6_BC_FSM_STATE_BOUND;
#ifdef MIP6_CALLOUTTEST
mip6_timeoutentry_update(mbc->mbc_timeout, mbc->mbc_expire);
/* mip6_timeoutentry_update(mbc->mbc_brr_timeout, mbc->mbc_expire - mbc->mbc_lifetime / 4); */
#endif /* MIP6_CALLOUTTEST */

/* modify the encapsulation entry. */
if (mip6_tunnel_control(MIP6_TUNNEL_CHANGE, mbc,
Expand Down
6 changes: 1 addition & 5 deletions kame/sys/netinet6/mip6_var.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $KAME: mip6_var.h,v 1.97 2003/08/04 05:25:38 keiichi Exp $ */
/* $KAME: mip6_var.h,v 1.98 2003/08/08 11:59:11 t-momose Exp $ */

/*
* Copyright (C) 2001 WIDE Project. All rights reserved.
Expand Down Expand Up @@ -100,10 +100,6 @@ struct mip6_bc {
void *mbc_dad; /* dad handler */
time_t mbc_mpa_exp; /* expiration time for sending MPA */
/* valid only when BUF_HOME. */
#ifdef MIP6_CALLOUTTEST
struct mip6_timeout_entry *mbc_timeout;
struct mip6_timeout_entry *mbc_brr_timeout;
#endif /* MIP6_CALLOUTTEST */
struct mip6_bc *mbc_llmbc;
u_int32_t mbc_refcnt;
};
Expand Down

0 comments on commit 0dc8b9b

Please sign in to comment.