1 # ====================================================================
5 # Networking configuration data
7 # ====================================================================
8 #####ECOSPDCOPYRIGHTBEGIN####
10 # Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
11 # All Rights Reserved.
13 # Permission is granted to use, copy, modify and redistribute this
16 #####ECOSPDCOPYRIGHTEND####
17 # ====================================================================
18 ######DESCRIPTIONBEGIN####
21 # Original data: gthomas
25 #####DESCRIPTIONEND####
27 # ====================================================================
29 cdl_package CYGPKG_NET {
30 display "Basic networking framework"
31 doc ref/net-common-tcpip.html
34 requires CYGPKG_ISOINFRA
35 requires CYGINT_ISO_C_TIME_TYPES
36 requires CYGINT_ISO_STRERROR
37 requires CYGINT_ISO_ERRNO
38 requires CYGINT_ISO_ERRNO_CODES
39 requires CYGINT_ISO_MALLOC
40 requires CYGINT_ISO_STRING_BSD_FUNCS
41 description "Basic networking support, including TCP/IP."
43 cdl_interface CYGPKG_NET_DRIVER_FRAMEWORK {
44 display "Suitable driver framework interface, used by network package"
46 In order to decouple the network stack from driver specifics, the
47 driver framework must be defined in a separate package."
50 # Commonly exported infrastructure
51 implements CYGINT_ISO_NETDB_PROTO
52 implements CYGINT_ISO_NETDB_SERV
53 requires { CYGBLD_ISO_NETDB_PROTO_HEADER == "<net/netdb.h>" }
54 requires { CYGBLD_ISO_NETDB_SERV_HEADER == "<net/netdb.h>" }
56 cdl_interface CYGPKG_NET_STACK {
57 display "Suitable network stack implementation, used by network package"
59 In order to decouple the network support from most stack specifics, the
60 actual stack implementation must be defined in a separate package."
62 requires { CYGPKG_NET_STACK == 1 }
64 puts $::cdl_header "#include <pkgconf/system.h>"
65 puts $::cdl_header "#include CYGDAT_NET_STACK_CFG"
68 cdl_interface CYGPKG_NET_STACK_INET {
69 display "Network stack support for IPv4"
71 cdl_interface CYGPKG_NET_STACK_INET6 {
72 display "Network stack support for IPv6"
74 cdl_interface CYGPKG_NET_STACK_IPSEC {
75 display "Network stack support for IPSEC"
78 cdl_component CYGPKG_NET_INET {
79 display "INET support"
80 active_if CYGPKG_NET_STACK_INET
85 This option enables support for INET (IP) network processing."
98 compile getaddrinfo.c \
101 cdl_option CYGPKG_NET_INET6 {
102 display "IPv6 support"
103 active_if CYGPKG_NET_STACK_INET6
104 requires CYGINT_IO_ETH_MULTICAST
108 This option enables support for IPv6 networks."
112 cdl_option CYGPKG_NET_IPSEC {
113 display "IPSEC support"
114 active_if CYGPKG_NET_STACK_IPSEC
118 This option enables support for IPSEC"
122 cdl_option CYGSEM_NET_ROUTING {
123 display "Multicast routing support"
128 This option enables support for packet routing."
132 cdl_option CYGSEM_NET_RANDOMID {
133 display "Use random sequence for IP packet identifiers"
138 This option enables the use of random IP packet sequence
139 identifiers, rather than a purely sequential sequence. It is
140 believed that use of random identifiers improves security, at
141 a fairly substantial computational overhead."
147 cdl_component CYGPKG_NET_TFTP {
148 display "TFTP (RFC-1350) support"
149 requires CYGPKG_NET_INET
152 compile tftp_client.c \
155 This option provides additional library support for
156 the TFTP (Trivial File Transfer Protocol)."
158 cdl_option CYGPKG_NET_TFTPD_THREAD_PRIORITY {
159 display "Priority level for TFTP daemon thread."
163 This option allows the thread priority level used by the
164 TFTP server thread to be adjusted by the user. It should be set
165 high enough that sufficient CPU resources are available to
166 process network data, but may be adjusted so that application
167 threads can have precedence over TFTP server processing."
170 cdl_option CYGPKG_NET_TFTPD_THREAD_STACK_SIZE {
171 display "Stack size for TFTP threads."
173 default_value (CYGNUM_HAL_STACK_SIZE_TYPICAL+(3*(SEGSIZE+4)))
175 This option controls the size of the stack used for the
176 TFTP server. The default should be sufficient for most cases
177 but some applications my require bigger stacks when the
178 implementation of file operations are complex."
181 cdl_component CYGSEM_NET_TFTPD_MULTITHREADED {
182 display "Multiple TFTPD server threads on the same port."
186 This option controls the tftp server ability to be
187 multi-threaded. When enabled, multiple server can be
188 started on the same port number. This allows multiple
189 concurrent transfers to be active. When this option is
190 not enabled, while one transfer is active, other
191 requests will be delayed or even ignored."
193 cdl_option CYGNUM_NET_TFTPD_MULTITHREADED_PORTS {
194 display "Number of different ports with servers"
198 Each set of servers running on the same port number
199 require a semaphore to synchronise there operation. This option
200 controls the number of semaphores and so the number
201 of port numbers multithreaded servers which can be
206 cdl_option CYGPKG_NET_TFTP_FILE_ACCESS {
207 display "File I/O functions for TFTP server"
210 compile tftp_dummy_file.c
212 Minimal in-memory file I/O support for TFTP server."
216 cdl_component CYGPKG_NET_DHCP {
217 display "Use full DHCP instead of BOOTP"
218 requires CYGPKG_NET_INET
219 active_if (CYGHWR_NET_DRIVERS > 0)
223 Provide DHCP for initializing the IP address
224 of network interfaces. The DHCP client is capable of falling
225 back to BOOTP usage if the server does not support DHCP, so it
226 should never be necessary to disable this option. However,
227 depending on other configuration the DHCP client may provide or
228 require a kernel thread of its own; this consumes quite a lot
229 of resource which a BOOTP solution does not require."
231 cdl_option CYGOPT_NET_DHCP_DHCP_THREAD {
232 display "DHCP management thread"
236 Provide a separate thread to renew DHCP leases; otherwise
237 the application MUST periodically examine the semaphore
238 dhcp_needs_attention and call dhcp_bind() if it is
239 signalled. If enabled, this thread does all that for you.
240 Independent of this option, initialization of the
241 interfaces still occurs in init_all_network_interfaces()
242 and your startup code must call that. It will start the
243 DHCP management thread if necessary. If a lease fails to
244 be renewed, the management thread will shut down all
245 interfaces and attempt to initialize all the interfaces
246 again from scratch. This may cause application problems,
247 in which case managing the DHCP state in an application
248 aware thread is recommended. See comments in dhcp.h"
251 cdl_option CYGOPT_NET_DHCP_DHCP_THREAD_PARAM {
252 display "DHCP management thread loops forever"
255 active_if CYGOPT_NET_DHCP_DHCP_THREAD
257 If the parameter is nonzero, it loops forever; if zero,
258 the thread exits if a lease expires, and the application
259 must detect this and tidy up or reboot the whole machine."
262 cdl_option CYGPKG_NET_DHCP_THREAD_PRIORITY {
263 display "DHCP management thread priority"
265 default_value CYGPKG_NET_THREAD_PRIORITY + 1
266 active_if CYGOPT_NET_DHCP_DHCP_THREAD
268 This option sets the thread priority level used by the DHCP
269 management thread. It should be high enough that it can run
270 when necessary, but it does not need to be as high as the
271 network thread itself."
274 cdl_option CYGOPT_NET_DHCP_PARM_REQ_LIST_REPLACE {
275 display "Replace DHCP request options"
278 active_if CYGOPT_NET_DHCP_DHCP_THREAD
280 This option replaces the default list of requested
281 options in the DHCP/BOOTP request list. These are a
282 comma separated list of TAG_xxx values."
285 cdl_option CYGOPT_NET_DHCP_PARM_REQ_LIST_ADDITIONAL {
286 display "Additional DHCP request options"
289 active_if CYGOPT_NET_DHCP_DHCP_THREAD
291 This option adds additional options to the list of
292 requested options in the DHCP/BOOTP request list.
293 These are a comma separated list of TAG_xxx values."
296 cdl_component CYGOPT_NET_DHCP_OPTION_HOST_NAME {
297 display "DHCP host name option"
300 active_if CYGOPT_NET_DHCP_DHCP_THREAD
302 This option adds the TAG_HOST_NAME option to the DHCP/BOOTP
303 requests. The host name is defined by calling the function
304 dhcp_set_hostname(), prior to calling init_all_network_interfaces()."
306 cdl_option CYGNUM_NET_DHCP_OPTION_HOST_NAME_LEN {
307 display "DHCP host name maximum length"
310 legal_values 0 to 255
311 active_if CYGOPT_NET_DHCP_OPTION_HOST_NAME
313 This option defines the maximum length allowed for the
314 host name set by dhcp_set_hostname()."
318 cdl_option CYGOPT_NET_DHCP_OPTION_DHCP_CLIENTID_MAC {
319 display "DHCP client ID option"
322 active_if CYGOPT_NET_DHCP_DHCP_THREAD
324 This option adds the TAG_DHCP_CLIENTID option to the DHCP/BOOTP
325 requests. It uses the interface MAC address for the identifier."
328 cdl_option CYGNUM_NET_DHCP_MIN_RETRY_TIME {
329 display "DHCP minimum retry time"
331 legal_values 0 to 100
334 This option allows the application to specify the
335 minimum number of seconds for DHCP discovery. If DHCP
336 discovery fails, the action to be taken is application
337 specific. Multiple discovery attempts are made during
338 the time specified with each subsequent attempt having
339 a longer timeout. Attempts begin at approximately 1, 5,
340 15, 35, and 65 seconds with the last attempt timing out
341 after the total of 125 seconds. A new attempt will not
342 begin if the minimum time has been reached. Although,
343 an attempt in progress will run past the minimum time
344 specified. For example: Specifying 30 seconds would
345 timeout at 35 seconds. Specifying 70 seconds has the
346 same effect as specifying 100 seconds where it would
347 run for the total of 125 seconds."
351 cdl_component CYGPKG_NET_IPV6_ROUTING {
352 display "Options controlling IPv6 routing"
353 active_if CYGPKG_NET_INET6
357 Various options which control how routing is done for the
358 IPv6 enabled interfaces."
360 cdl_component CYGOPT_NET_IPV6_ROUTING_THREAD {
361 display "Thread for IPv6 routing"
362 requires CYGPKG_POSIX
366 Provide a separate thread to send router solicitation
369 compile ipv6_routing_thread.c
371 cdl_option CYGINT_NET_IPV6_ROUTING_THREAD_PRIORITY {
372 display "IPv6 routing thread priority"
374 default_value CYGPKG_NET_THREAD_PRIORITY + 1
376 This option sets the thread priority level used by the IPv6
377 routing thread. It should be high enough that it can run
378 when necessary, but it does not need to be as high as the
379 network thread itself."
382 cdl_option CYGINT_NET_IPV6_ROUTING_THREAD_PERIOD {
383 display "IPv6 routing thread rate"
387 This option sets the rate at which router solicitations will
388 be sent out by the routing thread (in seconds)."
393 cdl_component CYGPKG_NET_DEBUG {
394 display "Debug output"
397 This component controls whether there is diagnostic output
398 for stack operations. Options within this component allow
399 even more verbose output for certain areas."
401 cdl_option CYGDBG_NET_DHCP_CHATTER {
402 display "Extra debug output for DHCP"
407 cdl_option CYGDBG_NET_TIMING_STATS {
408 display "Network timing statistics"
411 This component controls whether there is diagnostic
412 information about how long memcpy, malloc, mbuf_alloc
413 etc take to perform."
416 cdl_option CYGDBG_NET_SHOW_MBUFS {
417 display "Network MBUF diagnostics"
420 This option controls whether diagnostic
421 information about the state of all mbufs is collected.
422 This information will be displayed whenever the network
423 stack runs out of mbufs."
426 cdl_component CYGPKG_NET_OPTIONS {
427 display "Networking support build options"
431 cdl_option CYGPKG_NET_CFLAGS_ADD {
432 display "Additional compiler flags"
435 default_value { "-D_KERNEL -D__ECOS -D__INSIDE_NET" }
437 This option modifies the set of compiler flags for
438 building the networking package.
439 These flags are used in addition
440 to the set of global flags."
443 cdl_option CYGPKG_NET_CFLAGS_REMOVE {
444 display "Suppressed compiler flags"
449 This option modifies the set of compiler flags for
450 building the networking package. These flags are removed from
451 the set of global flags if present."
455 cdl_component CYGPKG_NET_BUILD_TESTS {
456 display "Testing options"
460 This component contains options related to testing the network
463 cdl_option CYGPKG_NET_BUILD_HW_TESTS {
464 display "Build hardware networking tests (demo programs)"
467 requires { CYGHWR_NET_DRIVER_ETH0_SETUP || CYGHWR_NET_DRIVER_ETH1_SETUP }
470 This option enables the building of additional network tests
471 that use real ethernet devices. At this time these are just
472 demos. With this option disabled, only loopback
473 interface tests will be built."
476 cdl_option CYGPKG_NET_TESTS {
477 display "Networking tests"
480 calculated { CYGPKG_NET_BUILD_HW_TESTS ? \
485 tests/nc_test_slave \
486 tests/tftp_client_test \
487 tests/tftp_server_test \
489 tests/set_mac_address \
498 tests/multi_lo_select \
499 tests/tcp_lo_select \
502 "tests/ping_lo_test \
505 tests/multi_lo_select \
509 This option specifies the set of tests
510 for the networking package."
513 cdl_option CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS {
514 display "Use real-time response test harness (if available)"
517 Platform and/or ethernet device driver packages may
518 provide a test harness to verify that interrupts are
519 not disabled or flooded for too long during a test. If
520 such is provided, CYGTST_DEVS_ETH_TEST_NET_REALTIME is
521 defined and can be #include'd to acquire the support.
522 Some tests in the TCP/IP stack can use this harness;
523 this option controls whether they do. The StrongARM
524 EBSA285 Ethernet device driver is one package that
525 provides such a harness. See the file
526 tests/test_net_realtime.h in there for details."
530 # Description and control over different interfaces
532 cdl_interface CYGHWR_NET_DRIVER_ETH0 {
533 display "Does the hardware provide an 'eth0' device?"
534 requires { CYGHWR_NET_DRIVER_ETH0 <= 1 }
538 cdl_component CYGHWR_NET_DRIVER_ETH0_SETUP_OPTIONS {
539 display "Initialization options for 'eth0'"
540 active_if (CYGHWR_NET_DRIVER_ETH0 == 1)
544 cdl_interface CYGHWR_NET_DRIVER_ETH0_SETUP {
545 display "Initialization options for 'eth0'"
546 requires 1 == CYGHWR_NET_DRIVER_ETH0_SETUP
550 cdl_component CYGHWR_NET_DRIVER_ETH0_MANUAL {
551 display "Initialize 'eth0' manually?"
553 implements CYGHWR_NET_DRIVER_ETH0_SETUP
555 If this option is selected, the eCos library provides no
556 initialization code for this interface; you must perform
557 all the initialization in the application, by means of
558 appropriate ioctl() calls, or by calling init_net() with an
559 appropriate bootp record you have constructed yourself."
562 cdl_component CYGHWR_NET_DRIVER_ETH0_BOOTP {
563 display "Use BOOTP/DHCP to initialize 'eth0'?"
565 implements CYGHWR_NET_DRIVER_ETH0_SETUP
567 If this option is selected, init_all_network_interfaces()
568 will use DHCP or BOOTP to acquire initialization data for
569 this interface, and then set it up accordingly."
571 cdl_option CYGHWR_NET_DRIVER_ETH0_DHCP {
572 display "Use DHCP rather than BOOTP for 'eth0'?"
575 active_if CYGPKG_NET_DHCP
578 cdl_option CYGHWR_NET_DRIVER_ETH0_BOOTP_SHOW {
579 display "Show BOOTP/DHCP initialization values?"
585 cdl_option CYGHWR_NET_DRIVER_ETH0_IPV6_PREFIX {
586 display "Static IPv6 address prefix for 'eth0'"
588 active_if CYGPKG_NET_INET6
589 default_value { "3ffe:302:11:2" }
591 This option allows a specific, static address prefix to be set
592 for an interface running IPv6. When used, the lower 64 bits
593 of the address will be set to the IPv4 IP address. Note: this
594 should not be confused with the standard IPv4->IPv6 mapped
595 addresses, but rather just a simple way to assign addresses
596 to nodes within an IPv6 network."
599 cdl_component CYGHWR_NET_DRIVER_ETH0_ADDRS {
600 display "Address setups for 'eth0'"
601 implements CYGHWR_NET_DRIVER_ETH0_SETUP
605 These options let you configure all the initialization data
606 that init_all_network_interfaces() will use
607 for 'eth0' statically. Be careful when doing this, because
608 if you run the same application image on multiple boards,
609 they will have identical IP addresses and so on; this is a
611 The values you set are inserted in a bootp-style record
612 that is fed into a common setup routine to configure the
613 interface. That routine does not in fact use the 'Server
615 The bootp record is also available to application code, and
616 some eCos networking test programs use the 'Server IP
617 address' field to mean 'a machine we can interact with' for
618 example to ping or perform ftp with. That is the rationale
619 for its inclusion here.
620 The gateway address is used to set up a default route if
621 nonzero. If you have more than one interface, setting up
622 more than one default route is will cause malfunctions. A
623 gateway address of 0.0.0.0 can be set to prevent that route
624 setup. Of course, your application can add real routes
625 once the interface(s) initialization is complete."
627 cdl_option CYGHWR_NET_DRIVER_ETH0_ADDRS_IP {
628 display "IP address for 'eth0'"
630 default_value { "192.168.1.2" }
633 cdl_option CYGHWR_NET_DRIVER_ETH0_ADDRS_NETMASK {
634 display "Network mask address for 'eth0'"
636 default_value { "255.255.255.0" }
639 cdl_option CYGHWR_NET_DRIVER_ETH0_ADDRS_BROADCAST {
640 display "Broadcast address for 'eth0'"
642 default_value { "192.168.1.255" }
645 cdl_option CYGHWR_NET_DRIVER_ETH0_ADDRS_GATEWAY {
646 display "Gateway/router IP address for 'eth0'"
648 default_value { "192.168.1.1" }
651 cdl_option CYGHWR_NET_DRIVER_ETH0_ADDRS_SERVER {
652 display "Server IP address for 'eth0'"
654 default_value { "192.168.1.101" }
659 cdl_interface CYGHWR_NET_DRIVER_ETH1 {
660 display "Does the hardware provide an 'eth1' device?"
661 requires { CYGHWR_NET_DRIVER_ETH1 <= 1 }
665 cdl_component CYGHWR_NET_DRIVER_ETH1_SETUP_OPTIONS {
666 display "Initialization options for 'eth1'"
667 active_if (CYGHWR_NET_DRIVER_ETH1 == 1)
671 cdl_interface CYGHWR_NET_DRIVER_ETH1_SETUP {
672 display "Initialization options for 'eth1'"
673 requires 1 == CYGHWR_NET_DRIVER_ETH1_SETUP
677 cdl_component CYGHWR_NET_DRIVER_ETH1_MANUAL {
678 display "Initialize 'eth1' manually?"
680 implements CYGHWR_NET_DRIVER_ETH1_SETUP
682 If this option is selected, the eCos library provides no
683 initialization code for this interface; you must perform
684 all the initialization in the application, by means of
685 appropriate ioctl() calls, or by calling init_net() with an
686 appropriate bootp record you have constructed yourself."
689 cdl_component CYGHWR_NET_DRIVER_ETH1_BOOTP {
690 display "Use BOOTP/DHCP to initialize 'eth1'?"
692 implements CYGHWR_NET_DRIVER_ETH1_SETUP
694 If this option is selected, init_all_network_interfaces()
695 will use DHCP or BOOTP to acquire initialization data for
696 this interface, and then set it up accordingly."
698 cdl_option CYGHWR_NET_DRIVER_ETH1_DHCP {
699 display "Use DHCP rather than BOOTP for 'eth1'?"
702 active_if CYGPKG_NET_DHCP
705 cdl_option CYGHWR_NET_DRIVER_ETH1_BOOTP_SHOW {
706 display "Show BOOTP/DHCP initialization values?"
712 cdl_option CYGHWR_NET_DRIVER_ETH1_IPV6_PREFIX {
713 display "Static IPv6 address prefix for 'eth1'"
715 active_if CYGPKG_NET_INET6
716 default_value { "3ffe:302:12:2" }
718 This option allows a specific, static address prefix to be set
719 for an interface running IPv6. When used, the lower 64 bits
720 of the address will be set to the IPv4 IP address. Note: this
721 should not be confused with the standard IPv4->IPv6 mapped
722 addresses, but rather just a simple way to assign addresses
723 to nodes within an IPv6 network."
726 cdl_component CYGHWR_NET_DRIVER_ETH1_ADDRS {
727 display "Address setups for 'eth1'"
728 implements CYGHWR_NET_DRIVER_ETH1_SETUP
732 These options let you configure all the initialization data
733 that init_all_network_interfaces() will use
734 for 'eth1' statically. Be careful when doing this, because
735 if you run the same application image on multiple boards,
736 they will have identical IP addresses and so on; this is a
738 The values you set are inserted in a bootp-style record
739 that is fed into a common setup routine to configure the
740 interface. That routine does not in fact use the 'Server
742 The bootp record is also available to application code, and
743 some eCos networking test programs use the 'Server IP
744 address' field to mean 'a machine we can interact with' for
745 example to ping or perform ftp with. That is the rationale
746 for its inclusion here.
747 The gateway address is used to set up a default route if
748 nonzero. If you have more than one interface, setting up
749 more than one default route is will cause malfunctions. A
750 gateway address of 0.0.0.0 can be set to prevent that route
751 setup. Of course, your application can add real routes
752 once the interface(s) initialization is complete.
753 This interface 'eth1' has no route set up in the default
756 cdl_option CYGHWR_NET_DRIVER_ETH1_ADDRS_IP {
757 display "IP address for 'eth1'"
759 default_value { "192.168.1.2" }
762 cdl_option CYGHWR_NET_DRIVER_ETH1_ADDRS_NETMASK {
763 display "Network mask address for 'eth1'"
765 default_value { "255.255.255.0" }
768 cdl_option CYGHWR_NET_DRIVER_ETH1_ADDRS_BROADCAST {
769 display "Broadcast address for 'eth1'"
771 default_value { "192.168.1.255" }
774 cdl_option CYGHWR_NET_DRIVER_ETH1_ADDRS_GATEWAY {
775 display "Gateway/router IP address for 'eth1'"
777 default_value { "0.0.0.0" }
780 cdl_option CYGHWR_NET_DRIVER_ETH1_ADDRS_SERVER {
781 display "Server IP address for 'eth1'"
783 default_value { "192.168.1.101" }