From 4cc361aa037bca0c9838797f3a4f12d9c9c48b43 Mon Sep 17 00:00:00 2001 From: Monthadar Al Jaberi Date: Thu, 7 Feb 2013 21:24:20 +0000 Subject: Propagate GANN frames, and store know gate info. * Modified mesh_recv_action_meshgate to do following: + if mesh STA already knows the mesh gate of the recevied GANN frame + if mesh gate is know, check seq number according to 802.11 standard + if mesh gate is not know, add it to the list of known mesh gates + if forwarding is enabled and ttl >= 1 then propagate the GANN frame; * Declare a new malloc type M_80211_MESH_GT_RT; * Declare a struct to store GANN information, ieee80211_mesh_gate_route. And add it as a TAILQ list to ieee80211_mesh_state; Approved by: adrian (mentor) --- sys/net80211/ieee80211_mesh.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sys/net80211/ieee80211_mesh.h') diff --git a/sys/net80211/ieee80211_mesh.h b/sys/net80211/ieee80211_mesh.h index 4447a3f0ced0..6d4a2f74f908 100644 --- a/sys/net80211/ieee80211_mesh.h +++ b/sys/net80211/ieee80211_mesh.h @@ -405,6 +405,7 @@ MALLOC_DECLARE(M_80211_MESH_PREP); MALLOC_DECLARE(M_80211_MESH_PERR); MALLOC_DECLARE(M_80211_MESH_RT); +MALLOC_DECLARE(M_80211_MESH_GT_RT); /* * Basic forwarding information: * o Destination MAC @@ -437,6 +438,16 @@ struct ieee80211_mesh_route { }; #define IEEE80211_MESH_ROUTE_PRIV(rt, cast) ((cast *)rt->rt_priv) +/* + * Stored information about known mesh gates. + */ +struct ieee80211_mesh_gate_route { + TAILQ_ENTRY(ieee80211_mesh_gate_route) gr_next; + uint8_t gr_addr[IEEE80211_ADDR_LEN]; + uint32_t gr_lastseq; + struct ieee80211_mesh_route *gr_route; +}; + #define IEEE80211_MESH_PROTO_DSZ 12 /* description size */ /* * Mesh Path Selection Protocol. @@ -508,6 +519,7 @@ struct ieee80211_mesh_state { struct callout ms_cleantimer; struct callout ms_gatetimer; ieee80211_mesh_seq ms_gateseq; + TAILQ_HEAD(, ieee80211_mesh_gate_route) ms_known_gates; TAILQ_HEAD(, ieee80211_mesh_route) ms_routes; struct ieee80211_mesh_proto_metric *ms_pmetric; struct ieee80211_mesh_proto_path *ms_ppath; -- cgit v1.2.3