1 /*---------------------------------------------------------------------------* 2 Project: NCD library 3 File: NCDConst.h 4 5 Copyright 2006,2007 Nintendo. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 *---------------------------------------------------------------------------*/ 14 15 #ifndef REVOLUTION_NCD_NCDCONST_H__ 16 #define REVOLUTION_NCD_NCDCONST_H__ 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 /*===========================================================================*/ 21 22 /* PPPoE is not-supported */ 23 #undef NCD_PPPOE_SUPPORT 24 25 /* Wired LAN fixed link type is non-supported */ 26 #undef NCD_WIRED_LINKTYPE_SUPPORT 27 28 /*---------------------------------------------------------------------------*/ 29 30 /* Processing result */ 31 #define NCD_RESULT_SUCCESS 0 /* Succeeded */ 32 #define NCD_RESULT_FATAL_ERROR (-1) /* This doesn't usually occur. When dealing with bugs related to corrupted memory */ 33 #define NCD_RESULT_FAILURE (-2) /* Failed to operate resource manager */ 34 #define NCD_RESULT_ILLEGAL_PARAM (-3) /* Invalid parameter */ 35 #define NCD_RESULT_EXCLUSIVE (-4) /* Currently being exclusively controlled */ 36 #define NCD_RESULT_ILLEGAL_STATUS (-5) /* Status in which APIs cannot be called */ 37 #define NCD_RESULT_SFFS_ERROR (-6) /* Failed to flush NAND */ 38 #define NCD_RESULT_UNDECIDED (-7) /* Network interface not set */ 39 #define NCD_RESULT_INPROGRESS (-8) /* Preparations for firmware not ready */ 40 41 /* NCD process status ID */ 42 #define NCD_LINKSTATUS_WORKING 1 /* Automatic state transition is in mid-transition */ 43 #define NCD_LINKSTATUS_NONE 2 /* Device to be linked not configured */ 44 #define NCD_LINKSTATUS_WIRED 3 /* Link with wired device as target */ 45 #define NCD_LINKSTATUS_WIRELESS_DOWN 4 /* Status in which link cannot be made with target wireless device */ 46 #define NCD_LINKSTATUS_WIRELESS_UP 5 /* Status in which the link with the target wireless device is established */ 47 48 /*---------------------------------------------------------------------------*/ 49 50 #define NCD_CONFIG_VERSION 0 /* Version information for NCDConfig structure */ 51 52 #define NCD_SIZE_SSID 32 53 #define NCD_USBAP_NICKNAME_LENGTH 11 54 #define NCD_SIZE_IP 4 55 56 #ifdef NCD_PPPOE_SUPPORT 57 #define NCD_PPPOE_SERVICENAME_LENGTH 128 58 #define NCD_PPPOE_USERNAME_LENGTH 256 59 #define NCD_PPPOE_PASSWORD_LENGTH 256 60 #endif 61 62 #ifdef NCD_WIRED_LINKTYPE_SUPPORT 63 typedef enum 64 { 65 NCD_WIRED_LINKTYPE_AUTO = 0x00, 66 NCD_WIRED_LINKTYPE_10BASE_T = 0x01, 67 NCD_WIRED_LINKTYPE_100BASE_TX = 0x02 68 69 } NCDWiredLinkType; 70 #endif 71 72 typedef enum 73 { 74 NCD_PRIVACY_MODE_NONE = 0x0000, /* No encryption */ 75 NCD_PRIVACY_MODE_WEP40 = 0x0001, /* WEP (RC4 40 bit) encryption */ 76 NCD_PRIVACY_MODE_WEP104 = 0x0002, /* WEP (RC4 104 bit) encryption */ 77 NCD_PRIVACY_MODE_WPA_PSK_TKIP = 0x0004, /* WPA-PSK (TKIP) encryption */ 78 NCD_PRIVACY_MODE_WPA2_PSK_AES = 0x0005, /* WPA2-PSK (AES) encryption */ 79 NCD_PRIVACY_MODE_WPA_PSK_AES = 0x0006 /* WPA-PSK (AES) encryption */ 80 81 } NCDPrivacyMode; 82 83 typedef enum 84 { 85 NCD_CONFIG_METHOD_MANUAL = 0x00, /* Manual setting */ 86 NCD_CONFIG_METHOD_USBAP = 0x01, /* Connection settings with USB-AP */ 87 NCD_CONFIG_METHOD_AOSS = 0x02, /* Semi-automatic setting using AOSS */ 88 NCD_CONFIG_METHOD_RAKURAKU = 0x03, /* Semi-automatic setting using easy wireless start */ 89 NCD_CONFIG_METHOD_SIMPLECONFIG = 0x04 /* [TODO] Undecided whether or not to support */ 90 91 } NCDConfMethod; 92 93 #define NCD_FLAG_IS_WIRED 0x01 94 #define NCD_FLAG_USE_DHCP_ADDR 0x02 95 #define NCD_FLAG_USE_DHCP_DNS 0x04 /* [TODO] Undecided whether or not to support */ 96 #ifdef NCD_PPPOE_SUPPORT 97 #define NCD_FLAG_USE_PPPOE 0x08 98 #endif 99 #define NCD_FLAG_USE_PROXY 0x10 100 #define NCD_FLAG_PASSED_CONNECTION_TEST 0x20 /* Connection test pass/fail */ 101 #define NCD_FLAG_USE_PMTU_RECOVER 0x40 /* [TODO] Undecided whether or not to support */ 102 #define NCD_FLAG_ENABLE 0x80 103 104 #define NCD_NWC24_PERMISSION_FORBIDDEN 0x00 105 #define NCD_NWC24_PERMISSION_SEND_MAIL 0x01 106 #define NCD_NWC24_PERMISSION_RECV_MAIL 0x02 107 #define NCD_NWC24_PERMISSION_DOWNLOAD 0x04 108 #define NCD_NWC24_PERMISSION_ALL ((u8)( NCD_NWC24_PERMISSION_SEND_MAIL | NCD_NWC24_PERMISSION_RECV_MAIL | NCD_NWC24_PERMISSION_DOWNLOAD )) 109 110 #define NCD_PROXYNAME_LENGTH 256 111 #define NCD_PROXYNAME_LENGTH_MIN 1 112 #define NCD_PROXY_USERNAME_LENGTH 33 113 #define NCD_PROXY_PASSWORD_LENGTH 33 114 #define NCD_NO_PROXY_LENGTH 1024 115 #define NCD_AUTOMATIC_PROXY_LENGTH 256 116 117 typedef enum 118 { 119 NCD_PROXY_MODE_NONE = 0x00, /* Do not use proxy */ 120 NCD_PROXY_MODE_NORMAL = 0x01 /* Normal proxy */ 121 } NCDProxyMode; 122 123 typedef enum 124 { 125 NCD_PROXY_AUTHTYPE_NONE = 0x00, /* No authentication */ 126 NCD_PROXY_AUTHTYPE_BASIC = 0x01 /* BASIC authentication */ 127 } NCDProxyAuthType; 128 129 #define NCD_IF_SELECT_NONE 0x00 130 #define NCD_IF_SELECT_WIRELESS 0x01 131 #define NCD_IF_SELECT_WIRED 0x02 132 #define NCD_PROFILE_COUNT 3 133 134 135 /*===========================================================================*/ 136 #ifdef __cplusplus 137 } 138 #endif 139 #endif /* REVOLUTION_NCD_NCDCONST_H__ */ 140 141 /*---------------------------------------------------------------------------* 142 $Log: NCDConst.h,v $ 143 Revision 1.16 2007/05/01 04:50:57 adachi_hiroaki 144 Changed NCD_PROXYNAME_LENGTH_MIN to 1 145 146 Revision 1.15 2006/09/20 11:22:05 terui 147 Added NCD_FLAG_PASSED_CONNECTION_TEST definition 148 149 Revision 1.14 2006/09/02 08:17:20 yoshioka_yasuhiro 150 Implemented warning measures. 151 152 Revision 1.13 2006/09/02 05:14:18 seiki_masashi 153 Changed the NCDProxyServerProfile structure 154 155 Revision 1.12 2006/08/31 13:24:39 terui 156 Support for addition of wireless encryption system WPA-PSK (AES) 157 158 Revision 1.11 2006/08/30 12:16:42 adachi_hiroaki 159 Added definitions related to the proxy server 160 161 Revision 1.10 2006/08/18 02:42:55 adachi_hiroaki 162 Revised definition of NCD_NWC24_PERMISSION_ALL. 163 164 Revision 1.9 2006/08/16 04:01:08 seiki_masashi 165 Changed the size of the user name and password for proxy authentication from 32 to 33 166 167 Revision 1.8 2006/08/16 03:38:06 seiki_masashi 168 Added a user name and password to the Proxy settings 169 Added version information to NCDConfig 170 171 Revision 1.7 2006/08/11 08:34:28 yasu 172 Returned constants in nwc24cntl.h to NCDConst.h 173 174 Revision 1.6 2006/08/11 01:46:30 terui 175 Handled wired LAN fixed link type non-support 176 177 Revision 1.5 2006/08/10 12:55:53 terui 178 Added definition of NCD_RESULT_INPROGRESS 179 180 Revision 1.4 2006/08/10 08:11:22 yasu 181 Created nwc24cntl.h 182 183 Revision 1.3 2006/08/03 09:29:51 seiki_masashi 184 typedef added to enum 185 186 Revision 1.2 2006/07/29 04:17:58 terui 187 Added constant definitions for enabling NWC24. 188 189 Revision 1.1 2006/07/26 07:24:17 terui 190 Moves from posrts/shared 191 192 Revision 1.2 2006/07/22 12:00:00 terui 193 Moved constant definitions from NCDConst.h. 194 Moved IPC command ID definition and resource manager path string definition to NCDPrivate.h. 195 Fixed comments. 196 197 Revision 1.1 2006/06/16 07:32:44 terui 198 Moved ncd/ncdshared.h 199 200 *---------------------------------------------------------------------------*/ 201