Permalink
Browse files

MIP6: Sending Mobile Prefix Advertisement periodically.

  • Loading branch information...
1 parent 6e46a5b commit 95aacf002d03875d69acf1fa59aaf4a2115a51e9 t-momose committed Feb 28, 2003
Showing with 11 additions and 2 deletions.
  1. +2 −1 kame/sys/netinet6/mip6_binding.c
  2. +9 −1 kame/sys/netinet6/mip6_var.h
@@ -1,4 +1,4 @@
-/* $KAME: mip6_binding.c,v 1.175 2003/02/20 12:06:52 keiichi Exp $ */
+/* $KAME: mip6_binding.c,v 1.176 2003/02/28 12:03:04 t-momose Exp $ */
/*
* Copyright (C) 2001 WIDE Project. All rights reserved.
@@ -2059,6 +2059,7 @@ mip6_bc_create(phaddr, pcoa, addr, flags, seqno, lifetime, ifp)
/* sanity check for overflow */
if (mbc->mbc_expire < time_second)
mbc->mbc_expire = 0x7fffffff;
+ 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 */
@@ -1,4 +1,4 @@
-/* $KAME: mip6_var.h,v 1.84 2003/02/24 02:57:58 k-sugyou Exp $ */
+/* $KAME: mip6_var.h,v 1.85 2003/02/28 12:03:04 t-momose Exp $ */
/*
* Copyright (C) 2001 WIDE Project. All rights reserved.
@@ -91,6 +91,8 @@ struct mip6_prefix {
u_int32_t mpfx_pltime;
time_t mpfx_plexpire;
struct sockaddr_in6 mpfx_haddr;
+ u_int16_t mpfx_mpsid; /* Used for MPS */
+ u_int8_t mpfx_sentmps; /* 1: sent MPS to HA with above ID */
};
LIST_HEAD(mip6_prefix_list, mip6_prefix);
@@ -134,6 +136,10 @@ LIST_HEAD(mip6_subnet_list, mip6_subnet);
#define MIP6_SUBNET_TIMEOUT_INTERVAL 10
+/* MPS/MPA related constants */
+#define MIP6_MAX_MOB_PFX_ADV_INTERVAL 86400
+#define MIP6_MIN_MOB_PFX_ADV_INTERVAL 600
+
/* the binding update list entry. */
struct mip6_bu {
LIST_ENTRY(mip6_bu) mbu_entry;
@@ -239,6 +245,8 @@ struct mip6_bc {
/* valid only when BUF_HOME. */
const struct encaptab *mbc_encap; /* encapsulation from MN */
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;

0 comments on commit 95aacf0

Please sign in to comment.