#ifndef mac_common_config_h #define mac_common_config_h /* Maria project {{{ * * Copyright (C) 2007 Spidcom * * <<>> * * }}} */ /** * \file mac/common/config.h * \brief MAC global configuration. * \ingroup mac_common * * Contains information about the current STA and AVLN settings. */ #include "mac/common/defs.h" #include "mac/common/nek.h" #include "mac/common/tonemask.h" /** Global mac configuration. * \todo Document how to change a value (layers will want to be informed of * the change, does the stack needs to be reseted). */ struct mac_config_t { /** Our terminal equipment identifier. */ u8 tei; /** RTS broadcast flag. */ bool rts_broadcast; /** Is this STA authenticated. */ bool authenticated; /** EKS/NEK pairs, used for broadcast. */ mac_nek_t nek[2]; /** Number of FC symbol. */ uint fc_symbols_nb; /** Tonemask. */ tonemask_info_t tonemask_info; /** NTB offset. NTB = phy_date () + ntb_offset_tck. */ u32 ntb_offset_tck; /** Random seed. * For tests, it should be different for each station, but it should be * the same for each run. * For production run, it should be chosen as randomly as possible (may be * sampled from medium). */ u32 seed; /** The mac address of the station */ mac_t sta_mac_address; /** TEI used for partial acknowledgment if none is specified in the MFS, * or MAC_TEI_BCAST for none. */ u8 partial_ack_tei_default; }; typedef struct mac_config_t mac_config_t; BEGIN_DECLS /** * Provide a default MAC global configuration. * \param config global configuration. */ void mac_config_init (mac_config_t *config); END_DECLS #endif /* mac_common_config_h */