This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088

Fork of libMiMic by Ryo Iizuka

Committer:
nyatla
Date:
Tue Jun 24 09:37:24 2014 +0000
Revision:
79:baa21f8763cf
Parent:
76:b375b3d750d8
MiMic core r375???

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nyatla 0:142ee8b12fef 1 /*********************************************************************************
nyatla 0:142ee8b12fef 2 * PROJECT: MiMic
nyatla 0:142ee8b12fef 3 * --------------------------------------------------------------------------------
nyatla 0:142ee8b12fef 4 *
nyatla 0:142ee8b12fef 5 * This file is part of MiMic
nyatla 0:142ee8b12fef 6 * Copyright (C)2011 Ryo Iizuka
nyatla 0:142ee8b12fef 7 *
nyatla 0:142ee8b12fef 8 * MiMic is free software: you can redistribute it and/or modify
nyatla 0:142ee8b12fef 9 * it under the terms of the GNU Lesser General Public License as published
nyatla 0:142ee8b12fef 10 * by the Free Software Foundation, either version 3 of the License, or
nyatla 0:142ee8b12fef 11 * (at your option) any later version.
nyatla 0:142ee8b12fef 12 *
nyatla 0:142ee8b12fef 13 * This program is distributed in the hope that it will be useful,
nyatla 0:142ee8b12fef 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nyatla 0:142ee8b12fef 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
nyatla 0:142ee8b12fef 16 * GNU General Public License for more details.
nyatla 0:142ee8b12fef 17 *
nyatla 0:142ee8b12fef 18 * You should have received a copy of the GNU Lesser General Public License
nyatla 0:142ee8b12fef 19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
nyatla 0:142ee8b12fef 20 *
nyatla 0:142ee8b12fef 21 * For further information please contact.
nyatla 0:142ee8b12fef 22 * http://nyatla.jp/
nyatla 0:142ee8b12fef 23 * <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>
nyatla 0:142ee8b12fef 24 *
nyatla 0:142ee8b12fef 25 *
nyatla 0:142ee8b12fef 26 * Parts of this file were leveraged from uIP:
nyatla 0:142ee8b12fef 27 *
nyatla 0:142ee8b12fef 28 * Copyright (c) 2001-2003, Adam Dunkels.
nyatla 0:142ee8b12fef 29 * All rights reserved.
nyatla 0:142ee8b12fef 30 *
nyatla 0:142ee8b12fef 31 * Redistribution and use in source and binary forms, with or without
nyatla 0:142ee8b12fef 32 * modification, are permitted provided that the following conditions
nyatla 0:142ee8b12fef 33 * are met:
nyatla 0:142ee8b12fef 34 * 1. Redistributions of source code must retain the above copyright
nyatla 0:142ee8b12fef 35 * notice, this list of conditions and the following disclaimer.
nyatla 0:142ee8b12fef 36 * 2. Redistributions in binary form must reproduce the above copyright
nyatla 0:142ee8b12fef 37 * notice, this list of conditions and the following disclaimer in the
nyatla 0:142ee8b12fef 38 * documentation and/or other materials provided with the distribution.
nyatla 0:142ee8b12fef 39 * 3. The name of the author may not be used to endorse or promote
nyatla 0:142ee8b12fef 40 * products derived from this software without specific prior
nyatla 0:142ee8b12fef 41 * written permission.
nyatla 0:142ee8b12fef 42 *
nyatla 0:142ee8b12fef 43 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
nyatla 0:142ee8b12fef 44 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
nyatla 0:142ee8b12fef 45 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
nyatla 0:142ee8b12fef 46 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
nyatla 0:142ee8b12fef 47 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
nyatla 0:142ee8b12fef 48 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
nyatla 0:142ee8b12fef 49 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
nyatla 0:142ee8b12fef 50 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
nyatla 0:142ee8b12fef 51 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
nyatla 0:142ee8b12fef 52 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
nyatla 0:142ee8b12fef 53 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
nyatla 0:142ee8b12fef 54 */
nyatla 0:142ee8b12fef 55 #ifndef NyLPC_TcUipService_H_
nyatla 0:142ee8b12fef 56 #define NyLPC_TcUipService_H_
nyatla 0:142ee8b12fef 57
nyatla 0:142ee8b12fef 58
nyatla 0:142ee8b12fef 59 /**********************************************************************
nyatla 0:142ee8b12fef 60 * Heder files
nyatla 0:142ee8b12fef 61 **********************************************************************/
nyatla 0:142ee8b12fef 62
nyatla 2:b96c1e90d120 63 #include "NyLPC_cTcpSocket.h"
nyatla 0:142ee8b12fef 64 #include "NyLPC_cTcpListener.h"
nyatla 0:142ee8b12fef 65 #include "NyLPC_cIPv4IComp.h"
nyatla 0:142ee8b12fef 66 #include "NyLPC_cIPv4Arp.h"
nyatla 0:142ee8b12fef 67 #include "NyLPC_cIPv4.h"
nyatla 0:142ee8b12fef 68
nyatla 0:142ee8b12fef 69 #ifdef __cplusplus
nyatla 0:142ee8b12fef 70 extern "C" {
nyatla 0:142ee8b12fef 71 #endif /* __cplusplus */
nyatla 0:142ee8b12fef 72
nyatla 0:142ee8b12fef 73 /**********************************************************************
nyatla 0:142ee8b12fef 74 *
nyatla 0:142ee8b12fef 75 * NyLPC_TcUipService class
nyatla 0:142ee8b12fef 76 *
nyatla 0:142ee8b12fef 77 **********************************************************************/
nyatla 0:142ee8b12fef 78 /**
nyatla 0:142ee8b12fef 79 * uipタスクを管理する、サービスクラスです。
nyatla 0:142ee8b12fef 80 */
nyatla 0:142ee8b12fef 81 typedef struct NyLPC_TcUipService NyLPC_TcUipService_t;
nyatla 0:142ee8b12fef 82
nyatla 0:142ee8b12fef 83
nyatla 2:b96c1e90d120 84 /** サービスタスクスタックサイズ
nyatla 49:d4334acc3ec3 85 * mdns 256+96(MIN)
nyatla 49:d4334acc3ec3 86 * upnp 256+160(MIN)
nyatla 76:b375b3d750d8 87 * mbedのExportしたのをLPCXpressoでコンパイルするときは+192しないと落ちる。
nyatla 2:b96c1e90d120 88 */
nyatla 79:baa21f8763cf 89 #ifndef NyLPC_cUipService_config_STACK_SIZE
nyatla 79:baa21f8763cf 90 #define NyLPC_cUipService_config_STACK_SIZE (256+192+192)
nyatla 79:baa21f8763cf 91 #endif
nyatla 0:142ee8b12fef 92
nyatla 0:142ee8b12fef 93
nyatla 0:142ee8b12fef 94
nyatla 0:142ee8b12fef 95
nyatla 0:142ee8b12fef 96 /**
nyatla 0:142ee8b12fef 97 * \param i_mac_addr
nyatla 37:fc4b4fd6a649 98 * システムで唯一のUIPサービスを初期化します。1度だけ実行できます。
nyatla 0:142ee8b12fef 99 */
nyatla 0:142ee8b12fef 100 NyLPC_TBool NyLPC_cUipService_initialize(void);
nyatla 0:142ee8b12fef 101
nyatla 0:142ee8b12fef 102 /**
nyatla 37:fc4b4fd6a649 103 * 処理を開始します。
nyatla 0:142ee8b12fef 104 * この関数はリエントラントではありません。複数のタスクから共有するときには、排他ロックを掛けてください。
nyatla 0:142ee8b12fef 105 * @param i_ref_config
nyatla 0:142ee8b12fef 106 * このコンフィギュレーションは、stopを実行するまでの間、インスタンスから参照します。外部で保持してください。
nyatla 0:142ee8b12fef 107 */
nyatla 0:142ee8b12fef 108 void NyLPC_cUipService_start(const NyLPC_TcIPv4Config_t* i_ref_config);
nyatla 0:142ee8b12fef 109
nyatla 0:142ee8b12fef 110 /**
nyatla 0:142ee8b12fef 111 * UIP処理を停止します。
nyatla 0:142ee8b12fef 112 * この関数はリエントラントではありません。複数のタスクから共有するときには、排他ロックを掛けてください。
nyatla 37:fc4b4fd6a649 113 * 関数を使用する前に、全ての非同期ソケット操作を停止してください。
nyatla 0:142ee8b12fef 114 */
nyatla 0:142ee8b12fef 115 void NyLPC_cUipService_stop(void);
nyatla 0:142ee8b12fef 116
nyatla 0:142ee8b12fef 117 /**
nyatla 0:142ee8b12fef 118 * イーサネットデバイスの名前を返します。
nyatla 0:142ee8b12fef 119 * この関数は、サービスが開始されているときのみ、動作します。
nyatla 0:142ee8b12fef 120 */
nyatla 37:fc4b4fd6a649 121 const char* NyLPC_cUipService_refDeviceName(void);
nyatla 21:f2a70f15301f 122 const NyLPC_TcIPv4Config_t* NyLPC_cUipService_refCurrentConfig(void);
nyatla 0:142ee8b12fef 123
nyatla 0:142ee8b12fef 124 #ifdef __cplusplus
nyatla 0:142ee8b12fef 125 }
nyatla 0:142ee8b12fef 126 #endif /* __cplusplus */
nyatla 0:142ee8b12fef 127
nyatla 37:fc4b4fd6a649 128 #endif