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_component CYGPKG_NET_TFTPD_CLIENT_BIG_PACKET {
171 display "Extension to allow negotiation of big packets"
172 requires CYGINT_ISO_STDIO_FORMATTED_IO
176 Implements RFC 2348, an optional extension
177 to the TFTP protocol to allow the client and
178 server to negotiate to use bigger
179 packets. This can make upload/download
182 cdl_option CYGPKG_NET_TFTPD_CLIENT_BIG_PACKET_SIZE {
183 display "Packet size to negotiate"
186 legal_values 512 to 65464
188 Size of the packets to negotiate. In an error
189 free environment, bigger packets will result
190 in faster transfers."
195 cdl_option CYGPKG_NET_TFTPD_THREAD_STACK_SIZE {
196 display "Stack size for TFTP threads."
198 default_value { "(CYGNUM_HAL_STACK_SIZE_TYPICAL+(3*(SEGSIZE+4)))" }
200 This option controls the size of the stack used for the
201 TFTP server. The default should be sufficient for most cases
202 but some applications my require bigger stacks when the
203 implementation of file operations are complex."
206 cdl_component CYGSEM_NET_TFTPD_MULTITHREADED {
207 display "Multiple TFTPD server threads on the same port."
211 This option controls the tftp server ability to be
212 multi-threaded. When enabled, multiple server can be
213 started on the same port number. This allows multiple
214 concurrent transfers to be active. When this option is
215 not enabled, while one transfer is active, other
216 requests will be delayed or even ignored."
218 cdl_option CYGNUM_NET_TFTPD_MULTITHREADED_PORTS {
219 display "Number of different ports with servers"
223 Each set of servers running on the same port number
224 require a semaphore to synchronise there operation. This option
225 controls the number of semaphores and so the number
226 of port numbers multithreaded servers which can be
231 cdl_option CYGPKG_NET_TFTP_FILE_ACCESS {
232 display "File I/O functions for TFTP server"
235 compile tftp_dummy_file.c
237 Minimal in-memory file I/O support for TFTP server."
241 cdl_component CYGPKG_NET_DHCP {
242 display "Use full DHCP instead of BOOTP"
243 requires CYGPKG_NET_INET
244 active_if (CYGHWR_NET_DRIVERS > 0)
248 Provide DHCP for initializing the IP address
249 of network interfaces. The DHCP client is capable of falling
250 back to BOOTP usage if the server does not support DHCP, so it
251 should never be necessary to disable this option. However,
252 depending on other configuration the DHCP client may provide or
253 require a kernel thread of its own; this consumes quite a lot
254 of resource which a BOOTP solution does not require."
256 cdl_option CYGOPT_NET_DHCP_DHCP_THREAD {
257 display "DHCP management thread"
261 Provide a separate thread to renew DHCP leases; otherwise
262 the application MUST periodically examine the semaphore
263 dhcp_needs_attention and call dhcp_bind() if it is
264 signalled. If enabled, this thread does all that for you.
265 Independent of this option, initialization of the
266 interfaces still occurs in init_all_network_interfaces()
267 and your startup code must call that. It will start the
268 DHCP management thread if necessary. If a lease fails to
269 be renewed, the management thread will shut down all
270 interfaces and attempt to initialize all the interfaces
271 again from scratch. This may cause application problems,
272 in which case managing the DHCP state in an application
273 aware thread is recommended. See comments in dhcp.h"
276 cdl_option CYGOPT_NET_DHCP_DHCP_THREAD_PARAM {
277 display "DHCP management thread loops forever"
280 active_if CYGOPT_NET_DHCP_DHCP_THREAD
282 If the parameter is nonzero, it loops forever; if zero,
283 the thread exits if a lease expires, and the application
284 must detect this and tidy up or reboot the whole machine."
287 cdl_option CYGPKG_NET_DHCP_THREAD_PRIORITY {
288 display "DHCP management thread priority"
290 default_value CYGPKG_NET_THREAD_PRIORITY + 1
291 active_if CYGOPT_NET_DHCP_DHCP_THREAD
293 This option sets the thread priority level used by the DHCP
294 management thread. It should be high enough that it can run
295 when necessary, but it does not need to be as high as the
296 network thread itself."
299 cdl_option CYGPKG_NET_DHCP_THREAD_STACK_SIZE {
300 display "Stack size for DHCP management threads."
302 default_value { "(CYGNUM_HAL_STACK_SIZE_TYPICAL+sizeof(struct bootp))" }
304 This option controls the size of the stack used for the
305 DHCP mamagement thread. The default should be
306 sufficient for most cases but some applications my
307 require bigger stacks when using for example diag_printf."
310 cdl_option CYGOPT_NET_DHCP_PARM_REQ_LIST_REPLACE {
311 display "Replace DHCP request options"
314 active_if CYGOPT_NET_DHCP_DHCP_THREAD
316 This option replaces the default list of requested
317 options in the DHCP/BOOTP request list. These are a
318 comma separated list of TAG_xxx values."
321 cdl_option CYGOPT_NET_DHCP_PARM_REQ_LIST_ADDITIONAL {
322 display "Additional DHCP request options"
325 active_if CYGOPT_NET_DHCP_DHCP_THREAD
327 This option adds additional options to the list of
328 requested options in the DHCP/BOOTP request list.
329 These are a comma separated list of TAG_xxx values."
332 cdl_component CYGOPT_NET_DHCP_OPTION_HOST_NAME {
333 display "DHCP host name option"
336 active_if CYGOPT_NET_DHCP_DHCP_THREAD
338 This option adds the TAG_HOST_NAME option to the DHCP/BOOTP
339 requests. The host name is defined by calling the function
340 dhcp_set_hostname(), prior to calling init_all_network_interfaces()."
342 cdl_option CYGNUM_NET_DHCP_OPTION_HOST_NAME_LEN {
343 display "DHCP host name maximum length"
346 legal_values 0 to 255
347 active_if CYGOPT_NET_DHCP_OPTION_HOST_NAME
349 This option defines the maximum length allowed for the
350 host name set by dhcp_set_hostname()."
354 cdl_option CYGOPT_NET_DHCP_OPTION_DHCP_CLIENTID_MAC {
355 display "DHCP client ID option"
358 active_if CYGOPT_NET_DHCP_DHCP_THREAD
360 This option adds the TAG_DHCP_CLIENTID option to the DHCP/BOOTP
361 requests. It uses the interface MAC address for the identifier."
364 cdl_option CYGNUM_NET_DHCP_MIN_RETRY_TIME {
365 display "DHCP minimum retry time"
367 legal_values 0 to 100
370 This option allows the application to specify the
371 minimum number of seconds for DHCP discovery. If DHCP
372 discovery fails, the action to be taken is application
373 specific. Multiple discovery attempts are made during
374 the time specified with each subsequent attempt having
375 a longer timeout. Attempts begin at approximately 1, 5,
376 15, 35, and 65 seconds with the last attempt timing out
377 after the total of 125 seconds. A new attempt will not
378 begin if the minimum time has been reached. Although,
379 an attempt in progress will run past the minimum time
380 specified. For example: Specifying 30 seconds would
381 timeout at 35 seconds. Specifying 70 seconds has the
382 same effect as specifying 100 seconds where it would
383 run for the total of 125 seconds."
387 cdl_component CYGPKG_NET_IPV6_ROUTING {
388 display "Options controlling IPv6 routing"
389 active_if CYGPKG_NET_INET6
393 Various options which control how routing is done for the
394 IPv6 enabled interfaces."
396 cdl_component CYGOPT_NET_IPV6_ROUTING_THREAD {
397 display "Thread for IPv6 routing"
398 requires CYGPKG_POSIX
402 Provide a separate thread to send router solicitation
405 compile ipv6_routing_thread.c
407 cdl_option CYGINT_NET_IPV6_ROUTING_THREAD_PRIORITY {
408 display "IPv6 routing thread priority"
410 default_value CYGPKG_NET_THREAD_PRIORITY + 1
412 This option sets the thread priority level used by the IPv6
413 routing thread. It should be high enough that it can run
414 when necessary, but it does not need to be as high as the
415 network thread itself."
418 cdl_option CYGINT_NET_IPV6_ROUTING_THREAD_PERIOD {
419 display "IPv6 routing thread rate"
423 This option sets the rate at which router solicitations will
424 be sent out by the routing thread (in seconds)."
429 cdl_component CYGPKG_NET_DEBUG {
430 display "Debug output"
433 This component controls whether there is diagnostic output
434 for stack operations. Options within this component allow
435 even more verbose output for certain areas."
437 cdl_option CYGDBG_NET_DHCP_CHATTER {
438 display "Extra debug output for DHCP"
443 cdl_option CYGDBG_NET_TIMING_STATS {
444 display "Network timing statistics"
447 This component controls whether there is diagnostic
448 information about how long memcpy, malloc, mbuf_alloc
449 etc take to perform."
452 cdl_option CYGDBG_NET_SHOW_MBUFS {
453 display "Network MBUF diagnostics"
456 This option controls whether diagnostic
457 information about the state of all mbufs is collected.
458 This information will be displayed whenever the network
459 stack runs out of mbufs."
462 cdl_component CYGPKG_NET_OPTIONS {
463 display "Networking support build options"
467 cdl_option CYGPKG_NET_CFLAGS_ADD {
468 display "Additional compiler flags"
471 default_value { "-D_KERNEL -D__ECOS -D__INSIDE_NET" }
473 This option modifies the set of compiler flags for
474 building the networking package.
475 These flags are used in addition
476 to the set of global flags."
479 cdl_option CYGPKG_NET_CFLAGS_REMOVE {
480 display "Suppressed compiler flags"
485 This option modifies the set of compiler flags for
486 building the networking package. These flags are removed from
487 the set of global flags if present."
491 cdl_component CYGPKG_NET_BUILD_TESTS {
492 display "Testing options"
496 This component contains options related to testing the network
499 cdl_option CYGPKG_NET_BUILD_HW_TESTS {
500 display "Build hardware networking tests (demo programs)"
503 requires { CYGHWR_NET_DRIVER_ETH0_SETUP || CYGHWR_NET_DRIVER_ETH1_SETUP }
506 This option enables the building of additional network tests
507 that use real ethernet devices. At this time these are just
508 demos. With this option disabled, only loopback
509 interface tests will be built."
512 cdl_option CYGPKG_NET_TESTS {
513 display "Networking tests"
516 calculated { CYGPKG_NET_BUILD_HW_TESTS ? \
521 tests/nc_test_slave \
522 tests/tftp_client_test \
523 tests/tftp_server_test \
525 tests/set_mac_address \
534 tests/multi_lo_select \
535 tests/tcp_lo_select \
538 "tests/ping_lo_test \
541 tests/multi_lo_select \
545 This option specifies the set of tests
546 for the networking package."
549 cdl_option CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS {
550 display "Use real-time response test harness (if available)"
553 Platform and/or ethernet device driver packages may
554 provide a test harness to verify that interrupts are
555 not disabled or flooded for too long during a test. If
556 such is provided, CYGTST_DEVS_ETH_TEST_NET_REALTIME is
557 defined and can be #include'd to acquire the support.
558 Some tests in the TCP/IP stack can use this harness;
559 this option controls whether they do. The StrongARM
560 EBSA285 Ethernet device driver is one package that
561 provides such a harness. See the file
562 tests/test_net_realtime.h in there for details."
566 # Description and control over different interfaces
568 cdl_interface CYGHWR_NET_DRIVER_ETH0 {
569 display "Does the hardware provide an 'eth0' device?"
570 requires { CYGHWR_NET_DRIVER_ETH0 <= 1 }
574 cdl_component CYGHWR_NET_DRIVER_ETH0_SETUP_OPTIONS {
575 display "Initialization options for 'eth0'"
576 active_if (CYGHWR_NET_DRIVER_ETH0 == 1)
580 cdl_interface CYGHWR_NET_DRIVER_ETH0_SETUP {
581 display "Initialization options for 'eth0'"
582 requires 1 == CYGHWR_NET_DRIVER_ETH0_SETUP
586 cdl_component CYGHWR_NET_DRIVER_ETH0_MANUAL {
587 display "Initialize 'eth0' manually?"
589 implements CYGHWR_NET_DRIVER_ETH0_SETUP
591 If this option is selected, the eCos library provides no
592 initialization code for this interface; you must perform
593 all the initialization in the application, by means of
594 appropriate ioctl() calls, or by calling init_net() with an
595 appropriate bootp record you have constructed yourself."
598 cdl_component CYGHWR_NET_DRIVER_ETH0_BOOTP {
599 display "Use BOOTP/DHCP to initialize 'eth0'?"
601 implements CYGHWR_NET_DRIVER_ETH0_SETUP
603 If this option is selected, init_all_network_interfaces()
604 will use DHCP or BOOTP to acquire initialization data for
605 this interface, and then set it up accordingly."
607 cdl_option CYGHWR_NET_DRIVER_ETH0_DHCP {
608 display "Use DHCP rather than BOOTP for 'eth0'?"
611 active_if CYGPKG_NET_DHCP
614 cdl_option CYGHWR_NET_DRIVER_ETH0_BOOTP_SHOW {
615 display "Show BOOTP/DHCP initialization values?"
621 cdl_option CYGHWR_NET_DRIVER_ETH0_IPV6_PREFIX {
622 display "Static IPv6 address prefix for 'eth0'"
624 active_if CYGPKG_NET_INET6
625 default_value { "3ffe:302:11:2" }
627 This option allows a specific, static address prefix to be set
628 for an interface running IPv6. When used, the lower 64 bits
629 of the address will be set to the IPv4 IP address. Note: this
630 should not be confused with the standard IPv4->IPv6 mapped
631 addresses, but rather just a simple way to assign addresses
632 to nodes within an IPv6 network."
635 cdl_component CYGHWR_NET_DRIVER_ETH0_ADDRS {
636 display "Address setups for 'eth0'"
637 implements CYGHWR_NET_DRIVER_ETH0_SETUP
641 These options let you configure all the initialization data
642 that init_all_network_interfaces() will use
643 for 'eth0' statically. Be careful when doing this, because
644 if you run the same application image on multiple boards,
645 they will have identical IP addresses and so on; this is a
647 The values you set are inserted in a bootp-style record
648 that is fed into a common setup routine to configure the
649 interface. That routine does not in fact use the 'Server
651 The bootp record is also available to application code, and
652 some eCos networking test programs use the 'Server IP
653 address' field to mean 'a machine we can interact with' for
654 example to ping or perform ftp with. That is the rationale
655 for its inclusion here.
656 The gateway address is used to set up a default route if
657 nonzero. If you have more than one interface, setting up
658 more than one default route is will cause malfunctions. A
659 gateway address of 0.0.0.0 can be set to prevent that route
660 setup. Of course, your application can add real routes
661 once the interface(s) initialization is complete."
663 cdl_option CYGHWR_NET_DRIVER_ETH0_ADDRS_IP {
664 display "IP address for 'eth0'"
666 default_value { "192.168.1.2" }
669 cdl_option CYGHWR_NET_DRIVER_ETH0_ADDRS_NETMASK {
670 display "Network mask address for 'eth0'"
672 default_value { "255.255.255.0" }
675 cdl_option CYGHWR_NET_DRIVER_ETH0_ADDRS_BROADCAST {
676 display "Broadcast address for 'eth0'"
678 default_value { "192.168.1.255" }
681 cdl_option CYGHWR_NET_DRIVER_ETH0_ADDRS_GATEWAY {
682 display "Gateway/router IP address for 'eth0'"
684 default_value { "192.168.1.1" }
687 cdl_option CYGHWR_NET_DRIVER_ETH0_ADDRS_SERVER {
688 display "Server IP address for 'eth0'"
690 default_value { "192.168.1.101" }
695 cdl_interface CYGHWR_NET_DRIVER_ETH1 {
696 display "Does the hardware provide an 'eth1' device?"
697 requires { CYGHWR_NET_DRIVER_ETH1 <= 1 }
701 cdl_component CYGHWR_NET_DRIVER_ETH1_SETUP_OPTIONS {
702 display "Initialization options for 'eth1'"
703 active_if (CYGHWR_NET_DRIVER_ETH1 == 1)
707 cdl_interface CYGHWR_NET_DRIVER_ETH1_SETUP {
708 display "Initialization options for 'eth1'"
709 requires 1 == CYGHWR_NET_DRIVER_ETH1_SETUP
713 cdl_component CYGHWR_NET_DRIVER_ETH1_MANUAL {
714 display "Initialize 'eth1' manually?"
716 implements CYGHWR_NET_DRIVER_ETH1_SETUP
718 If this option is selected, the eCos library provides no
719 initialization code for this interface; you must perform
720 all the initialization in the application, by means of
721 appropriate ioctl() calls, or by calling init_net() with an
722 appropriate bootp record you have constructed yourself."
725 cdl_component CYGHWR_NET_DRIVER_ETH1_BOOTP {
726 display "Use BOOTP/DHCP to initialize 'eth1'?"
728 implements CYGHWR_NET_DRIVER_ETH1_SETUP
730 If this option is selected, init_all_network_interfaces()
731 will use DHCP or BOOTP to acquire initialization data for
732 this interface, and then set it up accordingly."
734 cdl_option CYGHWR_NET_DRIVER_ETH1_DHCP {
735 display "Use DHCP rather than BOOTP for 'eth1'?"
738 active_if CYGPKG_NET_DHCP
741 cdl_option CYGHWR_NET_DRIVER_ETH1_BOOTP_SHOW {
742 display "Show BOOTP/DHCP initialization values?"
748 cdl_option CYGHWR_NET_DRIVER_ETH1_IPV6_PREFIX {
749 display "Static IPv6 address prefix for 'eth1'"
751 active_if CYGPKG_NET_INET6
752 default_value { "3ffe:302:12:2" }
754 This option allows a specific, static address prefix to be set
755 for an interface running IPv6. When used, the lower 64 bits
756 of the address will be set to the IPv4 IP address. Note: this
757 should not be confused with the standard IPv4->IPv6 mapped
758 addresses, but rather just a simple way to assign addresses
759 to nodes within an IPv6 network."
762 cdl_component CYGHWR_NET_DRIVER_ETH1_ADDRS {
763 display "Address setups for 'eth1'"
764 implements CYGHWR_NET_DRIVER_ETH1_SETUP
768 These options let you configure all the initialization data
769 that init_all_network_interfaces() will use
770 for 'eth1' statically. Be careful when doing this, because
771 if you run the same application image on multiple boards,
772 they will have identical IP addresses and so on; this is a
774 The values you set are inserted in a bootp-style record
775 that is fed into a common setup routine to configure the
776 interface. That routine does not in fact use the 'Server
778 The bootp record is also available to application code, and
779 some eCos networking test programs use the 'Server IP
780 address' field to mean 'a machine we can interact with' for
781 example to ping or perform ftp with. That is the rationale
782 for its inclusion here.
783 The gateway address is used to set up a default route if
784 nonzero. If you have more than one interface, setting up
785 more than one default route is will cause malfunctions. A
786 gateway address of 0.0.0.0 can be set to prevent that route
787 setup. Of course, your application can add real routes
788 once the interface(s) initialization is complete.
789 This interface 'eth1' has no route set up in the default
792 cdl_option CYGHWR_NET_DRIVER_ETH1_ADDRS_IP {
793 display "IP address for 'eth1'"
795 default_value { "192.168.1.2" }
798 cdl_option CYGHWR_NET_DRIVER_ETH1_ADDRS_NETMASK {
799 display "Network mask address for 'eth1'"
801 default_value { "255.255.255.0" }
804 cdl_option CYGHWR_NET_DRIVER_ETH1_ADDRS_BROADCAST {
805 display "Broadcast address for 'eth1'"
807 default_value { "192.168.1.255" }
810 cdl_option CYGHWR_NET_DRIVER_ETH1_ADDRS_GATEWAY {
811 display "Gateway/router IP address for 'eth1'"
813 default_value { "0.0.0.0" }
816 cdl_option CYGHWR_NET_DRIVER_ETH1_ADDRS_SERVER {
817 display "Server IP address for 'eth1'"
819 default_value { "192.168.1.101" }