1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<TITLE>NCDWirelessProfile</TITLE>
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8</HEAD>
9<BODY>
10<H1>NCDWirelessProfile</H1>
11
12<H2>C Specification</H2>
13<DL>
14  <DD><PRE><CODE>#include &lt;revolution/ncd.h&gt;</CODE></PRE>
15  <DD><PRE><CODE>#define     NCD_SIZE_SSID                   32
16#define     NCD_USBAP_NICKNAME_LENGTH       11
17
18/* the privacy (wireless encryption) structure */
19typedef struct NCDPrivacy
20{
21    u16     mode;               /* NCDPrivacyMode */
22    u8      reserved[ 2 ];
23    union
24    {
25        struct
26        {
27            u16     keyId;
28            u8      reserved[ 2 ];
29            u8      key[ 4 ][ 5 ];
30
31        } wep40;
32        struct
33        {
34            u16     keyId;
35            u8      reserved[ 2 ];
36            u8      key[ 4 ][ 13 ];
37
38        } wep104;
39        struct
40        {
41            u16     keyLen;
42            u8      reserved[ 2 ];
43            u8      key[ 64 ];
44
45        } tkip;
46        struct
47        {
48            u16     keyLen;
49            u8      reserved[ 2 ];
50            u8      key[ 64 ];
51
52        } aes;
53
54    };
55
56} ATTRIBUTE_PACKED NCDPrivacy;
57
58/* the connection setting with the AP via AOSS */
59typedef struct NCDAossConfig
60{
61    struct
62    {
63        u8      ssid[ NCD_SIZE_SSID ];
64        u16     ssidLength;
65        u16     keyId;
66        u8      key[ 4 ][ 5 ];
67
68    } wep40;
69    struct
70    {
71        u8      ssid[ NCD_SIZE_SSID ];
72        u16     ssidLength;
73        u16     keyId;
74        u8      key[ 4 ][ 13 ];
75
76    } wep104;
77    struct
78    {
79        u8      ssid[ NCD_SIZE_SSID ];
80        u16     ssidLength;
81        u16     keyLen;
82        u8      key[ 64 ];
83
84    } tkip;
85    struct
86    {
87        u8      ssid[ NCD_SIZE_SSID ];
88        u16     ssidLength;
89        u16     keyLen;
90        u8      key[ 64 ];
91
92    } aes;
93
94} ATTRIBUTE_PACKED NCDAossConfig;
95
96/* the connection setting with the normal AP */
97typedef struct NCDApConfig
98{
99    u8              ssid[ NCD_SIZE_SSID ];
100    u16             ssidLength;
101    u8              reserved[ 2 ];
102    NCDPrivacy      privacy;
103
104} ATTRIBUTE_PACKED NCDApConfig;
105
106/* the connection setting with the USB-AP */
107typedef struct NCDUsbapConfig
108{
109    u16     nickname[ NCD_USBAP_NICKNAME_LENGTH ];
110    u8      reserved[ 2 ];
111
112} ATTRIBUTE_PACKED NCDUsbapConfig;
113
114/* the wireless profile structure */
115typedef struct NCDWirelessProfile
116{
117    u16         rateset;        /* the communication rate bit field ( 0x0001: 1M, 0x0800: 54M, 0x0000: auto ) */
118    u8          configMethod;   /* NCD_CONFIG_METHOD_* */
119    u8          retryLimit;     /* the send retry upper limit ( 0: auto ) */
120    union
121    {
122        NCDApConfig         manual;
123        NCDUsbapConfig      usbap;
124        NCDAossConfig       aoss;
125        NCDApConfig         rakuraku;
126    } config;
127
128} ATTRIBUTE_PACKED NCDWirelessProfile;
129</CODE></PRE>
130</DL>
131
132<H2>Description</H2>
133<P>
134This structure stores network settings during wireless connections.
135</P>
136<P>
137<CODE>NCDPrivacy.mode</CODE> can take the following values. The corresponding union referenced within <CODE>NCDPrivacy</CODE> is based on these values.
138</P>
139<P>
140<PRE><CODE>typedef enum
141{
142    NCD_PRIVACY_MODE_NONE               =   0x0000, /* no encryption */
143    NCD_PRIVACY_MODE_WEP40              =   0x0001, /* WEP ( RC4 40bit ) encryption */
144    NCD_PRIVACY_MODE_WEP104             =   0x0002, /* WEP ( RC4 104bit ) encryption */
145    NCD_PRIVACY_MODE_WPA_PSK_TKIP       =   0x0004, /* WPA-PSK ( TKIP ) code */
146    NCD_PRIVACY_MODE_WPA2_PSK_AES       =   0x0005, /* WPA2-PSK ( AES ) code */
147    NCD_PRIVACY_MODE_WPA_PSK_AES        =   0x0006  /* WPA-PSK ( AES ) code */
148
149} NCDPrivacyMode;
150</CODE></PRE>
151</P>
152
153<P>
154<CODE>NCDWirelessProfile.configMethod</CODE> can take the following values. The corresponding union within <CODE>NCDWirelessProfile</CODE> is referenced based on these values.
155</P>
156<P>
157<PRE><CODE>typedef enum
158{
159    NCD_CONFIG_METHOD_MANUAL            =   0x00,   /* manual settings */
160    NCD_CONFIG_METHOD_USBAP             =   0x01,   /* USB-AP connection settings */
161    NCD_CONFIG_METHOD_AOSS              =   0x02,   /* AOSS semi-automatic settings */
162    NCD_CONFIG_METHOD_RAKURAKU          =   0x03    /* Easy Wireless Start's semi-automatic settings */
163
164} NCDConfMethod;
165</CODE></PRE>
166</P>
167
168
169
170<H2>See Also</H2>
171<P>
172None.
173</P>
174
175<H2>Revision History</H2>
176<P>2006/08/09 Initial version.</P>
177
178<hr><p>CONFIDENTIAL</p></body>
179</HTML>