NCDWirelessProfile

C Specification

#include <revolution/ncd.h>
#define     NCD_SIZE_SSID                   32
#define     NCD_USBAP_NICKNAME_LENGTH       11

/* the privacy (wireless encryption) structure */
typedef struct NCDPrivacy
{
    u16     mode;               /* NCDPrivacyMode */
    u8      reserved[ 2 ];
    union
    {
        struct
        {
            u16     keyId;
            u8      reserved[ 2 ];
            u8      key[ 4 ][ 5 ];
        
        } wep40;
        struct
        {
            u16     keyId;
            u8      reserved[ 2 ];
            u8      key[ 4 ][ 13 ];
        
        } wep104;
        struct
        {
            u16     keyLen;
            u8      reserved[ 2 ];
            u8      key[ 64 ];
        
        } tkip;
        struct
        {
            u16     keyLen;
            u8      reserved[ 2 ];
            u8      key[ 64 ];
        
        } aes;
    
    };

} ATTRIBUTE_PACKED NCDPrivacy;

/* the connection setting with the AP via AOSS */
typedef struct NCDAossConfig
{
    struct
    {
        u8      ssid[ NCD_SIZE_SSID ];
        u16     ssidLength;
        u16     keyId;
        u8      key[ 4 ][ 5 ];
    
    } wep40;
    struct
    {
        u8      ssid[ NCD_SIZE_SSID ];
        u16     ssidLength;
        u16     keyId;
        u8      key[ 4 ][ 13 ];
    
    } wep104;
    struct
    {
        u8      ssid[ NCD_SIZE_SSID ];
        u16     ssidLength;
        u16     keyLen;
        u8      key[ 64 ];
    
    } tkip;
    struct
    {
        u8      ssid[ NCD_SIZE_SSID ];
        u16     ssidLength;
        u16     keyLen;
        u8      key[ 64 ];
    
    } aes;

} ATTRIBUTE_PACKED NCDAossConfig;

/* the connection setting with the normal AP */
typedef struct NCDApConfig
{
    u8              ssid[ NCD_SIZE_SSID ];
    u16             ssidLength;
    u8              reserved[ 2 ];
    NCDPrivacy      privacy;

} ATTRIBUTE_PACKED NCDApConfig;

/* the connection setting with the USB-AP */
typedef struct NCDUsbapConfig
{
    u16     nickname[ NCD_USBAP_NICKNAME_LENGTH ];
    u8      reserved[ 2 ];

} ATTRIBUTE_PACKED NCDUsbapConfig;

/* the wireless profile structure */
typedef struct NCDWirelessProfile
{
    u16         rateset;        /* the communication rate bit field ( 0x0001: 1M, 0x0800: 54M, 0x0000: auto ) */
    u8          configMethod;   /* NCD_CONFIG_METHOD_* */
    u8          retryLimit;     /* the send retry upper limit ( 0: auto ) */
    union
    {
        NCDApConfig         manual;
        NCDUsbapConfig      usbap;
        NCDAossConfig       aoss;
        NCDApConfig         rakuraku;
    } config;

} ATTRIBUTE_PACKED NCDWirelessProfile;

Description

This structure stores network settings during wireless connections.

NCDPrivacy.mode can take the following values. The corresponding union referenced within NCDPrivacy is based on these values.

typedef enum
{
    NCD_PRIVACY_MODE_NONE               =   0x0000, /* no encryption */
    NCD_PRIVACY_MODE_WEP40              =   0x0001, /* WEP ( RC4 40bit ) encryption */
    NCD_PRIVACY_MODE_WEP104             =   0x0002, /* WEP ( RC4 104bit ) encryption */
    NCD_PRIVACY_MODE_WPA_PSK_TKIP       =   0x0004, /* WPA-PSK ( TKIP ) code */
    NCD_PRIVACY_MODE_WPA2_PSK_AES       =   0x0005, /* WPA2-PSK ( AES ) code */
    NCD_PRIVACY_MODE_WPA_PSK_AES        =   0x0006  /* WPA-PSK ( AES ) code */

} NCDPrivacyMode;

NCDWirelessProfile.configMethod can take the following values. The corresponding union within NCDWirelessProfile is referenced based on these values.

typedef enum
{
    NCD_CONFIG_METHOD_MANUAL            =   0x00,   /* manual settings */
    NCD_CONFIG_METHOD_USBAP             =   0x01,   /* USB-AP connection settings */
    NCD_CONFIG_METHOD_AOSS              =   0x02,   /* AOSS semi-automatic settings */
    NCD_CONFIG_METHOD_RAKURAKU          =   0x03    /* Easy Wireless Start's semi-automatic settings */

} NCDConfMethod;

See Also

None.

Revision History

2006/08/09 Initial version.


CONFIDENTIAL