]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/net/lwip_tcpip/v2_0/cdl/lwip_net.cdl
unified MX27, MX25, MX37 trees
[karo-tx-redboot.git] / packages / net / lwip_tcpip / v2_0 / cdl / lwip_net.cdl
1 #====================================================================
2 #
3 #      lwip_net.cdl
4 #
5 #      lwIP network stack configuration data
6 #
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 2004 eCosCentric 
12 ##
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.
16 ##
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
20 ## for more details.
21 ##
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.
25 ##
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.
32 ##
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.
35 ##
36 ## -------------------------------------------
37 #####ECOSGPLCOPYRIGHTEND####
38 # ====================================================================
39 ######DESCRIPTIONBEGIN####
40 #
41 # Author(s):     cris@iv.ro, jani@iv.ro
42 # Original data: jani@iv.ro 
43 # Contributors:   
44 # Date:           2002-06-21
45 #
46 #####DESCRIPTIONEND####
47 #
48 # ====================================================================
49
50 cdl_package CYGPKG_NET_LWIP {
51         display "lwIP"
52         description     "Lightweight TCP/IP stack"      
53         requires {(CYGPKG_LWIP_ETH ==  1) || (CYGPKG_LWIP_SLIP == 1) || (CYGPKG_LWIP_PPP == 1)}
54
55         cdl_interface CYGPKG_NET_STACK {
56             display   "Suitable network stack implementation"
57             description "
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."
62         }
63         cdl_interface CYGPKG_NET_STACK_INET {
64             display   "Network stack support for IPv4"
65         }
66
67         cdl_interface CYGPKG_NET_STACK_INET6 {
68             display   "Network stack support for IPv6"
69         }
70
71         implements    CYGPKG_NET_STACK
72         implements    CYGPKG_NET_STACK_INET
73
74         compile core/mem.c      \
75                 core/memp.c     \
76                 core/netif.c    \
77                 core/pbuf.c     \
78                 core/stats.c    \
79                 core/sys.c      \
80                 core/tcp.c      \
81                 core/tcp_in.c   \
82                 core/tcp_out.c  \
83                 core/inet.c     \
84                 core/ipv4/icmp.c        \
85                 core/ipv4/ip.c  \
86                 core/ipv4/ip_addr.c     \
87                 core/ipv4/ip_frag.c     \
88                 api/api_lib.c   \
89                 api/api_msg.c   \
90                 api/tcpip.c     \
91                 api/err.c       \
92                 api/sockets.c   \
93                 ecos/sys_arch.c \
94                 ecos/init.c     
95         
96         
97         cdl_option CYGDBG_LWIP_STATS {
98                 display         "Maintain traffic statistics"
99                 flavor          bool
100                 default_value   0
101                 description     "
102                         Check this box to turn ON statistics options for lwIP."
103         }
104                 
105         cdl_component CYGDBG_LWIP_DEBUG {
106                 display         "Support printing debug information"
107                 flavor          bool
108                 default_value   0
109                 description     "
110                         Check this box to turn ON debug options for lwIP."
111
112                 cdl_option CYGDBG_LWIP_DEBUG_TCP {
113                         display "Control TCP debug"
114                         flavor          bool
115                         default_value   0
116                         description     "
117                                 Generic TCP debug switch."
118                         
119                 }
120                 
121         }
122
123         cdl_option CYGDBG_LWIP_ASSERTS {
124                 display         "Enable assertions"
125                 flavor          bool
126                 default_value   0
127                 description     "
128                         Check this box to turn ON assertions for lwIP."
129         }
130
131         cdl_component CYGPKG_LWIP_IPV4_CONF {
132                 display         "IPV4 netconf"
133                 flavor          none
134                 no_define
135                 description     "
136                         See suboptions to define gateway IP, local IP and netmask."
137                 
138                 cdl_option CYGDAT_LWIP_SERV_ADDR {
139                         display         "Gateway IP"
140                         flavor          data
141                         default_value   {"192,168,1,1"}
142                         description     "
143                                 Gateway's IP address."
144
145                 }
146                 
147                 cdl_option CYGDAT_LWIP_MY_ADDR {
148                         display         "My IP"
149                         flavor          data
150                         default_value   {"192,168,1,222"}
151                         description     "
152                                 The IP address for this device."
153
154                 }
155                 
156                 cdl_option CYGDAT_LWIP_NETMASK {
157                         display         "Netmask"
158                         flavor          data
159                         default_value   {"255,255,255,0"}
160                         description     "
161                                 Netmask of the local network."
162
163                 }
164         }
165         
166         cdl_component CYGPKG_LWIP_MEM_OPTIONS {
167                 display         "Memory options"
168                 flavor          none
169                 no_define
170                 description     "
171                         Tunables for various aspects of memory usage throughout the stack."
172                                 
173                 cdl_option CYGNUM_LWIP_MEM_ALIGNMENT {
174                         display         "Memory alignment"
175                         flavor          data
176                         default_value   4
177                         description     "
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."
181                 }                
182                 cdl_option CYGNUM_LWIP_MEM_SIZE {
183                         display         "Memory size"
184                         flavor          data
185                         default_value   4000
186                         description     "
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."                
189                 }                
190                 
191                 cdl_option CYGNUM_LWIP_MEMP_NUM_PBUF {
192                         display         "Number of memp struct pbufs"
193                         flavor          data
194                         default_value   8
195                         description     "
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
198                                  should be set high."
199                                  
200                 }                
201                 cdl_option CYGNUM_LWIP_MEMP_NUM_UDP_PCB {
202                         display         "Simultaneous UDP control blocks "
203                         flavor          data
204                         default_value   4
205                         description     "
206                                 MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
207                                 per active UDP 'connection'."
208                                 
209                 }                
210                 cdl_option CYGNUM_LWIP_MEMP_NUM_TCP_PCB {
211                         display         "Simultaneous active TCP connections "
212                         flavor          data
213                         default_value   5
214                         description     "
215                                 MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
216                                 connections."
217                                 
218                 }                
219                 cdl_option CYGNUM_LWIP_MEMP_NUM_TCP_PCB_LISTEN {
220                         display         "Listening TCP connections"
221                         flavor          data
222                         default_value   8
223                         description     "
224                                  MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
225                                  connections."
226                                  
227                 }                
228                 cdl_option CYGNUM_LWIP_MEMP_NUM_TCP_SEG {
229                         display         "Simultaneous TCP segments queued"
230                         flavor          data
231                         default_value   8
232                         description     "
233                                 MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
234                                 segments."
235                                 
236                 }                
237                 cdl_option CYGNUM_LWIP_MEMP_NUM_SYS_TIMEOUT {
238                         display         "Simultaneous active timeouts"
239                         flavor          data
240                         default_value   CYGPKG_LWIP_DHCP ? 6 : 4
241                         description     "
242                                 MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
243                                 timeouts."
244                 
245                 }                
246                 cdl_component CYGPKG_LWIP_MEM_SEQ_API {
247                         display         "Sequential API settings"
248                         flavor          none
249                         no_define
250                         description     "
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."
253                 
254
255                         cdl_option CYGNUM_LWIP_MEMP_NUM_NETBUF {
256                                 display         "Struct netbufs"
257                                 flavor          data
258                                 default_value   2
259                                 description     "
260                                         MEMP_NUM_NETBUF: the number of struct netbufs."
261                                         
262                         }                
263                         cdl_option CYGNUM_LWIP_MEMP_NUM_NETCONN {
264                                 display         "Struct netconns"
265                                 flavor          data
266                                 default_value   4
267                                 description     "
268                                         MEMP_NUM_NETCONN: the number of struct netconns."
269                                         
270                         }                
271                         cdl_option CYGNUM_LWIP_MEMP_NUM_APIMSG {
272                                 display         "Struct api_msgs"
273                                 flavor          data
274                                 default_value   8
275                                 description     "
276                                         MEMP_NUM_APIMSG: the number of struct api_msg, used for
277                                         communication between the TCP/IP stack and the sequential
278                                         programs."
279                                         
280                         }                
281                         cdl_option CYGNUM_LWIP_MEMP_NUM_TCPIP_MSG {
282                                 display         "Struct tcpip_msgs"
283                                 flavor          data
284                                 default_value   8
285                                 description     "
286                                         MEMP_NUM_TCPIPMSG: the number of struct tcpip_msg, which is used
287                                         for sequential API communication and incoming packets. Used in
288                                         src/api/tcpip.c."
289
290                         }                
291                 }
292
293         }
294         
295         cdl_component CYGPKG_LWIP_PBUF_OPTIONS {
296                 display         "PBUF"
297                 flavor          none
298                 no_define
299                 description     "
300                 Packet buffer related tunings."
301
302                         
303                 cdl_option CYGNUM_LWIP_PBUF_POOL_SIZE {
304                         display         "PBUF pool size"
305                         flavor          data
306                         default_value   60
307                         description     "
308                         PBUF_POOL_SIZE: the number of buffers in the pbuf pool."
309         
310                 }
311                 
312                 cdl_option CYGNUM_LWIP_PBUF_POOL_BUFSIZE {
313                         display         "PBUF buffer size"
314                         flavor          data
315                         default_value   1024
316                         description     "
317                         PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool."
318                 }               
319                  
320                 cdl_option CYGNUM_LWIP_PBUF_LINK_HLEN {
321                         display         "Allocation for a link level header"
322                         flavor          data
323                         calculated      {CYGPKG_LWIP_SLIP || CYGPKG_LWIP_PPP ? 0 : 16}
324                         description     "
325                                 PBUF_LINK_HLEN: the number of bytes that should be allocated for a
326                                 link level header."
327                         }                
328         }
329         
330         cdl_component CYGPKG_LWIP_TCP {
331                 display             "TCP"
332                 flavor              bool
333                 default_value   1
334                 description     "
335                            Support TCP protocol."
336                 
337                 cdl_option CYGNUM_LWIP_TCP_TTL {
338                         display         "Time To Live"
339                         flavor          data
340                         default_value   255
341                         description     ""
342
343                 }                
344                 cdl_option CYGIMP_LWIP_TCP_QUEUE_OOSEQ {
345                         display         "Queue segments"
346                         flavor          bool
347                         default_value   1
348                         description     "
349                                 Controls if TCP should queue segments that arrive out of
350                                 order. Disable this option if your device is low on memory."
351                 
352                 }                
353                 cdl_option CYGNUM_LWIP_TCP_MSS {
354                         display         "Maximum segment size"
355                         flavor          data
356                         default_value   2048
357                         description     "
358                                 TCP Maximum segment size."
359                 }       
360                          
361                 cdl_option CYGNUM_LWIP_TCP_SND_BUF {
362                         display         "Sender buffer space"
363                         flavor          data
364                         default_value   2048    
365                         description     "
366                                 TCP sender buffer space (bytes)."
367
368                 }                
369                 cdl_option CYGNUM_LWIP_TCP_SND_QUEUELEN {
370                         display         "Sender pbufs"
371                         flavor          data
372                         calculated      CYGPKG_LWIP_TCP ? "4 * CYGNUM_LWIP_TCP_SND_BUF/CYGNUM_LWIP_TCP_MSS" : 0
373                         description     "
374                                 TCP sender buffer space (pbufs). This must be at least = 2 *
375                                 TCP_SND_BUF/TCP_MSS for things to work."
376
377                 }                
378                 cdl_option CYGNUM_LWIP_TCP_WND {
379                         display         "Receive window"
380                         flavor          data
381                         default_value   4096
382                         description     "
383                                 TCP receive window."
384
385                 }                
386                 cdl_option CYGNUM_LWIP_TCP_MAXRTX {
387                         display         "Segment retransmissions"
388                         flavor          data
389                         default_value   12
390                         description     "
391                                  Maximum number of retransmissions of data segments."
392
393                 }                
394                 cdl_option CYGNUM_LWIP_TCP_SYNMAXRTX {
395                         display         "Syn retransmissions"
396                         flavor          data
397                         default_value   4
398                         description     "
399                                 Maximum number of retransmissions of SYN segments."
400                         }                
401         }       
402         
403         cdl_component CYGPKG_LWIP_ARP_OPTIONS {
404                 display         "ARP"
405                 flavor          none
406                 no_define
407                 
408                 cdl_option CYGNUM_LWIP_ARP_TABLE_SIZE {
409                         display         "ARP table size"
410                         flavor          data
411                         default_value   10
412                         description     ""
413                 
414                 }
415         }
416
417         cdl_component CYGPKG_LWIP_IP {
418                 display         "IP"
419                 flavor          none
420                 no_define
421         
422                 cdl_option CYGFUN_LWIP_IP_FORWARD {
423                         display         "Support IP forwarding"
424                         flavor          bool
425                         default_value   1
426                         description     "
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."
430                 
431                 }
432                 cdl_option CYGFUN_LWIP_IP_OPTIONS {
433                         display         "Allow IP options"
434                         flavor          bool
435                         default_value   1
436                         description     "
437                                 If enabled, IP options are allowed (but not parsed). If
438                                    disabled, all packets with IP options are dropped."
439                 
440                 }
441                 
442                 cdl_option CYGFUN_LWIP_IP_FRAG {
443                         display         "Support IP fragmentation"
444                         flavor          bool
445                         default_value   1
446                         description     "
447                         "       
448                 }
449
450                 cdl_option CYGFUN_LWIP_IP_REASS {
451                         display         "Support IP reassembly"
452                         flavor          bool
453                         default_value   1
454                         description     "
455                         "       
456                 }
457
458         }
459
460         cdl_component CYGPKG_LWIP_ICMP_OPTIONS {
461                 display         "ICMP"
462                 flavor          none
463                 no_define
464
465                 cdl_option CYGNUM_LWIP_ICMP_TTL {
466                         display         "ICMP Time To Live"
467                         flavor          data
468                         default_value   255
469                         description     ""
470                 }
471         }
472
473         cdl_component CYGPKG_LWIP_DHCP {
474                 display           "DHCP"
475                 flavor            bool
476                 requires  CYGPKG_LWIP_UDP
477                 default_value 0
478                 requires  { CYGNUM_LWIP_MEMP_NUM_SYS_TIMEOUT >= 6 }
479                 description "
480                     Provide DHCP support for initializing the IP address of network interfaces."
481                 compile core/dhcp.c
482
483         cdl_option CYGOPT_LWIP_DHCP_MANAGEMENT {
484             display    "DHCP management"
485             flavor     bool
486             default_value 1
487             description "
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."        
494         }
495         
496                 cdl_option CYGOPT_LWIP_DHCP_DOES_ARP_CHECK {
497                         display         "Check offered address"
498                         flavor          bool
499                         default_value   1
500                         description     "
501                                 Enable this option if you want to do an ARP check on the offered address
502                                 (recommended)."
503                 }
504         }
505         
506         cdl_component CYGFUN_LWIP_LOOPIF {
507                 display         "Support loop interface (127.0.0.1)"
508                 flavor          bool
509                 default_value   1
510                 compile netif/loopif.c
511         }
512
513         cdl_component CYGPKG_LWIP_ETH {
514                 display "Ethernet support"
515                 flavor bool
516                 requires CYGPKG_IO_ETH_DRIVERS
517                 default_value   1
518                 description "Ethernet support"
519                 compile netif/etharp.c
520                 
521                 cdl_option CYGNUM_LWIP_ETH_THREAD_PRIORITY {
522                         display "ethernet input thread priority"
523                         flavor data
524                         default_value   6
525                         description "Priority of the thernet input thread"
526                 }
527                 
528         }
529         
530     cdl_option CYGNUM_LWIP_NETWORK_THREAD_PRIORITY {
531                         display "Network thread priority"
532                         flavor data
533                         default_value   7
534                         description "Priority of the lwIP network thread.This thread handles all API messages and
535                                         network packets."
536                 }       
537
538         cdl_component CYGPKG_LWIP_SLIP {
539                 display "SLIP"
540                 flavor bool
541                 requires CYGPKG_IO_SERIAL_DEVICES
542                 default_value   0
543                 description "IP over Serial Line"
544                 compile netif/slipif.c ecos/sio.c
545                 
546                 cdl_option CYGNUM_LWIP_SLIPIF_THREAD_PRIORITY {
547                         display "SLIP thread priority"
548                         flavor data
549                         default_value   8
550                         description "Priority of the SLIP input thread"
551                 }
552                 
553                 cdl_option CYGDAT_LWIP_SLIP_DEV {
554                         display "Serial device"
555                         flavor  data
556                         default_value {"\"/dev/ser0\""}
557                         description "
558                                 Which serial port to use SLIP on."
559                 }
560         }
561         
562         cdl_component CYGPKG_LWIP_PPP {
563                 display "PPP"
564                 flavor bool
565                 requires CYGPKG_IO_SERIAL_DEVICES
566                 default_value   0
567                 description "The Point-to-Point Protocol"
568                 compile netif/ppp/ppp.c         \
569                         netif/ppp/auth.c        \
570                         netif/ppp/chpms.c       \
571                         netif/ppp/fsm.c         \
572                         netif/ppp/ipcp.c        \
573                         netif/ppp/lcp.c         \
574                         netif/ppp/magic.c       \
575                         netif/ppp/md5.c         \
576                         netif/ppp/randm.c       \
577                         netif/ppp/vj.c          \
578                         ecos/sio.c
579                         
580
581                 cdl_option CYGIMP_LWIP_PPP_PAP_AUTH {
582                         display "Support PAP authentication"
583                         flavor bool
584                         default_value 1
585                         compile netif/ppp/pap.c         
586                 }
587                 
588                 cdl_option CYGIMP_LWIP_PPP_CHAP_AUTH {
589                         display "Support CHAP authentication"
590                         flavor bool
591                         default_value 1
592                         compile netif/ppp/chap.c                
593                 }
594         
595                 cdl_option CYGDAT_LWIP_PPP_DEV {
596                         display "Serial device for PPP"
597                         flavor  data
598                         default_value {"\"/dev/ser0\""}
599                         description "
600                         Which serial port to use PPP on."
601                 }
602
603                 cdl_option CYGNUM_LWIP_PPP_THREAD_PRIORITY {
604                         display "PPP main thread priority"
605                         flavor data
606                         default_value   8
607                         description "Priority of the PPP input thread"
608                 }       
609         }
610
611         cdl_component CYGPKG_LWIP_UDP {
612                 display         "UDP"
613                 flavor          bool
614                 default_value   1
615                 description     "Support UDP protocol."
616                 compile core/udp.c
617
618                 cdl_option CYGNUM_LWIP_UDP_TTL {
619                         display         "Time To Live"
620                         flavor          data
621                         default_value   255
622                         description     ""
623                 }
624         }
625         
626         cdl_option CYGFUN_LWIP_RAW {
627                 display         "Enable RAW socket support"
628                 flavor          bool
629                 default_value   1
630                 description     ""
631                 compile core/raw.c
632         }
633         
634         cdl_option CYGFUN_LWIP_COMPAT_SOCKETS {
635             display       "Provide compatible socket API"
636             flavor        bool
637             default_value 1
638             description "
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"
643     }
644
645         cdl_component CYGPKG_LWIP_APP_MEM_OPTIONS {
646                 display         "Memory options for apps"
647                 flavor          none
648                 no_define
649                 description     "Memory options for applications."
650
651                 cdl_option CYGNUM_LWIP_VARMEMPOOL_SIZE {
652                         display         "Size of variable memory pool"
653                         flavor          data
654                         default_value   2048    
655                         description     "
656                                         Memory required to hold semaphore, mbox and thread structures
657                                         are allocated from this memory pool.
658                                         "
659                 }
660
661         
662
663                 cdl_option CYGNUM_LWIP_APP_THREADS {
664                         display         "Number of network threads in application"
665                         flavor          data
666                         default_value   1
667                         description     "
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
670                                         or more threads.
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.
675                                         "
676                 }
677         
678                 cdl_option CYGNUM_LWIP_THREAD_STACK_SIZE {
679                         display         "Size of per thread stack in lwIP"
680                         flavor          data
681                         default_value   4096
682                         description     "
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.
685                                         "
686                 }                               
687         }
688         
689             
690         cdl_option CYGPKG_NET_LWIP_TESTS {
691                 display "Some lwIP tests"
692                 flavor  data
693                 no_define
694                 calculated { 
695                         "tests/tcpecho tests/udpecho tests/httpd tests/socket tests/nc_test_slave tests/sys_timeout"
696                 }  
697                 description   "
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"
700         }
701                 
702 }