source: uKadecot/trunk/src/ukadecot/uip-conf.h@ 108

Last change on this file since 108 was 108, checked in by coas-nagasima, 9 years ago

MIMEプロパティの変更

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-chdr; charset=SHIFT_JIS
File size: 4.9 KB
Line 
1/**
2 * \addtogroup uipopt
3 * @{
4 */
5
6/**
7 * \name Project-specific configuration options
8 * @{
9 *
10 * uIP has a number of configuration options that can be overridden
11 * for each project. These are kept in a project-specific uip-conf.h
12 * file and all configuration names have the prefix UIP_CONF.
13 */
14
15/*
16 * Copyright (c) 2006, Swedish Institute of Computer Science.
17 * All rights reserved.
18 *
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions
21 * are met:
22 * 1. Redistributions of source code must retain the above copyright
23 * notice, this list of conditions and the following disclaimer.
24 * 2. Redistributions in binary form must reproduce the above copyright
25 * notice, this list of conditions and the following disclaimer in the
26 * documentation and/or other materials provided with the distribution.
27 * 3. Neither the name of the Institute nor the names of its contributors
28 * may be used to endorse or promote products derived from this software
29 * without specific prior written permission.
30 *
31 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
32 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
35 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
39 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
40 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 * SUCH DAMAGE.
42 *
43 * This file is part of the uIP TCP/IP stack
44 *
45 * $Id: uip-conf.h 108 2015-06-11 09:15:46Z coas-nagasima $
46 */
47
48/**
49 * \file
50 * An example uIP configuration file
51 * \author
52 * Adam Dunkels <adam@sics.se>
53 */
54
55#ifndef __UIP_CONF_H__
56#define __UIP_CONF_H__
57
58/**
59 * 8 bit datatype
60 *
61 * This typedef defines the 8-bit type used throughout uIP.
62 *
63 * \hideinitializer
64 */
65typedef unsigned char u8_t;
66
67/**
68 * 16 bit datatype
69 *
70 * This typedef defines the 16-bit type used throughout uIP.
71 *
72 * \hideinitializer
73 */
74typedef unsigned short u16_t;
75
76/**
77 * Statistics datatype
78 *
79 * This typedef defines the dataype used for keeping statistics in
80 * uIP.
81 *
82 * \hideinitializer
83 */
84typedef unsigned short uip_stats_t;
85
86/**
87 * Maximum number of TCP connections.
88 *
89 * \hideinitializer
90 */
91#define UIP_CONF_MAX_CONNECTIONS 20
92
93/**
94 * Maximum number of listening TCP ports.
95 *
96 * \hideinitializer
97 */
98#define UIP_CONF_MAX_LISTENPORTS 10
99
100/**
101 * uIP buffer size.
102 *
103 * \hideinitializer
104 */
105//#define UIP_CONF_BUFFER_SIZE 420
106#define UIP_CONF_BUFFER_SIZE 1514
107
108/**
109 * Use uIP stack buffer or external driver buffer.
110 *
111 * \hideinitializer
112 */
113#define UIP_CONF_EXTERNAL_BUFFER 1
114
115
116/**
117 * CPU byte order.
118 *
119 * \hideinitializer
120 */
121// #define UIP_CONF_BYTE_ORDER LITTLE_ENDIAN
122#ifdef __LIT
123#define UIP_CONF_BYTE_ORDER UIP_LITTLE_ENDIAN
124#else
125#define UIP_CONF_BYTE_ORDER UIP_BIG_ENDIAN
126#endif
127
128/**
129 * Logging on or off
130 *
131 * \hideinitializer
132 */
133#define UIP_CONF_LOGGING 1
134
135/**
136 * Enable IPv6.
137 *
138 * \hideinitializer
139 */
140#define UIP_CONF_IPV6 0
141
142/**
143 * UDP support on or off
144 *
145 * \hideinitializer
146 */
147#define UIP_CONF_UDP 1
148
149/**
150 * UDP checksums on or off
151 *
152 * \hideinitializer
153 */
154#define UIP_CONF_UDP_CHECKSUMS 1
155
156/**
157 * uIP statistics on or off
158 *
159 * \hideinitializer
160 */
161#define UIP_CONF_STATISTICS 1
162
163/**
164 * uIP UDP Broadcast on or off
165 *
166 * \hideinitializer
167 */
168// Enable UDP Brodcast packet processing
169#define UIP_CONF_BROADCAST UIP_CONF_UDP
170
171#ifndef printf
172#include <stdio.h>
173
174extern void syslog(unsigned int prio, const char *format, ...);
175#define printf(...) syslog(7/*LOG_DEBUG*/, __VA_ARGS__)
176#endif
177
178/* Here we include the header file for the application(s) we use in
179 our project. */
180/*#include "smtp.h"*/
181/*#include "hello-world.h"*/
182/*#include "telnetd.h"*/
183#include "webserver.h"
184#include "dhcpc.h"
185/*#include "resolv.h"*/
186/*#include "webclient.h"*/
187/*#include "httpd.h"*/
188
189#include "timer.h"
190#include "pt.h"
191
192struct ecnl_state {
193 struct pt pt;
194 struct uip_timer timer;
195};
196
197/*#define uip_tcp_appstate_t \
198struct uip_tcp_adptstate {\
199 void (*tcp_callback)(struct uip_conn *uip_conn, int fncd, void *p_parblk);\
200 union {\
201 struct httpd_state httpd;\
202 } parblk;\
203}
204void uip_appcall(void);
205#define UIP_APPCALL uip_appcall*/
206
207void uip_udp_appcall(void);
208#define uip_udp_appstate_t \
209struct uip_udp_adptstate {\
210 void (*udp_callback)(struct uip_udp_conn *uip_udp_conn, int fncd, void *p_parblk);\
211 union {\
212 struct dhcpc_state dhcpc;\
213 struct ecnl_state ecnl;\
214 } parblk; \
215}
216#define UIP_UDP_APPCALL uip_udp_appcall
217
218#endif /* __UIP_CONF_H__ */
219
220/** @} */
221/** @} */
Note: See TracBrowser for help on using the repository browser.