]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/net/bsd_tcpip/v2_0/cdl/freebsd_net.cdl
26cc3c20fd430989ada6edefcdd55954223e98fb
[karo-tx-redboot.git] / packages / net / bsd_tcpip / v2_0 / cdl / freebsd_net.cdl
1 # ====================================================================
2 #
3 #      freebsd_net.cdl
4 #
5 #      Networking configuration data
6 #
7 # ====================================================================
8 #####ECOSPDCOPYRIGHTBEGIN####
9 #
10 # Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
11 # All Rights Reserved.
12 #
13 # Permission is granted to use, copy, modify and redistribute this
14 # file.
15 #
16 #####ECOSPDCOPYRIGHTEND####
17 # ====================================================================
18 ######DESCRIPTIONBEGIN####
19 #
20 # Author(s):      gthomas
21 # Original data:  gthomas
22 # Contributors:
23 # Date:           1999-11-29
24 #
25 #####DESCRIPTIONEND####
26 #
27 # ====================================================================
28
29 cdl_package CYGPKG_NET_FREEBSD_STACK {
30     display       "FreeBSD networking stack"
31     parent        CYGPKG_NET
32     doc           ref/tcpip-freebsd.html
33     include_dir   .
34     requires      CYGPKG_IO
35     requires      CYGPKG_ISOINFRA
36     requires      CYGINT_ISO_C_TIME_TYPES
37     requires      CYGINT_ISO_STRERROR
38     requires      CYGINT_ISO_ERRNO
39     requires      CYGINT_ISO_ERRNO_CODES
40     requires      CYGINT_ISO_MALLOC
41     requires      CYGINT_ISO_STRING_BSD_FUNCS
42     requires      CYGPKG_IO_FILEIO
43     description   "Basic networking support, including TCP/IP."
44
45     cdl_interface CYGINT_NET_IPSEC_BSD_CRYPTO {
46         display   "Implementation of BSD CRYPTO functions"
47         description "
48           In order to avoid potential export problems of crypto
49           functions, they are distributed in a separate package which
50           must implement this interface"
51     }
52
53     implements    CYGPKG_NET_STACK
54     implements    CYGPKG_NET_STACK_INET
55     implements    CYGPKG_NET_STACK_INET6
56
57     # Note: separating the stack implementation from the common support leads
58     # to some rather incestious config file relationships.
59     define_proc {
60         puts $::cdl_system_header "/***** Networking stack proc output start *****/"
61         puts $::cdl_header "#include <pkgconf/net.h>"
62         puts $::cdl_system_header "#define CYGDAT_NET_STACK_CFG <pkgconf/net_freebsd_stack.h>"
63         puts $::cdl_system_header "/***** Networking stack proc output end *****/"
64     }
65
66
67     # Export our types to <sys/types.h>
68     implements    CYGINT_ISO_BSDTYPES
69     requires      { CYGBLD_ISO_BSDTYPES_HEADER == "<sys/bsdtypes.h>" }
70
71     # These files are unique to eCos
72     compile ecos/support.c \
73         ecos/synch.c \
74         ecos/timeout.c \
75         ecos/init.cxx 
76     compile -library=libextras.a sys/kern/sockio.c
77
78     # These files were derived from FreeBSD and carry their copyright
79     compile sys/net/if.c \
80         sys/net/rtsock.c \
81         sys/net/raw_cb.c \
82         sys/net/raw_usrreq.c \
83         sys/net/route.c \
84         sys/net/radix.c \
85         sys/net/if_ethersubr.c \
86         sys/net/if_loop.c \
87         sys/netinet/igmp.c \
88         sys/netinet/raw_ip.c \
89         sys/netinet/in.c  \
90         sys/netinet/in_cksum.c \
91         sys/netinet/in_pcb.c \
92         sys/netinet/in_proto.c \
93         sys/netinet/in_rmx.c \
94         sys/netinet/ip_encap.c \
95         sys/netinet/ip_id.c \
96         sys/netinet/ip_icmp.c \
97         sys/netinet/ip_flow.c \
98         sys/netinet/ip_input.c \
99         sys/netinet/ip_output.c \
100         sys/netinet/ip_mroute.c \
101         sys/netinet/if_ether.c \
102         sys/netinet/udp_usrreq.c \
103         sys/netinet/tcp_input.c \
104         sys/netinet/tcp_output.c \
105         sys/netinet/tcp_debug.c \
106         sys/netinet/tcp_usrreq.c \
107         sys/netinet/tcp_timer.c \
108         sys/netinet/tcp_subr.c \
109         sys/kern/md5c.c \
110         sys/kern/uipc_domain.c \
111         sys/kern/uipc_socket.c \
112         sys/kern/uipc_socket2.c \
113         sys/kern/uipc_mbuf.c \
114         sys/kern/uipc_mbuf2.c \
115         sys/kern/uipc_accf.c \
116         sys/kern/kern_subr.c 
117
118     cdl_component CYGPKG_NET_FREEBSD_INET {
119         display       "INET support"
120         active_if     CYGPKG_NET_INET
121         flavor        bool
122         no_define
123         default_value 1
124         description   "
125             This option enables support for INET (IPv4) network processing."
126
127         cdl_option CYGPKG_NET_FREEBSD_INET6 {
128             display       "IPv6 support"
129             active_if     CYGPKG_NET_INET6
130             flavor        bool
131             default_value 1
132             description   "
133                 This option enables support for new IPv6."
134             # These files were derived from FreeBSD and carry their copyright
135             compile \
136               sys/netinet6/dest6.c \
137               sys/netinet6/frag6.c \
138               sys/netinet6/icmp6.c \
139               sys/netinet6/in6.c \
140               sys/netinet6/in6_cksum.c \
141               sys/netinet6/in6_ifattach.c \
142               sys/netinet6/in6_pcb.c \
143               sys/netinet6/in6_proto.c \
144               sys/netinet6/in6_rmx.c \
145               sys/netinet6/in6_src.c \
146               sys/netinet6/ip6_forward.c \
147               sys/netinet6/ip6_input.c \
148               sys/netinet6/ip6_mroute.c \
149               sys/netinet6/ip6_output.c \
150               sys/netinet6/mld6.c \
151               sys/netinet6/nd6.c \
152               sys/netinet6/nd6_nbr.c \
153               sys/netinet6/nd6_rtr.c \
154               sys/netinet6/raw_ip6.c \
155               sys/netinet6/route6.c \
156               sys/netinet6/scope6.c \
157               sys/netinet6/udp6_output.c \
158               sys/netinet6/udp6_usrreq.c \
159
160 ## Only if firewall enabled
161 ##              sys/netinet6/ip6_fw.c \
162 ##
163         }
164         cdl_option CYGPKG_NET_FREEBSD_IPSEC {
165             display       "IPSEC support"
166             requires      CYGPKG_COMPRESS_ZLIB
167             implements    CYGPKG_NET_STACK_IPSEC
168
169             flavor        bool
170             default_value CYGPKG_NET_IPSEC_BSD_CRYPTO
171
172             description   "
173                 This option enables support for IPSEC."
174             # These files were derived from FreeBSD/KAME and carry their copyright
175             compile \
176               sys/netkey/key.c \
177               sys/netkey/key_debug.c \
178               sys/netkey/keydb.c\
179               sys/netkey/keysock.c \
180               sys/netinet6/ipsec.c \
181               sys/netinet6/ah_core.c \
182               sys/netinet6/ah_input.c \
183               sys/netinet6/ah_output.c \
184               sys/netinet6/ipcomp_core.c \
185               sys/netinet6/esp_core.c \
186               sys/netinet6/esp_output.c \
187               sys/netinet6/esp_input.c \
188               sys/netinet6/esp_rijndael.c \
189               sys/netinet6/esp_twofish.c \
190               sys/netinet6/ipcomp_core.c \
191               sys/netinet6/ipcomp_output.c \
192               sys/netinet6/ipcomp_input.c \
193               sys/netinet/ip_ecn.c
194         }
195         cdl_option CYGPKG_NET_FREEBSD_IPSEC6 {
196             display       "IPSEC support for IPv6"
197             active_if     CYGPKG_NET_INET6
198             active_if     CYGPKG_NET_FREEBSD_IPSEC
199
200             flavor        bool
201             default_value 1
202             description   "
203                 This option enables support for IPSEC with IPv6"
204             compile \
205               sys/netinet6/in6_gif.c
206
207         }
208         cdl_option CYGPKG_NET_FREEBSD_SYSCTL {
209             display       "sysctl support"
210             flavor        bool
211             default_value 0
212             description   "
213                 This option enables support for the system call sysctl used
214             to configure options/variables in the stack and retrieve statistics. "
215             # This file was derived from FreeBSD and carries that copyright
216             compile \
217               sys/kern/kern_sysctl.c
218         } 
219         cdl_option CYGPKG_NET_RANDOM_PORTS {
220             display       "Random source ports"
221             flavor        bool
222             default_value 0
223             description   "
224                 This option enables support for random source ports when the source
225             port is not specified.  This option is useful when connecting
226             through firewalls."
227         }                 
228     }
229
230     cdl_option CYGPKG_NET_NGIF {
231         display "Number of GIF things"
232         flavor  data
233         default_value 0
234         description   "
235             This option controls the number of active GIF things."
236         define NGIF
237     }
238
239     cdl_option CYGPKG_NET_NLOOP {
240         display "Number of loopback interfaces"
241         flavor  data
242         default_value 1
243         description   "
244             This option controls the number of loopback, i.e. local, interfaces.
245             There is seldom need for this value to be anything other than one."
246         define NLOOP
247     }
248
249     cdl_option CYGPKG_NET_FREEBSD_LOGGING {
250         display       "Error and warning log control"
251         flavor        booldata
252         default_value 0xC08F
253         description   "
254             This option controls the type and amount of information
255             printed by the networking code.  Different logging 
256             facilities may be enabled by bitwise or-ing:
257               LOG_ERR     0x0001 - error conditions
258               LOG_WARNING 0x0002 - interesting, but not errors
259               LOG_NOTICE  0x0004 - things to look out for
260               LOG_INFO    0x0008 - generic comments
261               LOG_DEBUG   0x0010 - for finding obscure problems
262               LOG_MDEBUG  0x0020 - additional information about memory allocations
263               LOG_IOCTL   0x0040 - information about ioctl calls
264               LOG_INIT    0x0080 - information as system initializes
265               LOG_ADDR    0x0100 - information about IPv6 addresses
266               LOG_FAIL    0x0200 - why packets (IPv6) are ignored, etc.
267               LOG_EMERG   0x4000 - emergency conditions
268               LOG_CRIT    0x8000 - critical error
269             "
270     }
271
272     cdl_option CYGPKG_NET_FORCE_SERIAL_CONSOLE {
273         display "Force use of serial console during initialization"
274         flavor  bool
275         default_value 0
276         description   "
277             Trying to print initialization messages can fail if the
278             console channel is a network connection (via RedBoot).
279             Use of this option forces the stack to use a serial
280             port during this phase for safety.  It can be used 
281             if the network drivers are unstable at this point."
282     }
283
284     cdl_option CYGPKG_NET_MEM_USAGE {
285         display "Memory designated for networking buffers."
286         flavor  data
287         default_value (256*1024)+(CYGPKG_NET_MAXSOCKETS*1024)
288         description   "
289             This option controls the amount of memory pre-allocated
290         for buffers used by the networking code.  The number is an
291         upper limit, with at least enough space to get the stack
292         initialized. Tip: setting a breakpoint at cyg_memalloc_alloc_fail() 
293         is an especially useful tool in establishing when there is too 
294         little memory for an application. "
295     }
296
297     cdl_option CYGPKG_NET_MEMPOOL_SIZE {
298         display "Memory designated for network dynamically allocated memory"
299         flavor  data
300         default_value CYGPKG_NET_MEM_USAGE/4
301         description   "
302             Controls the amount of memory in the pool used for dynamically
303             allocated memory. This does not include mbufs or clusters."
304     }
305
306     cdl_option CYGPKG_NET_MBUFS_SIZE {
307         display "MBUFs memory size"
308         flavor  data
309         default_value CYGPKG_NET_MEM_USAGE/4
310         description   "
311             Size of MBUFs pool."
312     }
313
314     cdl_option CYGPKG_NET_CLUSTERS_SIZE {
315         display "Clusters size"
316         flavor  data
317         default_value CYGPKG_NET_MEM_USAGE/2
318         description   "
319             Clusters size."
320     }
321
322     cdl_option CYGPKG_NET_MAXSOCKETS {
323         display "Max number of open sockets."
324         flavor  data
325         default_value CYGNUM_FILEIO_NFILE
326         description   "
327             This option controls the amount of memory pre-allocated
328         for socket buffers used by the networking code."
329     }
330
331     cdl_option CYGPKG_NET_NUM_WAKEUP_EVENTS {
332         display "Number of supported pending network events"
333         flavor  data
334         default_value 8
335         description   "
336             This option controls the number of pending network events
337         used by the networking code."
338     }
339
340     cdl_option CYGPKG_NET_THREAD_PRIORITY {
341         display "Priority level for backgound network processing."
342         flavor  data
343         default_value 7
344         description   "
345             This option allows the thread priority level used by the
346         networking stack to be adjusted by the user.  It should be set
347         high enough that sufficient CPU resources are available to
348         process network data, but may be adjusted so that application
349         threads can have precedence over network processing."
350     }
351
352     cdl_option CYGPKG_NET_FAST_THREAD_PRIORITY {
353         display "Priority level for fast network processing."
354         flavor  data
355         default_value CYGPKG_NET_THREAD_PRIORITY - 1
356         description   "
357             This option sets the thread priority level used by the fast
358         network thread.  The fast network thread runs often but briefly, to
359         service network device interrupts and network timeout events.  This
360         thread should have higher priority than the background network
361         thread.  It is reasonable to set this thread's priority higher than
362         application threads for best network throughput, or to set it lower
363         than application threads for best latency for those application
364         threads themselves, potentially at a cost to network throughput."
365     }
366
367     cdl_component CYGPKG_NET_FAST_THREAD_TICKLE_DEVS {
368         display "Fast network processing thread 'tickles' drivers"
369         default_value 1
370         description "
371             If this is enabled, the fast network thread will tickle the
372             device(s) periodically, to unblock them when the hardware has
373             become wedged due to a lost interrupt or other hardware
374             race-condition type problem.
375             This is not necessary if a networked app is running which sends
376             packets itself often - or
377             uses TCP, or any similar protocol which exchanges keep-alive
378             packets periodically and often enough.
379             Trying to send a packet passes control into the driver; this is
380             sufficient to detect and unblock jammed hardware."
381
382         cdl_option CYGNUM_NET_FAST_THREAD_TICKLE_DEVS_DELAY {
383             display "Delay in kernel clocks of tickle loop"
384             flavor data
385             default_value 50
386             description "
387                 The default is 50, which will usually mean a delay between
388                 tests for 'stuck' devices of 500mS, that is half a second.
389                 The overhead only applies if no network activity occurred,
390                 so it may be acceptable to make this value very small,
391                 where high CPU load does not matter during network idle
392                 periods, or very large if your application tries often to
393                 send packets itself."
394         }
395     }
396
397     cdl_component CYGPKG_NET_FREEBSD_STACK_OPTIONS {
398         display "Networking support build options"
399         flavor  none
400         no_define
401
402         cdl_option CYGPKG_NET_FREEBSD_STACK_CFLAGS_ADD {
403             display "Additional compiler flags"
404             flavor  data
405             no_define
406             default_value { "-D_KERNEL" }
407             description   "
408                 This option modifies the set of compiler flags for
409                 building the networking package.
410                 These flags are used in addition
411                 to the set of global flags."
412         }
413
414         cdl_option CYGPKG_NET_FREEBSD_STACK_CFLAGS_REMOVE {
415             display "Suppressed compiler flags"
416             flavor  data
417             no_define
418             default_value { "" }
419             description   "
420                 This option modifies the set of compiler flags for
421                 building the networking package. These flags are removed from
422                 the set of global flags if present."
423         }
424     }
425     cdl_option CYGPKG_NET_FREEBSD_STACK_TESTS {
426         display       "FreeBSD network stack tests"
427         flavor        data
428         no_define
429         calculated { CYGPKG_NET_FREEBSD_SYSCTL ? "tests/sysctl1" : "" }
430         description  "
431             These are test specifically for the FreeBSD stack. These test features
432             which only the FreeBSD stack has"
433     }
434 }