#ifndef cp_sta_mgr_inc_context_h #define cp_sta_mgr_inc_context_h /* Cesar project {{{ * * Copyright (C) 2008 Spidcom * * <<>> * * }}} */ /** * \file cp/sta/mgr/inc/context.h * \brief Station manager context. * \ingroup cp_sta_mgr * */ /* Private interfaces. */ #include "cp/sta/mgr/inc/sta_own_data.h" #include "cp/sta/mgr/inc/net.h" #define CP_STA_MGR_STATION_RELEASE_MS 5000 struct cp_sta_mgr_t { /** Network list. */ cp_net_t networks [HPAV_AVLNS_NB_MAX]; /** 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; /** * Release station list. Use by the CCo to keep unavailable the TEI of the * station. It allows too the data plane to finish the transmission of the * data with the station. */ list_t release_sta_list; /** * Set to add all the stations added to the station manager. * This will allow the station manager to keep a trace of the stations. */ set_t stas; /** Slab Cache. */ slab_cache_t sta_slab_cache; }; BEGIN_DECLS /** * Add a station to the station manager. * \param ctx the CP context. * \param net the network within the station exists. * \param tei the station's TEI. * \param mac_address the station's mac address. * \return the newly created station. */ cp_sta_t* cp_sta_mgr_sta_add_realy (cp_t *ctx, cp_net_t *net, cp_tei_t tei, mac_t mac_address); END_DECLS #endif /* cp_sta_mgr_inc_context_h */