From 48d08abfe63192542603223b1fbad2b0bb6f6f9e Mon Sep 17 00:00:00 2001 From: laranjeiro Date: Fri, 3 Oct 2008 14:54:00 +0000 Subject: cp/sta/mgr: Update the station manager to handle an it's own AVLN only when the station is associated to it. * The station slab cache is present in the station manager. * Station own data handle the nid and the snid of the station AVLN. * Added a pointer in sta_mgr to our AVLN. * Added missing APIs. * Fix the set pco status and pco glid in station own data. * Rewrote the unit test to cover all the possibilities. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@3155 017c9cb6-072f-447c-8318-d5b54f68fe89 --- cesar/cp/sta/mgr/inc/net.h | 9 --------- cesar/cp/sta/mgr/inc/net_list.h | 3 --- cesar/cp/sta/mgr/inc/sta_mgr.h | 8 ++++++++ cesar/cp/sta/mgr/inc/sta_own_data.h | 19 +++++++++---------- 4 files changed, 17 insertions(+), 22 deletions(-) (limited to 'cesar/cp/sta/mgr/inc') diff --git a/cesar/cp/sta/mgr/inc/net.h b/cesar/cp/sta/mgr/inc/net.h index 9af36b05e1..8acc1573b0 100644 --- a/cesar/cp/sta/mgr/inc/net.h +++ b/cesar/cp/sta/mgr/inc/net.h @@ -31,10 +31,6 @@ enum cp_mactotei_tags_t struct cp_net_t { - /** Indicate if it is the station's AVLN. If not the commit to - * dataplane will not have any effect. */ - bool station_avln; - /** AVLN's SNID. */ cp_snid_t snid; @@ -88,11 +84,6 @@ struct cp_net_t * The network mode. */ cp_net_network_mode_t network_mode; - - /** - * Slab cache. - */ - slab_cache_t *sta_slab_cache; }; diff --git a/cesar/cp/sta/mgr/inc/net_list.h b/cesar/cp/sta/mgr/inc/net_list.h index 5322fd0be3..5c4f388d9f 100644 --- a/cesar/cp/sta/mgr/inc/net_list.h +++ b/cesar/cp/sta/mgr/inc/net_list.h @@ -30,9 +30,6 @@ struct cp_net_list_t * The possibles AVLN, index 0 corresponds to our AVLN. */ cp_net_t networks [8]; - - /** Slab Cache. */ - slab_cache_t sta_slab_cache; }; #endif /* cp_sta_mgr_inc_net_list_h */ diff --git a/cesar/cp/sta/mgr/inc/sta_mgr.h b/cesar/cp/sta/mgr/inc/sta_mgr.h index 1fc3788fde..ac77ac4130 100644 --- a/cesar/cp/sta/mgr/inc/sta_mgr.h +++ b/cesar/cp/sta/mgr/inc/sta_mgr.h @@ -26,6 +26,14 @@ struct cp_sta_mgr_t /** Stations own data. */ cp_sta_own_data_private_t sta_own_data; + + /** Our AVLN. + * This pointer points to our AVLN when the station is associated, NULL + * in the other case. */ + cp_net_t *our_avln; + + /** Slab Cache. */ + slab_cache_t sta_slab_cache; }; diff --git a/cesar/cp/sta/mgr/inc/sta_own_data.h b/cesar/cp/sta/mgr/inc/sta_own_data.h index c44aca1085..26972b0d17 100644 --- a/cesar/cp/sta/mgr/inc/sta_own_data.h +++ b/cesar/cp/sta/mgr/inc/sta_own_data.h @@ -76,17 +76,16 @@ struct cp_sta_own_data_private_t * Indicate if the station is authenticated or not. */ bool authenticated; -}; -/** - * Set the HFID. - * - * \param hfid the HFID to set. - * \param sta the station own data. - * \param data the human identifier. - */ -void -cp_sta_own_data_set_hfid (const char *hfid, const char *data); + /** + * The Station NID. + */ + cp_nid_t nid; + /** + * The station SNID. + */ + cp_snid_t snid; +}; #endif /* cp_sta_data_inc_sta_own_data_h */ -- cgit v1.2.3