## NMSettingWirelessSecurity NMSettingWirelessSecurity |

## Synopsis

    #define             NM_SETTING_WIRELESS_SECURITY_SETTING_NAME
    enum                NMSettingWirelessSecurityError;
    #define             NM_TYPE_SETTING_WIRELESS_SECURITY_ERROR
    #define             NM_SETTING_WIRELESS_SECURITY_ERROR
    GQuark              nm_setting_wireless_security_error_quark
                                                            (void);
    enum                NMWepKeyType;
    #define             NM_SETTING_WIRELESS_SECURITY_KEY_MGMT
    #define             NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX
    #define             NM_SETTING_WIRELESS_SECURITY_AUTH_ALG
    #define             NM_SETTING_WIRELESS_SECURITY_PROTO
    #define             NM_SETTING_WIRELESS_SECURITY_PAIRWISE
    #define             NM_SETTING_WIRELESS_SECURITY_GROUP
    #define             NM_SETTING_WIRELESS_SECURITY_LEAP_USERNAME
    #define             NM_SETTING_WIRELESS_SECURITY_WEP_KEY0
    #define             NM_SETTING_WIRELESS_SECURITY_WEP_KEY1
    #define             NM_SETTING_WIRELESS_SECURITY_WEP_KEY2
    #define             NM_SETTING_WIRELESS_SECURITY_WEP_KEY3
    #define             NM_SETTING_WIRELESS_SECURITY_WEP_KEY_FLAGS
    #define             NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE
    #define             NM_SETTING_WIRELESS_SECURITY_PSK
    #define             NM_SETTING_WIRELESS_SECURITY_PSK_FLAGS
    #define             NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD
    #define             NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD_FLAGS
                        NMSettingWirelessSecurity;
                        NMSettingWirelessSecurityClass;
    GType               nm_setting_wireless_security_get_type
                                                            (void);
    NMSetting *         nm_setting_wireless_security_new    (void);
    const char *        nm_setting_wireless_security_get_key_mgmt
                                                            (NMSettingWirelessSecurity *setting);
    guint32             nm_setting_wireless_security_get_num_protos
                                                            (NMSettingWirelessSecurity *setting);
    const char *        nm_setting_wireless_security_get_proto
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 i);
    gboolean            nm_setting_wireless_security_add_proto
                                                            (NMSettingWirelessSecurity *setting,
                                                             const char *proto);
    void                nm_setting_wireless_security_remove_proto
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 i);
    void                nm_setting_wireless_security_clear_protos
                                                            (NMSettingWirelessSecurity *setting);
    guint32             nm_setting_wireless_security_get_num_pairwise
                                                            (NMSettingWirelessSecurity *setting);
    const char *        nm_setting_wireless_security_get_pairwise
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 i);
    gboolean            nm_setting_wireless_security_add_pairwise
                                                            (NMSettingWirelessSecurity *setting,
                                                             const char *pairwise);
    void                nm_setting_wireless_security_remove_pairwise
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 i);
    void                nm_setting_wireless_security_clear_pairwise
                                                            (NMSettingWirelessSecurity *setting);
    guint32             nm_setting_wireless_security_get_num_groups
                                                            (NMSettingWirelessSecurity *setting);
    const char *        nm_setting_wireless_security_get_group
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 i);
    gboolean            nm_setting_wireless_security_add_group
                                                            (NMSettingWirelessSecurity *setting,
                                                             const char *group);
    void                nm_setting_wireless_security_remove_group
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 i);
    void                nm_setting_wireless_security_clear_groups
                                                            (NMSettingWirelessSecurity *setting);
    const char *        nm_setting_wireless_security_get_psk
                                                            (NMSettingWirelessSecurity *setting);
    NMSettingSecretFlags  nm_setting_wireless_security_get_psk_flags
                                                            (NMSettingWirelessSecurity *setting);
    const char *        nm_setting_wireless_security_get_leap_username
                                                            (NMSettingWirelessSecurity *setting);
    const char *        nm_setting_wireless_security_get_leap_password
                                                            (NMSettingWirelessSecurity *setting);
    NMSettingSecretFlags  nm_setting_wireless_security_get_leap_password_flags
                                                            (NMSettingWirelessSecurity *setting);
    const char *        nm_setting_wireless_security_get_wep_key
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 idx);
    void                nm_setting_wireless_security_set_wep_key
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 idx,
                                                             const char *key);
    guint32             nm_setting_wireless_security_get_wep_tx_keyidx
                                                            (NMSettingWirelessSecurity *setting);
    const char *        nm_setting_wireless_security_get_auth_alg
                                                            (NMSettingWirelessSecurity *setting);
    NMSettingSecretFlags  nm_setting_wireless_security_get_wep_key_flags
                                                            (NMSettingWirelessSecurity *setting);
    NMWepKeyType        nm_setting_wireless_security_get_wep_key_type
                                                            (NMSettingWirelessSecurity *setting);

## Object Hierarchy

      GEnum
       +----NMSettingWirelessSecurityError

      GObject
       +----NMSetting
             +----NMSettingWirelessSecurity

## Properties

      "auth-alg"                 gchar*                : Read / Write
      "group"                    GSList_gchararray_*   : Read / Write
      "key-mgmt"                 gchar*                : Read / Write
      "leap-password"            gchar*                : Read / Write
      "leap-password-flags"      guint                 : Read / Write
      "leap-username"            gchar*                : Read / Write
      "pairwise"                 GSList_gchararray_*   : Read / Write
      "proto"                    GSList_gchararray_*   : Read / Write
      "psk"                      gchar*                : Read / Write
      "psk-flags"                guint                 : Read / Write
      "wep-key-flags"            guint                 : Read / Write
      "wep-key-type"             guint                 : Read / Write / Construct
      "wep-key0"                 gchar*                : Read / Write
      "wep-key1"                 gchar*                : Read / Write
      "wep-key2"                 gchar*                : Read / Write
      "wep-key3"                 gchar*                : Read / Write
      "wep-tx-keyidx"            guint                 : Read / Write / Construct

## Description

## Details

### NM_SETTING_WIRELESS_SECURITY_SETTING_NAME

    #define NM_SETTING_WIRELESS_SECURITY_SETTING_NAME "802-11-wireless-security"

### enum NMSettingWirelessSecurityError

    typedef enum
    {
    	NM_SETTING_WIRELESS_SECURITY_ERROR_UNKNOWN = 0,
    	NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY,
    	NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_PROPERTY,
    	NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_802_1X_SETTING,
    	NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_802_1X,
    	NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_USERNAME,
    	NM_SETTING_WIRELESS_SECURITY_ERROR_SHARED_KEY_REQUIRES_WEP
    } NMSettingWirelessSecurityError;

### NM_TYPE_SETTING_WIRELESS_SECURITY_ERROR

    #define NM_TYPE_SETTING_WIRELESS_SECURITY_ERROR (nm_setting_wireless_security_error_get_type ())

### NM_SETTING_WIRELESS_SECURITY_ERROR

    #define NM_SETTING_WIRELESS_SECURITY_ERROR nm_setting_wireless_security_error_quark ()

### nm_setting_wireless_security_error_quark ()

    GQuark              nm_setting_wireless_security_error_quark
                                                            (void);

### enum NMWepKeyType

    typedef enum {
    	NM_WEP_KEY_TYPE_UNKNOWN = 0,
    	NM_WEP_KEY_TYPE_KEY = 1,          /* Hex or ASCII */
    	NM_WEP_KEY_TYPE_PASSPHRASE = 2,   /* 104/128-bit Passphrase */

    	NM_WEP_KEY_TYPE_LAST = NM_WEP_KEY_TYPE_PASSPHRASE
    } NMWepKeyType;

### NM_SETTING_WIRELESS_SECURITY_KEY_MGMT

    #define NM_SETTING_WIRELESS_SECURITY_KEY_MGMT "key-mgmt"

### NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX

    #define NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX "wep-tx-keyidx"

### NM_SETTING_WIRELESS_SECURITY_AUTH_ALG

    #define NM_SETTING_WIRELESS_SECURITY_AUTH_ALG "auth-alg"

### NM_SETTING_WIRELESS_SECURITY_PROTO

    #define NM_SETTING_WIRELESS_SECURITY_PROTO "proto"

### NM_SETTING_WIRELESS_SECURITY_PAIRWISE

    #define NM_SETTING_WIRELESS_SECURITY_PAIRWISE "pairwise"

### NM_SETTING_WIRELESS_SECURITY_GROUP

    #define NM_SETTING_WIRELESS_SECURITY_GROUP "group"

### NM_SETTING_WIRELESS_SECURITY_LEAP_USERNAME

    #define NM_SETTING_WIRELESS_SECURITY_LEAP_USERNAME "leap-username"

### NM_SETTING_WIRELESS_SECURITY_WEP_KEY0

    #define NM_SETTING_WIRELESS_SECURITY_WEP_KEY0 "wep-key0"

### NM_SETTING_WIRELESS_SECURITY_WEP_KEY1

    #define NM_SETTING_WIRELESS_SECURITY_WEP_KEY1 "wep-key1"

### NM_SETTING_WIRELESS_SECURITY_WEP_KEY2

    #define NM_SETTING_WIRELESS_SECURITY_WEP_KEY2 "wep-key2"

### NM_SETTING_WIRELESS_SECURITY_WEP_KEY3

    #define NM_SETTING_WIRELESS_SECURITY_WEP_KEY3 "wep-key3"

### NM_SETTING_WIRELESS_SECURITY_WEP_KEY_FLAGS

    #define NM_SETTING_WIRELESS_SECURITY_WEP_KEY_FLAGS "wep-key-flags"

### NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE

    #define NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE "wep-key-type"

### NM_SETTING_WIRELESS_SECURITY_PSK

    #define NM_SETTING_WIRELESS_SECURITY_PSK "psk"

### NM_SETTING_WIRELESS_SECURITY_PSK_FLAGS

    #define NM_SETTING_WIRELESS_SECURITY_PSK_FLAGS "psk-flags"

### NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD

    #define NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD "leap-password"

### NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD_FLAGS

    #define NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD_FLAGS "leap-password-flags"

### NMSettingWirelessSecurity

    typedef struct _NMSettingWirelessSecurity NMSettingWirelessSecurity;

### NMSettingWirelessSecurityClass

    typedef struct {
    	NMSettingClass parent;

    	/* Padding for future expansion */
    	void (*_reserved1) (void);
    	void (*_reserved2) (void);
    	void (*_reserved3) (void);
    	void (*_reserved4) (void);
    } NMSettingWirelessSecurityClass;

### nm_setting_wireless_security_get_type ()

    GType               nm_setting_wireless_security_get_type
                                                            (void);

### nm_setting_wireless_security_new ()

    NMSetting *         nm_setting_wireless_security_new    (void);

### nm_setting_wireless_security_get_key_mgmt ()

    const char *        nm_setting_wireless_security_get_key_mgmt
                                                            (NMSettingWirelessSecurity *setting);

### nm_setting_wireless_security_get_num_protos ()

    guint32             nm_setting_wireless_security_get_num_protos
                                                            (NMSettingWirelessSecurity *setting);

### nm_setting_wireless_security_get_proto ()

    const char *        nm_setting_wireless_security_get_proto
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 i);

### nm_setting_wireless_security_add_proto ()

    gboolean            nm_setting_wireless_security_add_proto
                                                            (NMSettingWirelessSecurity *setting,
                                                             const char *proto);

### nm_setting_wireless_security_remove_proto ()

    void                nm_setting_wireless_security_remove_proto
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 i);

### nm_setting_wireless_security_clear_protos ()

    void                nm_setting_wireless_security_clear_protos
                                                            (NMSettingWirelessSecurity *setting);

### nm_setting_wireless_security_get_num_pairwise ()

    guint32             nm_setting_wireless_security_get_num_pairwise
                                                            (NMSettingWirelessSecurity *setting);

### nm_setting_wireless_security_get_pairwise ()

    const char *        nm_setting_wireless_security_get_pairwise
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 i);

### nm_setting_wireless_security_add_pairwise ()

    gboolean            nm_setting_wireless_security_add_pairwise
                                                            (NMSettingWirelessSecurity *setting,
                                                             const char *pairwise);

### nm_setting_wireless_security_remove_pairwise ()

    void                nm_setting_wireless_security_remove_pairwise
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 i);

### nm_setting_wireless_security_clear_pairwise ()

    void                nm_setting_wireless_security_clear_pairwise
                                                            (NMSettingWirelessSecurity *setting);

### nm_setting_wireless_security_get_num_groups ()

    guint32             nm_setting_wireless_security_get_num_groups
                                                            (NMSettingWirelessSecurity *setting);

### nm_setting_wireless_security_get_group ()

    const char *        nm_setting_wireless_security_get_group
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 i);

### nm_setting_wireless_security_add_group ()

    gboolean            nm_setting_wireless_security_add_group
                                                            (NMSettingWirelessSecurity *setting,
                                                             const char *group);

### nm_setting_wireless_security_remove_group ()

    void                nm_setting_wireless_security_remove_group
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 i);

### nm_setting_wireless_security_clear_groups ()

    void                nm_setting_wireless_security_clear_groups
                                                            (NMSettingWirelessSecurity *setting);

### nm_setting_wireless_security_get_psk ()

    const char *        nm_setting_wireless_security_get_psk
                                                            (NMSettingWirelessSecurity *setting);

### nm_setting_wireless_security_get_psk_flags ()

    NMSettingSecretFlags  nm_setting_wireless_security_get_psk_flags
                                                            (NMSettingWirelessSecurity *setting);

`setting` : | the NMSettingWirelessSecurity
Returns : | the NMSettingSecretFlags pertaining to the "psk"

### nm_setting_wireless_security_get_leap_username ()

    const char *        nm_setting_wireless_security_get_leap_username
                                                            (NMSettingWirelessSecurity *setting);

### nm_setting_wireless_security_get_leap_password ()

    const char *        nm_setting_wireless_security_get_leap_password
                                                            (NMSettingWirelessSecurity *setting);

### nm_setting_wireless_security_get_leap_password_flags ()

    NMSettingSecretFlags  nm_setting_wireless_security_get_leap_password_flags
                                                            (NMSettingWirelessSecurity *setting);

`setting` : | the NMSettingWirelessSecurity
Returns : | the NMSettingSecretFlags pertaining to the "leap-password"

### nm_setting_wireless_security_get_wep_key ()

    const char *        nm_setting_wireless_security_get_wep_key
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 idx);

### nm_setting_wireless_security_set_wep_key ()

    void                nm_setting_wireless_security_set_wep_key
                                                            (NMSettingWirelessSecurity *setting,
                                                             guint32 idx,
                                                             const char *key);

### nm_setting_wireless_security_get_wep_tx_keyidx ()

    guint32             nm_setting_wireless_security_get_wep_tx_keyidx
                                                            (NMSettingWirelessSecurity *setting);

### nm_setting_wireless_security_get_auth_alg ()

    const char *        nm_setting_wireless_security_get_auth_alg
                                                            (NMSettingWirelessSecurity *setting);

### nm_setting_wireless_security_get_wep_key_flags ()

    NMSettingSecretFlags  nm_setting_wireless_security_get_wep_key_flags
                                                            (NMSettingWirelessSecurity *setting);

`setting` : | the NMSettingWirelessSecurity
Returns : | the NMSettingSecretFlags pertaining to the all WEP keys

### nm_setting_wireless_security_get_wep_key_type ()

    NMWepKeyType        nm_setting_wireless_security_get_wep_key_type
                                                            (NMSettingWirelessSecurity *setting);

## Property Details

### The `"auth-alg"` property

      "auth-alg"                 gchar*                : Read / Write

When WEP is used (ie, key-mgmt = 'none' or 'ieee8021x') indicate the 802.11 authentication algorithm required by the AP here. One of 'open' for Open System, 'shared' for Shared Key, or 'leap' for Cisco LEAP. When using Cisco LEAP (ie, key-mgmt = 'ieee8021x' and auth-alg = 'leap') the 'leap-username' and 'leap-password' properties must be specified.

Default value: NULL

### The `"group"` property

      "group"                    GSList_gchararray_*   : Read / Write

If specified, will only connect to WPA networks that provide the specified group/multicast encryption capabilities. Each element may be one of 'wep40', 'wep104', 'tkip', or 'ccmp'.

### The `"key-mgmt"` property

      "key-mgmt"                 gchar*                : Read / Write

Key management used for the connection. One of 'none' (WEP), 'ieee8021x' (Dynamic WEP), 'wpa-none' (Ad-Hoc WPA-PSK), 'wpa-psk' (infrastructure WPA-PSK), or 'wpa-eap' (WPA-Enterprise). This property must be set for any WiFi connection that uses security.

Default value: NULL

### The `"leap-password"` property

      "leap-password"            gchar*                : Read / Write

The login password for legacy LEAP connections (ie, key-mgmt = 'ieee8021x' and auth-alg = 'leap').

Default value: NULL

### The `"leap-password-flags"` property

      "leap-password-flags"      guint                 : Read / Write

Flags indicating how to handle "leap-password".

Allowed values: <= 7

Default value: 0

### The `"leap-username"` property

      "leap-username"            gchar*                : Read / Write

The login username for legacy LEAP connections (ie, key-mgmt = 'ieee8021x' and auth-alg = 'leap').

Default value: NULL

### The `"pairwise"` property

      "pairwise"                 GSList_gchararray_*   : Read / Write

If specified, will only connect to WPA networks that provide the specified pairwise encryption capabilities. Each element may be one of 'wep40', 'wep104', 'tkip', or 'ccmp'.

### The `"proto"` property

      "proto"                    GSList_gchararray_*   : Read / Write

List of strings specifying the allowed WPA protocol versions to use. Each element may be one 'wpa' (allow WPA) or 'rsn' (allow WPA2/RSN). If not specified, both WPA and RSN connections are allowed.

### The `"psk"` property

      "psk"                      gchar*                : Read / Write

Pre-Shared-Key for WPA networks. If the key is 64-characters long, it must contain only hexadecimal characters and is interpreted as a hexadecimal WPA key. Otherwise, the key must be between 8 and 63 ASCII characters (as specified in the 802.11i standard) and is interpreted as a WPA passphrase, and is hashed to derive the actual WPA-PSK used when connecting to the WiFi network.

Default value: NULL

### The `"psk-flags"` property

      "psk-flags"                guint                 : Read / Write

Flags indicating how to handle "psk"

Allowed values: <= 7

Default value: 0

### The `"wep-key-flags"` property

      "wep-key-flags"            guint                 : Read / Write

Flags indicating how to handle NMSettingWirelessSecurity WEP keys.

Allowed values: <= 7

Default value: 0

### The `"wep-key-type"` property

      "wep-key-type"             guint                 : Read / Write / Construct

Controls the interpretation of WEP keys. Allowed values are 1 (interpret WEP keys as hexadecimal or ASCII keys) or 2 (interpret WEP keys as WEP Passphrases). If set to 1 and the keys are hexadecimal, they must be either 10 or 26 characters in length. If set to 1 and the keys are ASCII keys, they must be either 5 or 13 characters in length. If set to 2, the passphrase is hashed using the de-facto MD5 method to derive the actual WEP key.

Allowed values: <= 2

Default value: 0

### The `"wep-key0"` property

      "wep-key0"                 gchar*                : Read / Write

Index 0 WEP key. This is the WEP key used in most networks. See the 'wep-key-type' property for a description of how this key is interpreted.

Default value: NULL

### The `"wep-key1"` property

      "wep-key1"                 gchar*                : Read / Write

Index 1 WEP key. This WEP index is not used by most networks. See the 'wep-key-type' property for a description of how this key is interpreted.

Default value: NULL

### The `"wep-key2"` property

      "wep-key2"                 gchar*                : Read / Write

Index 2 WEP key. This WEP index is not used by most networks. See the 'wep-key-type' property for a description of how this key is interpreted.

Default value: NULL

### The `"wep-key3"` property

      "wep-key3"                 gchar*                : Read / Write

Index 3 WEP key. This WEP index is not used by most networks. See the 'wep-key-type' property for a description of how this key is interpreted.

Default value: NULL

### The `"wep-tx-keyidx"` property

      "wep-tx-keyidx"            guint                 : Read / Write / Construct

When static WEP is used (ie, key-mgmt = 'none') and a non-default WEP key index is used by the AP, put that WEP key index here. Valid values are 0 (default key) through 3. Note that some consumer access points (like the Linksys WRT54G) number the keys 1 - 4.

Allowed values: <= 3

Default value: 0