1 /*---------------------------------------------------------------------------* 2 Project: Wii Connect 24 3 File: NETErrorCode.h 4 5 Copyright (C) 2006 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 $Log: NETErrorCode.h,v $ 14 Revision 1.4 2006/09/12 14:47:31 seiki_masashi 15 Support for changes in organization of error codes 16 17 Revision 1.3 2006/09/11 12:32:24 seiki_masashi 18 Changed NET_ECODE_ADDR_COLLISION to -152700 19 20 Revision 1.2 2006/09/11 08:53:30 seiki_masashi 21 Support for NET_ECODE_AP_NOT_FOUND 22 23 Revision 1.1 2006/09/08 12:00:22 seiki_masashi 24 Split net.h multiple header files 25 26 $NoKeywords: $ 27 *---------------------------------------------------------------------------*/ 28 29 /*---------------------------------------------------------------------------* 30 Error codes used for Network APIs 31 *---------------------------------------------------------------------------*/ 32 #ifndef __NETERRORCODE_H__ 33 #define __NETERRORCODE_H__ 34 35 #ifdef RVL_OS 36 #include <revolution/os.h> 37 #endif // RVL_OS 38 39 #ifdef __cplusplus 40 extern "C" { 41 #endif 42 /*---------------------------------------------------------------------------*/ 43 44 typedef enum NETErrorCode 45 { 46 NET_ECODE_OK = 0, 47 48 NET_ECODE_STARTUP_FAILED = -50100, // Failed to initialize network for unknown reason 49 NET_ECODE_NO_ENABLED_CONFIG = -50200, // Valid network configuration does not exist 50 NET_ECODE_INVALID_CONFIG = -50300, // Network configuration invalid 51 NET_ECODE_DEVICE_NOT_EXISTS = -50400, // No device (LAN adaptor not connected) 52 53 NET_ECODE_AP_NOT_FOUND = -51000, // Cannot find set access point 54 NET_ECODE_WIRELESS_LINK_UP_FAILED = -51300, // Could not connect with wireless network device for some reason 55 NET_ECODE_WIRED_LINK_UP_FAILED = -51400, // Could not connect with wired network device for some reason 56 57 NET_ECODE_DHCP_FAILED = -52000, // DHCP failed 58 NET_ECODE_DNS_FAILED = -52100, // DNS failed 59 NET_ECODE_WRONG_PROXY = -52400, // Could not connect to proxy server 60 NET_ECODE_PROXY_AUTH_FAILED = -52500, // Proxy server authentication failed 61 NET_ECODE_ADDR_COLLISION = -52700, // IP address collision 62 63 NET_ECODE_NETWORK_DOWN = -54000 // Disconnected from network during transmission 64 65 } NETErrorCode; 66 67 typedef enum NETConnectionType 68 { 69 NET_CTYPE_WIRED = 20, 70 NET_CTYPE_WIRELESS = 30, 71 NET_CTYPE_USBAP = 40, 72 NET_CTYPE_UNKNOWN = 99 73 } NETConnectionType; 74 75 #define NET_CONSTRUCT_ERROR_CODE(etype, ctype) ((etype)-(ctype)) 76 77 #define NET_CTYPE_IS_WIRED(ctype) (NET_CTYPE_WIRED<=(ctype) && (ctype)<NET_CTYPE_WIRELESS) 78 79 /*---------------------------------------------------------------------------*/ 80 81 s32 NETGetConnectionType( void ); 82 s32 NETGetStartupErrorCode( s32 soErr ); 83 s32 NETGetStartupErrorCodeEx( s32 soErr, s32 connType ); 84 85 /*---------------------------------------------------------------------------*/ 86 87 #ifdef __cplusplus 88 } 89 #endif 90 91 #endif // __NWC24ERR_H__ 92 93