diff options
author | monthadar <monthadar@FreeBSD.org> | 2012-05-01 15:47:30 +0000 |
---|---|---|
committer | monthadar <monthadar@FreeBSD.org> | 2012-05-01 15:47:30 +0000 |
commit | 661f0aa0b474eeb0e2188d7c75ce16dbe34a0229 (patch) | |
tree | 65098c124ba0f2f21be8fe1f8be7ee9c5ab321af /sys/net80211/ieee80211_mesh.h | |
parent | 6b5007d019c581519337942352d927a5c7de4f19 (diff) | |
download | FreeBSD-src-661f0aa0b474eeb0e2188d7c75ce16dbe34a0229.zip FreeBSD-src-661f0aa0b474eeb0e2188d7c75ce16dbe34a0229.tar.gz |
Implemented so that Mesh forwarding information lifetime is dynamic.
* Introduced ieee80211_mesh_rt_update that updates a route with the
maximum(lifetime left, new lifetime);
* Modified ieee80211_mesh_route struct by adding a lock that will be used
by both ieee80211_mesh_rt_update and precursor code (added in future commit);
* Modified in ieee80211_hwmp.c HWMP code to use new ieee80211_mesh_rt_update;
* Modified mesh_rt_flush_invalid to use new ieee80211_mesh_rt_update;
* mesh_rt_flush also checks that lifetime == 0, this gives route discovery
a change to complete;
* Modified mesh_recv_mgmt case IEEE80211_FC0_SUBTYPE_BEACON:
when ever we received a beacon from a neighbor we update route lifetime;
Approved by: adrian
Diffstat (limited to 'sys/net80211/ieee80211_mesh.h')
-rw-r--r-- | sys/net80211/ieee80211_mesh.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_mesh.h b/sys/net80211/ieee80211_mesh.h index b3cb73d..2d2631d 100644 --- a/sys/net80211/ieee80211_mesh.h +++ b/sys/net80211/ieee80211_mesh.h @@ -409,9 +409,19 @@ MALLOC_DECLARE(M_80211_MESH_PREP); MALLOC_DECLARE(M_80211_MESH_PERR); MALLOC_DECLARE(M_80211_MESH_RT); +/* + * Basic forwarding information: + * o Destination MAC + * o Next-hop MAC + * o Precursor list (not implemented yet) + * o Path timeout + * The rest is part of the active Mesh path selection protocol. + * XXX: to be moved out later. + */ struct ieee80211_mesh_route { TAILQ_ENTRY(ieee80211_mesh_route) rt_next; - int rt_crtime; /* creation time */ + struct mtx rt_lock; /* fine grained route lock */ + int rt_updtime; /* last update time */ uint8_t rt_dest[IEEE80211_ADDR_LEN]; uint8_t rt_nexthop[IEEE80211_ADDR_LEN]; uint32_t rt_metric; /* path metric */ @@ -419,7 +429,7 @@ struct ieee80211_mesh_route { uint16_t rt_flags; #define IEEE80211_MESHRT_FLAGS_VALID 0x01 /* patch discovery complete */ #define IEEE80211_MESHRT_FLAGS_PROXY 0x02 /* proxy entry */ - uint32_t rt_lifetime; + uint32_t rt_lifetime; /* route timeout */ uint32_t rt_lastmseq; /* last seq# seen dest */ void *rt_priv; /* private data */ }; @@ -508,6 +518,7 @@ void ieee80211_mesh_rt_del(struct ieee80211vap *, void ieee80211_mesh_rt_flush(struct ieee80211vap *); void ieee80211_mesh_rt_flush_peer(struct ieee80211vap *, const uint8_t [IEEE80211_ADDR_LEN]); +int ieee80211_mesh_rt_update(struct ieee80211_mesh_route *rt, int); void ieee80211_mesh_proxy_check(struct ieee80211vap *, const uint8_t [IEEE80211_ADDR_LEN]); |