Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of libMiMic by
NyLPC_cNet.h
00001 #ifndef NYLPC_CNET_H_ 00002 #define NYLPC_CNET_H_ 00003 #include "NyLPC_stdlib.h" 00004 #include "NyLPC_cIPv4Config.h" 00005 #include "NyLPC_iTcpListener.h" 00006 #include "NyLPC_iTcpSocket.h" 00007 #include "NyLPC_iUdpSocket.h" 00008 #include "NyLPC_iNetInterface.h" 00009 #include "NyLPC_NetIf_ip_types.h" 00010 00011 #ifdef __cplusplus 00012 extern "C" { 00013 #endif /* __cplusplus */ 00014 00015 typedef struct NyLPC_TcNet NyLPC_TcNet_t; 00016 00017 void NyLPC_cNet_initialize(const struct NyLPC_TiNetInterface_Interface* i_netif); 00018 #define NyLPC_cNet_finalize() 00019 00020 NyLPC_TiTcpSocket_t* NyLPC_cNet_createTcpSocketEx(NyLPC_TSocketType i_socktype); 00021 NyLPC_TiUdpSocket_t* NyLPC_cNet_createUdpSocketEx(NyLPC_TUInt16 i_port,NyLPC_TSocketType i_socktype); 00022 NyLPC_TiTcpListener_t* NyLPC_cNet_createTcpListenerEx(NyLPC_TUInt16 i_port); 00023 00024 /** 00025 * 指定したIPアドレスを要求するARPリクエストを発行します。 00026 */ 00027 void NyLPC_cNet_sendArpRequest(const struct NyLPC_TIPv4Addr* i_addr); 00028 00029 /** 00030 * ARPテーブルに指定したIPがあるかを返します。 00031 */ 00032 NyLPC_TBool NyLPC_cNet_hasArpInfo(const struct NyLPC_TIPv4Addr* i_addr); 00033 00034 void NyLPC_cNet_start(const NyLPC_TcIPv4Config_t* i_ref_config); 00035 void NyLPC_cNet_stop(void); 00036 NyLPC_TBool NyLPC_cNet_isInitService(void); 00037 00038 /** 00039 * NyLPC_TcIPv4Config_tをDHCPで更新します。 00040 * この関数をコールする時は、サービスは停止中でなければなりません。 00041 * @param i_cfg 00042 * 更新するi_cfg構造体。 00043 * emac,default_mssは設定済である必要があります。他のフィールド値は不定で構いません。 00044 * 更新されるフィールドは、ip,netmast,default_rootの3つです。 00045 * @return 00046 * 更新に成功した場合TRUE 00047 */ 00048 NyLPC_TBool NyLPC_cNet_requestAddrDhcp(NyLPC_TcIPv4Config_t* i_cfg,NyLPC_TInt16 i_repeat); 00049 /** 00050 * NyLPC_TcIPv4Config_tをAPIPAで更新します。 00051 * この関数をコールする時は、サービスは停止中でなければなりません。 00052 * @param i_cfg 00053 * 更新するi_cfg構造体。 00054 * emac,default_mssは設定済である必要があります。他のフィールド値は不定で構いません。 00055 * 更新されるフィールドは、ip,netmast,default_rootの3つです。 00056 * @return 00057 * 更新に成功した場合TRUE 00058 */ 00059 NyLPC_TBool NyLPC_cNet_requestAddrApipa(NyLPC_TcIPv4Config_t* i_cfg,NyLPC_TInt16 i_repeat); 00060 00061 const struct NyLPC_TNetInterfaceInfo* NyLPC_cNet_getInterfaceInfo(void); 00062 00063 #ifdef __cplusplus 00064 } 00065 #endif /* __cplusplus */ 00066 00067 #endif 00068 00069
Generated on Tue Jul 12 2022 16:22:59 by
