1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: socket_Utils.h 4 5 Copyright (C)2010 Nintendo Co., Ltd. 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 $Rev: 26449 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_SOCKET_SOCKET_UTILS_H_ 17 #define NN_SOCKET_SOCKET_UTILS_H_ 18 19 #include <nn/socket/socket_Types.h> 20 #include <nn/socket/socket_Const.h> 21 22 namespace nn { 23 namespace socket { 24 /*! 25 @name ユーティリティ 26 27 @{ 28 */ 29 30 /*! 31 @brief デフォルトゲートウェイのアドレスを取得します。 32 @param[out] pGateway アドレスの出力先バッファを指定します。 33 34 @return 0 以上 成功 35 */ 36 s32 GetDefaultGateway(u8* pGateway); 37 38 /*! 39 @brief 自ホストの IP アドレスとネットマスクを取得します。 40 @param[out] pHostAddress アドレスの出力先バッファを指定します。 41 @param[out] pNetmask ネットマスクの出力先バッファを指定します。 42 43 @return 0 以上 成功 44 */ 45 s32 GetPrimaryAddress(u8* pHostAddress, u8* pNetmask); 46 47 /*! 48 @brief 名前解決に使用する DNS サーバのアドレスを取得します。 49 @param[out] pResolver1 プライマリ DNS サーバのアドレス出力先バッファを指定します。 50 @param[out] pResolver2 セカンダリ DNS サーバのアドレス出力先バッファを指定します。 51 52 @return 0 以上 成功 53 */ 54 s32 GetResolver(u8* pResolver1, u8* pResolver2); 55 56 /*! 57 @brief MAC アドレスを取得します。 58 @param[out] pMacAddress MAC アドレスの出力先バッファを指定します。 59 60 @return 0 以上 成功 61 */ 62 s32 GetMacAddress(u8 pMacAddress[ETH_ALEN]); 63 64 #ifndef NN_SWITCH_DISABLE_DEBUG_PRINT 65 /*! 66 @brief ルーティングテーブルをコンソールに出力します。 67 68 @return 0 以上 成功 69 */ 70 void DumpRoutingTable(void); 71 #endif 72 /*! 73 @} 74 */ 75 } 76 } 77 78 #endif // ifndef NN_SOCKET_SOCKET_UTILS_H_ 79