Ignore:
Timestamp:
2015-04-06T10:47:51Z (10 years ago)
Author:
Jan Kolarik <kolarik@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d7dadcb4
Parents:
59fa7ab
Message:

Scanning whole 2.4GHz spectrum, created supplicant for managing connection between device STA and AP, finished association process between STA and AP, handling 4way handshake protocol used for key management, written needed cryptographic algorithms (AES, SHA1, HMAC, PBKDF2) for CCMP protocol, data communication on OPEN/CCMP networks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ieee80211/include/ieee80211.h

    r59fa7ab r1dcc0b9  
    5757#define IEEE80211_CHANNEL_GAP 5
    5858
     59/* Max AMPDU factor. */
     60#define IEEE80211_MAX_AMPDU_FACTOR 13
     61
     62/* Max passphrase length in WPA/WPA2 protocols. */
     63#define IEEE80211_WPA_MAX_PASSWORD_LENGTH 64
     64
     65/** IEEE 802.11 b/g supported data rates in units of 500 kb/s. */
     66static const uint8_t ieee80211bg_data_rates[] = {
     67        2, 4, 11, 12, 18, 22, 24, 36, 48, 72, 96, 108
     68};
     69
    5970/** Device operating modes. */
    6071typedef enum {
     
    6576} ieee80211_operating_mode_t;
    6677
     78/** Key flags. */
     79typedef enum {
     80        IEEE80211_KEY_FLAG_TYPE_PAIRWISE = 0x01,
     81        IEEE80211_KEY_FLAG_TYPE_GROUP = 0x02
     82} ieee80211_key_flags_t;
     83
     84/** Key config structure. */
     85typedef struct {
     86        uint8_t id;
     87        uint8_t flags;
     88        ieee80211_security_suite_t suite;
     89        uint8_t data[32];
     90} ieee80211_key_config_t;
     91
    6792/** IEEE 802.11 callback functions. */
    6893typedef struct {
     
    109134         */
    110135        int (*set_freq)(struct ieee80211_dev *, uint16_t);
     136       
     137        /**
     138         * Callback to inform device about BSSID change.
     139         *
     140         * @param ieee80211_dev Pointer to IEEE 802.11 device structure.
     141         *
     142         * @return EOK if succeed, negative error code otherwise.
     143         */
     144        int (*bssid_change)(struct ieee80211_dev *);
     145       
     146        /**
     147         * Callback to setup encryption key in IEEE 802.11 device.
     148         *
     149         * @param ieee80211_dev Pointer to IEEE 802.11 device structure.
     150         * @param key_conf Key config structure.
     151         * @param insert True to insert this key to device, false to remove it.
     152         *
     153         * @return EOK if succeed, negative error code otherwise.
     154         */
     155        int (*key_config)(struct ieee80211_dev *,
     156                ieee80211_key_config_t *key_conf, bool);
    111157} ieee80211_ops_t;
    112158
     
    124170        void *specific);
    125171extern ddf_dev_t *ieee80211_get_ddf_dev(ieee80211_dev_t* ieee80211_dev);
    126 extern ieee80211_operating_mode_t ieee80211_query_current_op_mode(ieee80211_dev_t *ieee80211_dev);
     172extern ieee80211_operating_mode_t
     173        ieee80211_query_current_op_mode(ieee80211_dev_t *ieee80211_dev);
    127174extern uint16_t ieee80211_query_current_freq(ieee80211_dev_t *ieee80211_dev);
     175extern void ieee80211_query_bssid(ieee80211_dev_t* ieee80211_dev,
     176        nic_address_t *bssid);
     177extern bool ieee80211_is_connected(ieee80211_dev_t* ieee80211_dev);
    128178extern void ieee80211_report_current_op_mode(ieee80211_dev_t *ieee80211_dev,
    129179        ieee80211_operating_mode_t op_mode);
    130180extern void ieee80211_report_current_freq(ieee80211_dev_t *ieee80211_dev,
    131181        uint16_t freq);
     182extern uint16_t ieee80211_get_aid(ieee80211_dev_t* ieee80211_dev);
     183extern int ieee80211_get_security_suite(ieee80211_dev_t* ieee80211_dev);
     184extern bool ieee80211_is_ready(ieee80211_dev_t* ieee80211_dev);
     185extern void ieee80211_set_ready(ieee80211_dev_t* ieee80211_dev, bool ready);
     186extern bool ieee80211_query_using_key(ieee80211_dev_t* ieee80211_dev);
     187extern void ieee80211_setup_key_confirm(ieee80211_dev_t* ieee80211_dev,
     188        bool using_key);
    132189
    133190extern bool ieee80211_is_data_frame(uint16_t frame_ctrl);
     
    135192extern bool ieee80211_is_beacon_frame(uint16_t frame_ctrl);
    136193extern bool ieee80211_is_probe_response_frame(uint16_t frame_ctrl);
     194extern bool ieee80211_is_auth_frame(uint16_t frame_ctrl);
     195extern bool ieee80211_is_assoc_response_frame(uint16_t frame_ctrl);
    137196
    138197/* Worker functions. */
Note: See TracChangeset for help on using the changeset viewer.