OSDN Git Service

update libMiMic
[mimic/MiMicSDK.git] / lib / src / netif / dhcp / NyLPC_cDhcpClient.h
similarity index 85%
rename from lib/src/net/dhcp/NyLPC_cDhcpClient.h
rename to lib/src/netif/dhcp/NyLPC_cDhcpClient.h
index 1557de7..c844b82 100644 (file)
@@ -1,73 +1,74 @@
-/*********************************************************************************\r
- * PROJECT: MiMic\r
- * --------------------------------------------------------------------------------\r
- *\r
- * This file is part of MiMic\r
- * Copyright (C)2011-2013 Ryo Iizuka\r
- *\r
- * MiMic is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published\r
- * by the Free Software Foundation, either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public License\r
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
- *\r
- * For further information please contact.\r
- *     http://nyatla.jp/\r
- *     <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>\r
- *\r
- *********************************************************************************/\r
-#ifndef NYLPC_CDHCPCLIENT_H_\r
-#define NYLPC_CDHCPCLIENT_H_\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif /* __cplusplus */\r
-\r
-#include "NyLPC_net.h"\r
-\r
-typedef struct NyLPC_TcDhcpClient NyLPC_TcDhcpClient_t;\r
-\r
-struct NyLPC_TcDhcpClient{\r
-       NyLPC_TcUdpSocket_t super;\r
-       NyLPC_TcIPv4Config_t* _result;\r
-       NyLPC_TUInt32 txid;\r
-       volatile NyLPC_TUInt16 _status;\r
-       //offer情報\r
-       struct NyLPC_TIPv4Addr _offerserver;\r
-};\r
-\r
-\r
-/**\r
- * DHCPソケットを作成します。\r
- */\r
-NyLPC_TBool NyLPC_cDhcpClient_initialize(NyLPC_TcDhcpClient_t* i_inst);\r
-\r
-void NyLPC_cDhcpClient_finalize(NyLPC_TcDhcpClient_t* i_inst);\r
-\r
-/**\r
- * NyLPC_TcIPv4Config_tをDHCPで更新します。\r
- * この関数をコールする時は、サービスは停止中でなければなりません。\r
- * @param i_cfg\r
- * 更新するi_cfg構造体。\r
- * emac,default_mssは設定済である必要があります。他のフィールド値は不定で構いません。\r
- * 更新されるフィールドは、ip,netmast,default_rootの3つです。\r
- * @return\r
- * 更新に成功した場合TRUE\r
- */\r
-NyLPC_TBool NyLPC_cDhcpClient_requestAddr(NyLPC_TcDhcpClient_t* i_inst,NyLPC_TcIPv4Config_t* i_cfg,NyLPC_TInt16 i_repeat);\r
-\r
-\r
-\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif /* __cplusplus */\r
-\r
-#endif\r
+/*********************************************************************************
+ * PROJECT: MiMic
+ * --------------------------------------------------------------------------------
+ *
+ * This file is part of MiMic
+ * Copyright (C)2011-2013 Ryo Iizuka
+ *
+ * MiMic is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * For further information please contact.
+ *  http://nyatla.jp/
+ *  <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>
+ *
+ *********************************************************************************/
+#ifndef NYLPC_CDHCPCLIENT_H_
+#define NYLPC_CDHCPCLIENT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+#include "NyLPC_stdlib.h"
+#include "../NyLPC_iUdpSocket.h"
+#include "../NyLPC_cIPv4Config.h"
+
+typedef struct NyLPC_TcDhcpClient NyLPC_TcDhcpClient_t;
+
+struct NyLPC_TcDhcpClient{
+    NyLPC_TiUdpSocket_t* _socket;
+    NyLPC_TcIPv4Config_t* _result;
+    NyLPC_TUInt32 txid;
+    volatile NyLPC_TUInt16 _status;
+    //offer情報
+    struct NyLPC_TIPv4Addr _offerserver;
+};
+
+
+/**
+ * DHCPソケットを作成します。
+ */
+NyLPC_TBool NyLPC_cDhcpClient_initialize(NyLPC_TcDhcpClient_t* i_inst);
+
+void NyLPC_cDhcpClient_finalize(NyLPC_TcDhcpClient_t* i_inst);
+
+/**
+ * NyLPC_TcIPv4Config_tをDHCPで更新します。
+ * この関数をコールする時は、サービスは停止中でなければなりません。
+ * @param i_cfg
+ * 更新するi_cfg構造体。
+ * emac,default_mssは設定済である必要があります。他のフィールド値は不定で構いません。
+ * 更新されるフィールドは、ip,netmast,default_rootの3つです。
+ * @return
+ * 更新に成功した場合TRUE
+ */
+NyLPC_TBool NyLPC_cDhcpClient_requestAddr(NyLPC_TcDhcpClient_t* i_inst,NyLPC_TcIPv4Config_t* i_cfg,NyLPC_TInt16 i_repeat);
+
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif