WE-18 questions

Pedro Ramalhais ramalhais at serrado.net
Wed Aug 18 23:25:44 EDT 2004


Hi Jouni!
I have some questions because i can't figure out how to use
SIOCSIWENCODEEXT IOCTL in WE-18.
- Where can i put the key_idx in struct iw_encode_ext?
- Where can i put set_tx (from wpa_supplicant) in struct iw_encode_ext?
- Which one of tx_seq and rx_seq should we use as the seq for:
(*crypt)->ops->set_key(encext->key, encext->key_len, seq,
(*crypt)->priv);
- What is the use for IW_ENCODE_EXT_TX_SEQ_VALID and
IW_ENCODE_EXT_RX_SEQ_VALID ?
- IW_ENCODE_EXT_GROUP_KEY is used in which situation?

Thanks!

----

/* SIOCSIWENCODEEXT definitions */
#define IW_ENCODE_SEQ_MAX_SIZE 8
/* struct iw_encode_ext ->alg */
#define IW_ENCODE_ALG_NONE     0
#define IW_ENCODE_ALG_WEP      1
#define IW_ENCODE_ALG_TKIP     2
#define IW_ENCODE_ALG_CCMP     3
/* struct iw_encode_ext ->ext_flags */
#define IW_ENCODE_EXT_TX_SEQ_VALID     0x00000001
#define IW_ENCODE_EXT_RX_SEQ_VALID     0x00000002
#define IW_ENCODE_EXT_GROUP_KEY                0x00000004

----

/*
 *     Extended data structure for get/set encoding (this is used with
 *     SIOCSIWENCODEEXT/SIOCGIWENCODEEXT. struct iw_point and
IW_ENCODE_*
 *     flags are used in the same way as with
SIOCSIWENCODE/SIOCGIWENCODE and
 *     only the data contents changes (key data -> this structure,
including
 *     key data).
 */
struct iw_encode_ext
{
        __u32           ext_flags; /* IW_ENCODE_EXT_* */
        __u8            tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
        __u8            rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
        struct sockaddr addr; /* ff:ff:ff:ff:ff:ff for
broadcast/multicast
                               * (group) keys or unicast address for
                               * individual keys */
        __u16           alg; /* IW_ENCODE_ALG_* */
        __u16           key_len;
        __u8            key[0];
};


-- 
Pedro Ramalhais <ramalhais at serrado.net>




More information about the HostAP mailing list