1 #====================================================================
5 # lwIP network stack configuration data
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 2004 eCosCentric
13 ## eCos is free software; you can redistribute it and/or modify it under
14 ## the terms of the GNU General Public License as published by the Free
15 ## Software Foundation; either version 2 or (at your option) any later version.
17 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 ## You should have received a copy of the GNU General Public License along
23 ## with eCos; if not, write to the Free Software Foundation, Inc.,
24 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 ## As a special exception, if other files instantiate templates or use macros
27 ## or inline functions from this file, or you compile this file and link it
28 ## with other works to produce a work based on this file, this file does not
29 ## by itself cause the resulting work to be covered by the GNU General Public
30 ## License. However the source code for this file must still be made available
31 ## in accordance with section (3) of the GNU General Public License.
33 ## This exception does not invalidate any other reasons why a work based on
34 ## this file might be covered by the GNU General Public License.
36 ## -------------------------------------------
37 #####ECOSGPLCOPYRIGHTEND####
38 # ====================================================================
39 ######DESCRIPTIONBEGIN####
41 # Author(s): cris@iv.ro, jani@iv.ro
42 # Original data: jani@iv.ro
46 #####DESCRIPTIONEND####
48 # ====================================================================
50 cdl_package CYGPKG_NET_LWIP {
52 description "Lightweight TCP/IP stack"
53 requires {(CYGPKG_LWIP_ETH == 1) || (CYGPKG_LWIP_SLIP == 1) || (CYGPKG_LWIP_PPP == 1)}
55 cdl_interface CYGPKG_NET_STACK {
56 display "Suitable network stack implementation"
58 Normally the interface if declared in the net common
59 package. However LWIP does not use that package
60 so we declare this interface here. Some of the device
61 drivers use it to decide if they should be build."
63 cdl_interface CYGPKG_NET_STACK_INET {
64 display "Network stack support for IPv4"
67 cdl_interface CYGPKG_NET_STACK_INET6 {
68 display "Network stack support for IPv6"
71 implements CYGPKG_NET_STACK
72 implements CYGPKG_NET_STACK_INET
97 cdl_option CYGDBG_LWIP_STATS {
98 display "Maintain traffic statistics"
102 Check this box to turn ON statistics options for lwIP."
105 cdl_component CYGDBG_LWIP_DEBUG {
106 display "Support printing debug information"
110 Check this box to turn ON debug options for lwIP."
112 cdl_option CYGDBG_LWIP_DEBUG_TCP {
113 display "Control TCP debug"
117 Generic TCP debug switch."
123 cdl_option CYGDBG_LWIP_ASSERTS {
124 display "Enable assertions"
128 Check this box to turn ON assertions for lwIP."
131 cdl_component CYGPKG_LWIP_IPV4_CONF {
132 display "IPV4 netconf"
136 See suboptions to define gateway IP, local IP and netmask."
138 cdl_option CYGDAT_LWIP_SERV_ADDR {
141 default_value {"192,168,1,1"}
143 Gateway's IP address."
147 cdl_option CYGDAT_LWIP_MY_ADDR {
150 default_value {"192,168,1,222"}
152 The IP address for this device."
156 cdl_option CYGDAT_LWIP_NETMASK {
159 default_value {"255,255,255,0"}
161 Netmask of the local network."
166 cdl_component CYGPKG_LWIP_MEM_OPTIONS {
167 display "Memory options"
171 Tunables for various aspects of memory usage throughout the stack."
173 cdl_option CYGNUM_LWIP_MEM_ALIGNMENT {
174 display "Memory alignment"
178 MEM_ALIGNMENT: should be set to the alignment of the CPU for which
179 lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4,
180 2 byte alignment -> define MEM_ALIGNMENT to 2."
182 cdl_option CYGNUM_LWIP_MEM_SIZE {
183 display "Memory size"
187 MEM_SIZE: the size of the heap memory. If the application will send
188 a lot of data that needs to be copied, this should be set high."
191 cdl_option CYGNUM_LWIP_MEMP_NUM_PBUF {
192 display "Number of memp struct pbufs"
196 MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
197 sends a lot of data out of ROM (or other static memory), this
201 cdl_option CYGNUM_LWIP_MEMP_NUM_UDP_PCB {
202 display "Simultaneous UDP control blocks "
206 MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
207 per active UDP 'connection'."
210 cdl_option CYGNUM_LWIP_MEMP_NUM_TCP_PCB {
211 display "Simultaneous active TCP connections "
215 MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
219 cdl_option CYGNUM_LWIP_MEMP_NUM_TCP_PCB_LISTEN {
220 display "Listening TCP connections"
224 MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
228 cdl_option CYGNUM_LWIP_MEMP_NUM_TCP_SEG {
229 display "Simultaneous TCP segments queued"
233 MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
237 cdl_option CYGNUM_LWIP_MEMP_NUM_SYS_TIMEOUT {
238 display "Simultaneous active timeouts"
240 default_value CYGPKG_LWIP_DHCP ? 6 : 4
242 MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
246 cdl_component CYGPKG_LWIP_MEM_SEQ_API {
247 display "Sequential API settings"
251 The following four are used only with the sequential API and can be
252 set to 0 if the application only will use the raw API."
255 cdl_option CYGNUM_LWIP_MEMP_NUM_NETBUF {
256 display "Struct netbufs"
260 MEMP_NUM_NETBUF: the number of struct netbufs."
263 cdl_option CYGNUM_LWIP_MEMP_NUM_NETCONN {
264 display "Struct netconns"
268 MEMP_NUM_NETCONN: the number of struct netconns."
271 cdl_option CYGNUM_LWIP_MEMP_NUM_APIMSG {
272 display "Struct api_msgs"
276 MEMP_NUM_APIMSG: the number of struct api_msg, used for
277 communication between the TCP/IP stack and the sequential
281 cdl_option CYGNUM_LWIP_MEMP_NUM_TCPIP_MSG {
282 display "Struct tcpip_msgs"
286 MEMP_NUM_TCPIPMSG: the number of struct tcpip_msg, which is used
287 for sequential API communication and incoming packets. Used in
295 cdl_component CYGPKG_LWIP_PBUF_OPTIONS {
300 Packet buffer related tunings."
303 cdl_option CYGNUM_LWIP_PBUF_POOL_SIZE {
304 display "PBUF pool size"
308 PBUF_POOL_SIZE: the number of buffers in the pbuf pool."
312 cdl_option CYGNUM_LWIP_PBUF_POOL_BUFSIZE {
313 display "PBUF buffer size"
317 PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool."
320 cdl_option CYGNUM_LWIP_PBUF_LINK_HLEN {
321 display "Allocation for a link level header"
323 calculated {CYGPKG_LWIP_SLIP || CYGPKG_LWIP_PPP ? 0 : 16}
325 PBUF_LINK_HLEN: the number of bytes that should be allocated for a
330 cdl_component CYGPKG_LWIP_TCP {
335 Support TCP protocol."
337 cdl_option CYGNUM_LWIP_TCP_TTL {
338 display "Time To Live"
344 cdl_option CYGIMP_LWIP_TCP_QUEUE_OOSEQ {
345 display "Queue segments"
349 Controls if TCP should queue segments that arrive out of
350 order. Disable this option if your device is low on memory."
353 cdl_option CYGNUM_LWIP_TCP_MSS {
354 display "Maximum segment size"
358 TCP Maximum segment size."
361 cdl_option CYGNUM_LWIP_TCP_SND_BUF {
362 display "Sender buffer space"
366 TCP sender buffer space (bytes)."
369 cdl_option CYGNUM_LWIP_TCP_SND_QUEUELEN {
370 display "Sender pbufs"
372 calculated CYGPKG_LWIP_TCP ? "4 * CYGNUM_LWIP_TCP_SND_BUF/CYGNUM_LWIP_TCP_MSS" : 0
374 TCP sender buffer space (pbufs). This must be at least = 2 *
375 TCP_SND_BUF/TCP_MSS for things to work."
378 cdl_option CYGNUM_LWIP_TCP_WND {
379 display "Receive window"
386 cdl_option CYGNUM_LWIP_TCP_MAXRTX {
387 display "Segment retransmissions"
391 Maximum number of retransmissions of data segments."
394 cdl_option CYGNUM_LWIP_TCP_SYNMAXRTX {
395 display "Syn retransmissions"
399 Maximum number of retransmissions of SYN segments."
403 cdl_component CYGPKG_LWIP_ARP_OPTIONS {
408 cdl_option CYGNUM_LWIP_ARP_TABLE_SIZE {
409 display "ARP table size"
417 cdl_component CYGPKG_LWIP_IP {
422 cdl_option CYGFUN_LWIP_IP_FORWARD {
423 display "Support IP forwarding"
427 Enable this option if you wish to have the ability to forward
428 IP packets across network interfaces. If you are going to run lwIP
429 on a device with only one network interface, disable this option."
432 cdl_option CYGFUN_LWIP_IP_OPTIONS {
433 display "Allow IP options"
437 If enabled, IP options are allowed (but not parsed). If
438 disabled, all packets with IP options are dropped."
442 cdl_option CYGFUN_LWIP_IP_FRAG {
443 display "Support IP fragmentation"
450 cdl_option CYGFUN_LWIP_IP_REASS {
451 display "Support IP reassembly"
460 cdl_component CYGPKG_LWIP_ICMP_OPTIONS {
465 cdl_option CYGNUM_LWIP_ICMP_TTL {
466 display "ICMP Time To Live"
473 cdl_component CYGPKG_LWIP_DHCP {
476 requires CYGPKG_LWIP_UDP
478 requires { CYGNUM_LWIP_MEMP_NUM_SYS_TIMEOUT >= 6 }
480 Provide DHCP support for initializing the IP address of network interfaces."
483 cdl_option CYGOPT_LWIP_DHCP_MANAGEMENT {
484 display "DHCP management"
488 If enabled then the lwIP stack automatically calls dhcp_start(),
489 dhcp_fine_tmr() and dhcp_coarse_tmr(). The DHCP stuff is handled
490 in the TCP/IP thread. If this causes trouble on high traffic loads
491 or if the application need to be aware of the DHCP state then it
492 is better to disable this option. In this case managing the DHCP
493 state in an application aware thread is recommended."
496 cdl_option CYGOPT_LWIP_DHCP_DOES_ARP_CHECK {
497 display "Check offered address"
501 Enable this option if you want to do an ARP check on the offered address
506 cdl_component CYGFUN_LWIP_LOOPIF {
507 display "Support loop interface (127.0.0.1)"
510 compile netif/loopif.c
513 cdl_component CYGPKG_LWIP_ETH {
514 display "Ethernet support"
516 requires CYGPKG_IO_ETH_DRIVERS
518 description "Ethernet support"
519 compile netif/etharp.c
521 cdl_option CYGNUM_LWIP_ETH_THREAD_PRIORITY {
522 display "ethernet input thread priority"
525 description "Priority of the thernet input thread"
530 cdl_option CYGNUM_LWIP_NETWORK_THREAD_PRIORITY {
531 display "Network thread priority"
534 description "Priority of the lwIP network thread.This thread handles all API messages and
538 cdl_component CYGPKG_LWIP_SLIP {
541 requires CYGPKG_IO_SERIAL_DEVICES
543 description "IP over Serial Line"
544 compile netif/slipif.c ecos/sio.c
546 cdl_option CYGNUM_LWIP_SLIPIF_THREAD_PRIORITY {
547 display "SLIP thread priority"
550 description "Priority of the SLIP input thread"
553 cdl_option CYGDAT_LWIP_SLIP_DEV {
554 display "Serial device"
556 default_value {"\"/dev/ser0\""}
558 Which serial port to use SLIP on."
562 cdl_component CYGPKG_LWIP_PPP {
565 requires CYGPKG_IO_SERIAL_DEVICES
567 description "The Point-to-Point Protocol"
568 compile netif/ppp/ppp.c \
581 cdl_option CYGIMP_LWIP_PPP_PAP_AUTH {
582 display "Support PAP authentication"
585 compile netif/ppp/pap.c
588 cdl_option CYGIMP_LWIP_PPP_CHAP_AUTH {
589 display "Support CHAP authentication"
592 compile netif/ppp/chap.c
595 cdl_option CYGDAT_LWIP_PPP_DEV {
596 display "Serial device for PPP"
598 default_value {"\"/dev/ser0\""}
600 Which serial port to use PPP on."
603 cdl_option CYGNUM_LWIP_PPP_THREAD_PRIORITY {
604 display "PPP main thread priority"
607 description "Priority of the PPP input thread"
611 cdl_component CYGPKG_LWIP_UDP {
615 description "Support UDP protocol."
618 cdl_option CYGNUM_LWIP_UDP_TTL {
619 display "Time To Live"
626 cdl_option CYGFUN_LWIP_RAW {
627 display "Enable RAW socket support"
634 cdl_option CYGFUN_LWIP_COMPAT_SOCKETS {
635 display "Provide compatible socket API"
639 The lwIP socket API uses defines to map the lwip socket functions
640 (lwip_accept(), lwip_bind(), lwip_listen()...) to BSD like names
641 (accept(), bind(), listen()...). If this causes trouble or naming
642 conficts for your application, then disable this option"
645 cdl_component CYGPKG_LWIP_APP_MEM_OPTIONS {
646 display "Memory options for apps"
649 description "Memory options for applications."
651 cdl_option CYGNUM_LWIP_VARMEMPOOL_SIZE {
652 display "Size of variable memory pool"
656 Memory required to hold semaphore, mbox and thread structures
657 are allocated from this memory pool.
663 cdl_option CYGNUM_LWIP_APP_THREADS {
664 display "Number of network threads in application"
668 At startup at least two lwIP threads are created:the polling(input) thread
669 and the TCP/IP (output) thread.Additionally your application creates one
671 Set this option to the maximum number of threads you will create through
672 sys_thread_new().Threads which you create through cyg_thread_create()
673 are not lwIP threads and don't count.This number is needed so that enough
674 static memory is reserved for stack space.
678 cdl_option CYGNUM_LWIP_THREAD_STACK_SIZE {
679 display "Size of per thread stack in lwIP"
683 Since stack space for threads needs to be statically allocated you can
684 specify the amount of memory to use for each network thread.
690 cdl_option CYGPKG_NET_LWIP_TESTS {
691 display "Some lwIP tests"
695 "tests/tcpecho tests/udpecho tests/httpd tests/socket tests/nc_test_slave tests/sys_timeout"
698 This option specifies the set of tests for lwIP.They show the usage of
699 the raw, the sequential and the BSD socket compatible APIs"