1 /*********************************************************************************
3 * --------------------------------------------------------------------------------
5 * This file is part of MiMic
6 * Copyright (C)2011 Ryo Iizuka
8 * MiMic is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published
10 * by the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * For further information please contact.
23 * <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>
26 * Parts of this file were leveraged from uIP:
28 * Copyright (c) 2001-2003, Adam Dunkels.
29 * All rights reserved.
31 * Redistribution and use in source and binary forms, with or without
32 * modification, are permitted provided that the following conditions
34 * 1. Redistributions of source code must retain the above copyright
35 * notice, this list of conditions and the following disclaimer.
36 * 2. Redistributions in binary form must reproduce the above copyright
37 * notice, this list of conditions and the following disclaimer in the
38 * documentation and/or other materials provided with the distribution.
39 * 3. The name of the author may not be used to endorse or promote
40 * products derived from this software without specific prior
43 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
44 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
45 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
46 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
47 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
48 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
49 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
50 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
51 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
52 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
53 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55 #ifndef NyLPC_TcMiMicIpNetIf_H_
56 #define NyLPC_TcMiMicIpNetIf_H_
57 #include "NyLPC_config.h"
58 #include "NyLPC_stdlib.h"
59 #include "../NyLPC_iNetInterface.h"
60 #include "../NyLPC_cIPv4Config.h"
61 /**********************************************************************
63 **********************************************************************/
67 #endif /* __cplusplus */
69 /**********************************************************************
71 * NyLPC_TcUipService class
73 **********************************************************************/
75 * uipタスクを管理する、サービスクラスです。
77 typedef struct NyLPC_TcMiMicIpNetIf NyLPC_TcMiMicIpNetIf_t;
83 * mbedのExportしたのをLPCXpressoでコンパイルするときは+192しないと落ちる。
85 #ifndef NyLPC_cMiMicIpNetIf_config_STACK_SIZE
86 # define NyLPC_cMiMicIpNetIf_config_STACK_SIZE (256+256+192)
90 * SOCKETリソースの最大数とRXメモリサイズ
93 #ifndef NyLPC_cMiMicIpNetIf_config_TCPLISTENER_MAX
94 # define NyLPC_cMiMicIpNetIf_config_TCPLISTENER_MAX 2
96 #ifndef NyLPC_cMiMicIpNetIf_config_TCPSOCKET_MAX
97 # define NyLPC_cMiMicIpNetIf_config_TCPSOCKET_MAX 3
99 #ifndef NyLPC_cMiMicIpNetIf_config_UDPSOCKET_MAX
100 # define NyLPC_cMiMicIpNetIf_config_UDPSOCKET_MAX 1
102 #ifndef NyLPC_cMiMicIpNetIf_config_NB_UDPSOCKET_MAX
103 # define NyLPC_cMiMicIpNetIf_config_NB_UDPSOCKET_MAX 2
105 #ifndef NyLPC_cMiMicIpNetIf_config_TCPSOCKET_RX_BUFFER_SIZE
106 # define NyLPC_cMiMicIpNetIf_config_TCPSOCKET_RX_BUFFER_SIZE 512
108 #ifndef NyLPC_cMiMicIpNetIf_config_UDPSOCKET_RX_BUFFER_SIZE
109 # define NyLPC_cMiMicIpNetIf_config_UDPSOCKET_RX_BUFFER_SIZE 512
117 //const NyLPC_TcIPv4Config_t* NyLPC_cUipService_refCurrentConfig(void);
118 const struct NyLPC_TiNetInterface_Interface* NyLPC_cMiMicIpNetIf_getNetInterface(void);
123 #endif /* __cplusplus */