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>Syntax</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{
61struct
62    {
63u8              ssid[ NCD_SIZE_SSID ];
64u16     ssidLength;
65u16     keyId;
66u8      key[ 4 ][ 5 ];
67
68} wep40;
69struct
70    {
71u8              ssid[ NCD_SIZE_SSID ];
72u16     ssidLength;
73u16     keyId;
74u8      key[ 4 ][ 13 ];
75
76} wep104;
77struct
78    {
79u8              ssid[ NCD_SIZE_SSID ];
80u16     ssidLength;
81u16     keyLen;
82u8   key[64];
83
84} tkip;
85struct
86    {
87u8              ssid[ NCD_SIZE_SSID ];
88u16     ssidLength;
89u16     keyLen;
90u8   key[64];
91
92} aes;
93
94} ATTRIBUTE_PACKED NCDAossConfig;
95
96/* the connection setting with the normal AP */
97typedef struct NCDApConfig
98{
99u8              ssid[ NCD_SIZE_SSID ];
100u16     ssidLength;
101u8  reserved[2] ;
102NCDPrivacy      privacy;
103
104} ATTRIBUTE_PACKED NCDApConfig;
105
106/* the connection setting with the USB-AP */
107typedef struct NCDUsbapConfig
108{
109u16     nickname[ NCD_USBAP_NICKNAME_LENGTH ];
110u8  reserved[2] ;
111
112} ATTRIBUTE_PACKED NCDUsbapConfig;
113
114/* the wireless profile structure */
115typedef struct NCDWirelessProfile
116{
117u16         rateset;        /* the communication rate bit field ( 0x0001: 1M, 0x0800: 54M, 0x0000: auto ) */
118u8          configMethod;   /* NCD_CONFIG_METHOD_* */
119u8          retryLimit;     /* the send retry upper limit ( 0: auto ) */
120union
121    {
122NCDApConfig         manual;
123NCDUsbapConfig      usbap;
124NCDAossConfig       aoss;
125NCDApConfig         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{
142NCD_PRIVACY_MODE_NONE               =   0x0000, /* no encryption */
143NCD_PRIVACY_MODE_WEP40              =   0x0001, /* WEP ( RC4 40bit ) encryption */
144NCD_PRIVACY_MODE_WEP104             =   0x0002, /* WEP ( RC4 104bit ) encryption */
145NCD_PRIVACY_MODE_WPA_PSK_TKIP       =   0x0004, /* WPA-PSK ( TKIP ) code */
146NCD_PRIVACY_MODE_WPA2_PSK_AES       =   0x0005, /* WPA2-PSK ( AES ) code */
147NCD_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{
159NCD_CONFIG_METHOD_MANUAL            =   0x00,   /* manual settings */
160NCD_CONFIG_METHOD_USBAP             =   0x01,   /* USB-AP connection settings */
161NCD_CONFIG_METHOD_AOSS              =   0x02,   /* AOSS semi-automatic settings */
162NCD_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>