Jun Furutani / libMiMic

Fork of libMiMic by Ryo Iizuka

Committer:
nyatla
Date:
Thu May 29 14:29:15 2014 +0000
Revision:
69:8c5f220441f5
Parent:
37:fc4b4fd6a649
r354????; LPC4088?????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nyatla 37:fc4b4fd6a649 1 /*********************************************************************************
nyatla 37:fc4b4fd6a649 2 * PROJECT: MiMic
nyatla 37:fc4b4fd6a649 3 * --------------------------------------------------------------------------------
nyatla 37:fc4b4fd6a649 4 *
nyatla 37:fc4b4fd6a649 5 * This file is part of MiMic
nyatla 37:fc4b4fd6a649 6 * Copyright (C)2011 Ryo Iizuka
nyatla 37:fc4b4fd6a649 7 *
nyatla 37:fc4b4fd6a649 8 * MiMic is free software: you can redistribute it and/or modify
nyatla 37:fc4b4fd6a649 9 * it under the terms of the GNU Lesser General Public License as published
nyatla 37:fc4b4fd6a649 10 * by the Free Software Foundation, either version 3 of the License, or
nyatla 37:fc4b4fd6a649 11 * (at your option) any later version.
nyatla 37:fc4b4fd6a649 12 *
nyatla 37:fc4b4fd6a649 13 * This program is distributed in the hope that it will be useful,
nyatla 37:fc4b4fd6a649 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nyatla 37:fc4b4fd6a649 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
nyatla 37:fc4b4fd6a649 16 * GNU General Public License for more details.
nyatla 37:fc4b4fd6a649 17 *
nyatla 37:fc4b4fd6a649 18 * You should have received a copy of the GNU Lesser General Public License
nyatla 37:fc4b4fd6a649 19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
nyatla 37:fc4b4fd6a649 20 *
nyatla 37:fc4b4fd6a649 21 * For further information please contact.
nyatla 37:fc4b4fd6a649 22 * http://nyatla.jp/
nyatla 37:fc4b4fd6a649 23 * <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>
nyatla 37:fc4b4fd6a649 24 *
nyatla 37:fc4b4fd6a649 25 *********************************************************************************/
nyatla 2:b96c1e90d120 26 #ifndef NYLPC_CNET_H_
nyatla 2:b96c1e90d120 27 #define NYLPC_CNET_H_
nyatla 2:b96c1e90d120 28
nyatla 2:b96c1e90d120 29 #include "NyLPC_stdlib.h"
nyatla 2:b96c1e90d120 30 #include "NyLPC_uipService.h"
nyatla 2:b96c1e90d120 31 #include "NyLPC_cNetConfig.h"
nyatla 12:efe841863fc8 32 #ifdef __cplusplus
nyatla 12:efe841863fc8 33 extern "C" {
nyatla 12:efe841863fc8 34 #endif /* __cplusplus */
nyatla 2:b96c1e90d120 35 /**
nyatla 2:b96c1e90d120 36 * クラス型を定義します。
nyatla 2:b96c1e90d120 37 */
nyatla 2:b96c1e90d120 38 typedef struct NyLPC_TcNet NyLPC_TcNet_t;
nyatla 2:b96c1e90d120 39
nyatla 69:8c5f220441f5 40
nyatla 2:b96c1e90d120 41
nyatla 2:b96c1e90d120 42
nyatla 2:b96c1e90d120 43 struct NyLPC_TcNet
nyatla 2:b96c1e90d120 44 {
nyatla 2:b96c1e90d120 45 int dummy;
nyatla 2:b96c1e90d120 46 };
nyatla 2:b96c1e90d120 47
nyatla 2:b96c1e90d120 48 /**
nyatla 2:b96c1e90d120 49 * ネットワークを初期化する。
nyatla 2:b96c1e90d120 50 */
nyatla 2:b96c1e90d120 51 void NyLPC_cNet_initialize(NyLPC_TcNet_t* i_inst);
nyatla 3:0a94993be1f6 52
nyatla 12:efe841863fc8 53 #define NyLPC_cNet_finalize(inst)
nyatla 2:b96c1e90d120 54 /**
nyatla 37:fc4b4fd6a649 55 * ネットワークサービスを開始します。
nyatla 37:fc4b4fd6a649 56 * サービスは停止中でなければなりません。
nyatla 2:b96c1e90d120 57 * 関数は、ネットワークアダプタの値を元にNyLPC_cMiMicEnv_PlatformName変数の値を更新します。
nyatla 2:b96c1e90d120 58 * @param i_ref_config
nyatla 2:b96c1e90d120 59 * Networkコンフィギュレーション変数。このオブジェクトはcNetをstopするまで維持すること。
nyatla 2:b96c1e90d120 60 */
nyatla 2:b96c1e90d120 61 void NyLPC_cNet_start(NyLPC_TcNet_t* i_inst,const NyLPC_TcNetConfig_t* i_ref_config);
nyatla 37:fc4b4fd6a649 62 /**
nyatla 37:fc4b4fd6a649 63 * ネットワークスタックを停止します。
nyatla 37:fc4b4fd6a649 64 * サービスは開始中でなければなりません。
nyatla 37:fc4b4fd6a649 65 * start関数で開始済である必要があります。
nyatla 37:fc4b4fd6a649 66 * この関数をコールする前に、全てのTCPソケットを閉じ、非同期なソケット操作を停止してください。
nyatla 37:fc4b4fd6a649 67 */
nyatla 37:fc4b4fd6a649 68 void NyLPC_cNet_stop(NyLPC_TcNet_t* i_inst);
nyatla 37:fc4b4fd6a649 69
nyatla 37:fc4b4fd6a649 70 /**
nyatla 37:fc4b4fd6a649 71 * NyLPC_TcIPv4Config_tをDHCPで更新します。
nyatla 37:fc4b4fd6a649 72 * この関数をコールする時は、サービスは停止中でなければなりません。
nyatla 37:fc4b4fd6a649 73 * @param i_cfg
nyatla 37:fc4b4fd6a649 74 * 更新するi_cfg構造体。
nyatla 37:fc4b4fd6a649 75 * emac,default_mssは設定済である必要があります。他のフィールド値は不定で構いません。
nyatla 37:fc4b4fd6a649 76 * 更新されるフィールドは、ip,netmast,default_rootの3つです。
nyatla 37:fc4b4fd6a649 77 * @return
nyatla 37:fc4b4fd6a649 78 * 更新に成功した場合TRUE
nyatla 37:fc4b4fd6a649 79 */
nyatla 37:fc4b4fd6a649 80 NyLPC_TBool NyLPC_cNet_requestAddrDhcp(NyLPC_TcNet_t* i_net,NyLPC_TcIPv4Config_t* i_cfg,NyLPC_TInt16 i_repeat);
nyatla 2:b96c1e90d120 81
nyatla 12:efe841863fc8 82 #ifdef __cplusplus
nyatla 12:efe841863fc8 83 }
nyatla 12:efe841863fc8 84 #endif /* __cplusplus */
nyatla 2:b96c1e90d120 85 #endif /* NYLPC_CNET_H_ */