...
Most of the #defines
should be configured with the default configuration values. A handful of values may likely never change because there is currently only one configuration choice available. This leaves approximately a dozen values that should be configured with values that may deviate from the default configuration.
...
µC/TCP-IP contains code that can use sub-modules such as DNS client to perform some specific operation and extend the functionalities of some particular API.
Panel |
---|
borderWidth | 0 |
---|
title | Table - Compile Feature Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_EXT_MODULE_CFG_DNS_EN | Select portions of µC/TCP-IP code may call µC/DNSc API to resolve remote hostname. If µC/DNSc files/functions are included in the µC/TCP-IP build set NET_EXT_MODULE_CFG_DNS_EN to DEF_ENABLED . Set to DEF_DISABLED otherwise. | DEF_ENABLED or DEF_DISABLED |
|
Anchor |
---|
| Task Queue Configuration |
---|
| Task Queue Configuration |
---|
|
Task Queue Configuration
The µC/TCP-IP stack has two queues that need to be configured. The first one is the Rx queue and is used to store the Rx buffer that have been filled and are ready to be process. The second queue is the Tx deallocation and is used to store the Tx buffers that are ready to be deallocate.
Panel |
---|
borderWidth | 0 |
---|
title | Table - Task Queue Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_CFG_IF_RX_Q_SIZE | Should be configured such that it reflects the total number of receive buffer minus the number of receive descriptor on all physical interfaces. If DMA is not available, or a combination of DMA and I/O based interfaces are configured then this number reflects the maximum number of packets that can be acknowledged and signaled during a single receive interrupt event for all interfaces. | Depends on the device configuration (see net_dev_cfg.c) | NET_CFG_IF_TX_DEALLOC_Q_SIZE | Should be defined to be the total number of small and large transmit buffers declared for all interfaces. | Depends on the device configuration (see net_dev_cfg.c) |
|
Anchor |
---|
| Compile Features Configuration |
---|
| Compile Features Configuration |
---|
|
Compile Features Configuration
Panel |
---|
borderWidth | 0 |
---|
title | Table - Compile Feature Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_CFG_OPTIMIZE_ASM_EN | Select portions of µC/TCP-IP code may call optimized assembly functions by configuring NET_CFG_OPTIMIZE_ASM_EN to DEF_ENABLED. If optimized assembly files/functions are included in the µC/TCP-IP build set NET_CFG_OPTIMIZE_ASM_EN to DEF_NEABLED . Set to DEF_DISABLED otherwise. | DEF_ENABLED or DEF_DISABLED |
|
Anchor |
---|
| Debug Features Configuration |
---|
| Debug Features Configuration |
---|
|
Debug Features Configuration
Panel |
---|
borderWidth | 0 |
---|
title | Debug Feature Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_DBG_CFG_MEM_CLR_EN | Is used to clear internal network data structures when allocated or de-allocated. By clearing, all bytes in internal data structures are set to ‘0’ or to default initialization values. This configuration is typically set it to DEF_DISABLED unless the contents of the internal network data structures need to be examined for debugging purposes. Having the internal network data structures cleared generally helps to differentiate between “proper” data and “pollution”. | DEF_ENABLED or DEF_DISABLED |
|
Anchor |
---|
| Argument Check Configuration |
---|
| Argument Check Configuration |
---|
|
Argument Check Configuration
Most functions in µC/TCP-IP include code to validate arguments that are passed to it. Specifically, µC/TCP-IP checks to see if passed pointers are NULL
, if arguments are within valid ranges, etc. The following constants configure additional argument checking.
Panel |
---|
borderWidth | 0 |
---|
title | Argument Check Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_ERR_CFG_ARG_CHK_EXT_EN | Allows code generated to check arguments for functions that can be called by the user and, for functions which are internal but receive arguments from an API that the user can call. Also, enabling this check verifies that µC/TCP-IP is initialized before API tasks and functions perform the desired function. | DEF_ENABLED or DEF_DISABLED | NET_ERR_CFG_ARG_CHK_DBG_EN | Allows code to be generated which checks to make sure that pointers passed to functions are not NULL, and that arguments are within range, etc. | DEF_ENABLED or DEF_DISABLED |
|
Anchor |
---|
| Counters Configuration |
---|
| Counters Configuration |
---|
|
Counters Configuration
µC/TCP-IP contains code that increments counters to keep track of statistics such as the number of packets received, the number of packets transmitted, etc. Also, µC/TCP-IP contains counters that are incremented when error conditions are detected.
Panel |
---|
borderWidth | 0 |
---|
title | Counter Management Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_CTR_CFG_STAT_EN | Determines whether the code and data space used to keep track of statistics will be included. | DEF_ENABLED or DEF_DISABLED | NET_CTR_CFG_ERR_EN | Determines whether the code and data space used to keep track of errors will be included. | DEF_ENABLED or DEF_DISABLED |
|
Anchor |
---|
| Timer Configuration |
---|
| Timer Configuration |
---|
|
Timer Configuration
µC/TCP-IP manages software timers used to keep track of timeouts and execute callback functions when needed.
Panel |
---|
borderWidth | 0 |
---|
title | Timer Management Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_TMR_CFG_NBR_TMR | Determines the number of timers that µC/TCP-IP will be managing. Number of timer to configure depends on the network application. It is recommended to set a large number of timer and look at the counter NetTmr_PoolStat to see the maximum number of timer needed and make sure that we never run out of free buffer by looking at the error counter Net_ErrCtrs.Tmr.NoneAvailCtr. | Depends on TCPIP stack configuration. | NET_TMR_CFG_TASK_FREQ | Determines how often (in Hz) network timers are to be updated. This value must not be configured as a floating-point number. | Typically set to 10 Hz |
|
Anchor |
---|
| Network Interfaces Configuration |
---|
| Network Interfaces Configuration |
---|
|
Network
Interfaces Configuration Panel |
---|
borderWidth | 0 |
---|
title | Interfaces Configuration Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_IF_CFG_MAX_NBR_IF | Determines the maximum number of network interfaces that µC/TCP-IP may create at run-time. | 1u if a single network interface is present. | NET_IF_CFG_LOOPBACK_EN | Determines whether the code and data space used to support the loopback interface for internal-only communication only will be included. | DEF_ENABLED or DEF_DISABLED | NET_IF_CFG_ETHER_EN | Determines whether the code and data space used to support Ethernet interfaces and devices will be included. | DEF_ENABLED or DEF_DISABLED | NET_IF_CFG_WIFI_EN | Determines whether the code and data space used to support wireless interfaces and devices will be included. | DEF_ENABLED or DEF_DISABLED | NET_IF_CFG_TX_SUSPEND_TIMEOUT_MS | Configures the network interface transmit suspend timeout value. The value is specified in integer milliseconds. | 1u |
|
Anchor |
---|
| Address Resolution Protocol (ARP) Configuration |
---|
| Address Resolution Protocol (ARP) Configuration |
---|
|
Address Resolution Protocol (ARP) Configuration
ARP is only used when the IPv4 stack is enabled.
Panel |
---|
borderWidth | 0 |
---|
title | ARP Configuration Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_ARP_CFG_CACHE_NBR | Configures the number of ARP cache entries. | 3u |
|
ARP caches the mapping of IPv4 addresses to physical (i.e., MAC) addresses. NET_ARP_CFG_NBR_CACHE
configures the number of ARP cache entries. Each cache entry requires approximately 18
bytes of RAM, plus seven pointers, plus a hardware address and protocol address (10
bytes assuming Ethernet interfaces and IPv4 addresses).
...
NDP is only used when the IPv6 stack is enabled.
Panel |
---|
borderWidth | 0 |
---|
title | NDP Configuration Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_NDP_CFG_CACHE_NBR | Configures the number of NDP Neighbor cache entries. | 6u | NET_NDP_CFG_DEST_NBR | Configures the number of NDP Destination cache entries. | 5u | NET_NDP_CFG_PREFIX_NBR | Configures the number of NDP Prefix entries. | 5u | NET_NDP_CFG_ROUTER_NBR | Configures the number of NDP Router entries. | 1u |
|
NDP caches the mapping of IPv6 addresses to physical (i.e., MAC) addresses. NET_NDP_CFG_NBR_CACHE
configures the number of NDP Neighbor cache entries. Each cache entry requires approximately 18
bytes of RAM, plus seven pointers, plus a hardware address and protocol address (22 bytes assuming Ethernet interfaces and IPv6 addresses).
NDP also caches recent IPv6 destination addresses by mapping next-hop address to final destination address. It allows the µC/TCP-IP stack not having to re-calculating the next-hop for each packet to send. NET_NDP_CFG_DEST_NBR
configured the numver number of NDP destination caches available for the TCPIP stack.
...
Anchor |
---|
| IPv4 Layer Configuration |
---|
| IPv4 Layer Configuration |
---|
|
IPv4 Layer Configuration
Panel |
---|
borderWidth | 0 |
---|
title | IPv4 Configuration Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_IPv4_CFG_EN | Enables the IPv4 module. | DEF_ENABLED or DEF_DISABLED | NET_IPv4_CFG_IF_MAX_NBR_ADDR | Determines the maximum number of IPv4 addresses that may be configured per network interface at run-time. | At least 1 |
|
Anchor |
---|
| IPv6 Layer Configuration |
---|
| IPv6 Layer Configuration |
---|
|
IPv6 Layer Configuration
Panel |
---|
borderWidth | 0 |
---|
title | IPv6 Layer Configuration |
---|
|
Constant | Description | Possible Values |
---|
NET_IPv6_CFG_EN | Enables the IPv6 module. | DEF_ENABLED or DEF_DISABLED | NET_IPv6_CFG_ADDR_AUTO_CFG_EN | Enables the IPv6 Staless Address Auto-Configuration module. | DEF_ENABLED or DEF_DISABLED | NET_IPv6_CFG_DAD_EN | Enables the Duplication Address Detection (DAD) module. | DEF_ENABLED or DEF_DISABLED | NET_IPv6_CFG_IF_MAX_NBR_ADDR | Determines the maximum number of IPv6 addresses that may be configured per network interface at run-time. | At least 2 |
|
Anchor |
---|
| Multicast Configuration |
---|
| Multicast Configuration |
---|
|
Multicast Configuration (IGMP and MLDP)
Panel |
---|
borderWidth | 0 |
---|
title | IGMP Configuration Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_MCAST_CFG_IPv4_RX_EN | Enables the multicast support in reception for IPv4. | DEF_ENABLED or DEF_DISABLED | NET_MCAST_CFG_IPv4_TX_EN | Enables the multicast support in transmittion for IPv4. | DEF_ENABLED or DEF_DISABLED | NET_MCAST_CFG_HOST_GRP_NBR_MAX | Configures the maximum number of IGMP host groups that may be joined at any one time. | 2u |
|
NET_IGMP_CFG_MAX_NBR_HOST_GRP
configures the maximum number of IGMP host groups that may be joined at any one time. Each group entry requires approximately 12
bytes of RAM, plus three pointers, plus a protocol address (4
bytes assuming IPv4 address).
...
µC/TCP-IP supports BSD 4.x sockets and basic socket API for the TCP/UDP/IP protocols.
Panel |
---|
borderWidth | 0 |
---|
title | Socket Configuration Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_SOCK_CFG_SOCK_NBR_TCP | Configures total number of TCP connections. | 5 | NET_SOCK_CFG_SOCK_NBR_UDP | Configures total number of UDP connections. | 2 | NET_SOCK_CFG_SEL_EN | Configures socket select functionality. | DEF_ENABLED or DEF_DISABLED | NET_SOCK_CFG_CONN_ACCEPT_Q_SIZE_MAX | Configures stream-type sockets' accept queue. | 2 | NET_SOCK_CFG_RX_Q_SIZE_OCTET | Configures socket receive queue buffer size. | 4096 | NET_SOCK_CFG_TX_Q_SIZE_OCTET | Configures socket transmit queue buffer size. | 4096 |
|
See Configuring window sizes for more information about how to configure receive and transmit queues buffer size.
Anchor |
---|
| BSD Socket Configuration |
---|
| BSD Socket Configuration |
---|
|
BSD Socket API Configuration Panel |
---|
borderWidth | 0 |
---|
title | BSD Socket Configuration Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_SOCK_DFLT_BSD_EN | Enable or Disable the inclusion of BSD API functions. | DEF_ENABLED or DEF_DISABLED |
|
By default, this setting is checked within the stack for having been defined. If it is not defined, by default it is defined as DEF_ENABLED. For developers to utilize this define from their application, this #define should be defined as DEF_DISABLED to remove them. The developer will also need to simply un-comment the line where it is defined.
Anchor |
---|
| TCP Layer Configuration |
---|
| TCP Layer Configuration |
---|
|
TCP Layer Configuration
Panel |
---|
borderWidth | 0 |
---|
title | TCP Configuration Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_TCP_CFG_EN | Enables the TCP module. | DEF_ENABLED or DEF_DISABLED |
|
Anchor |
---|
| UDP Layer Configuration |
---|
| UDP Layer Configuration |
---|
|
UDP Layer Configuration
Panel |
---|
borderWidth | 0 |
---|
title | UDP Configuration Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_UDP_CFG_RX_CHK_SUM_DISCARD_EN | Is used to determine whether received UDP packets without a valid checksum are discarded or are handled and processed. Before a UDP Datagram Check-Sum is validated, it is necessary to check whether the UDP datagram was transmitted with or without a computed Check-Sum. | DEF_ENABLED or DEF_DISABLED | NET_UDP_CFG_TX_CHK_SUM_EN | Is used to determine whether UDP checksums are computed for transmission to other hosts. | DEF_ENABLED or DEF_DISABLED |
|
Anchor |
---|
| Transport Layer Security Configuration |
---|
| Transport Layer Security Configuration |
---|
|
Transport Layer Security Configuration
Panel |
---|
borderWidth | 0 |
---|
title | Security Management Constants |
---|
|
Constant | Description | Possible Values |
---|
NET_UDP_CFG_RX_CHK_SUM_DISCARD_EN | Is used to determine whether received UDP packets without a valid checksum are discarded or are handled and processed. Before a UDP Datagram Check-Sum is validated, it is necessary to check whether the UDP datagram was transmitted with or without a computed Check-Sum. | DEF_ENABLED or DEF_DISABLED | NET_UDP_CFG_TX_CHK_SUM_EN | Is used to determine whether UDP checksums are computed for transmission to other hosts. | DEF_ENABLED or DEF_DISABLED |
|