xarxa

Crates

git

Versions

default

Flavors

Skip to main content

Module config

Module config 

Source
Expand description

Compile-time configuration.

The sizes of the stack’s tables, queues and buffers are set at compile time. They can be set in two ways:

  • With a cargo feature named <name>-<value>, lowercase and with dashes instead of underscores. For example udp-socket-count-8. Only the values listed in Cargo.toml can be set this way.
  • With an environment variable named XARXA_<NAME> at build time. For example XARXA_UDP_SOCKET_COUNT=8 cargo build. They can also be set in the [env] section of .cargo/config.toml. Any value can be set this way.

Environment variables take priority over cargo features. Enabling two cargo features for the same setting with different values fails the build.

Some settings are limits only without the alloc feature: with it, the table they size grows on the heap instead, and the setting is ignored.

The packet pool size is configurable in xarxa_driver::config.

Constants§

ASSEMBLER_MAX_SEGMENT_COUNT
Max contiguous data ranges tracked at once while reassembling.
DHCP_MAX_DNS_SERVER_COUNT
Max DNS servers kept from a DHCP lease.
DHCP_OPTIONS_BUF_SIZE
Size of the raw options buffer in a DHCP lease, in bytes.
DNS_MAX_NAME_SIZE
Longest DNS name that can be queried, in wire format, in bytes.
DNS_MAX_QUERY_COUNT
Max DNS queries in flight at once.
DNS_MAX_RESULT_COUNT
Max addresses one DNS query returns.
DNS_MAX_SERVER_COUNT
Max DNS servers a DnsClient can be given.
IFACE_ADDR_COUNT
Max IP addresses an interface can hold at once.
IFACE_COUNT
Max interfaces a Stack can hold at once.
MULTICAST_GROUP_COUNT
Max multicast groups a Stack can be joined to at once.
NEIGHBOR_CACHE_COUNT
Max neighbors the stack remembers at once, across all interfaces.
PENDING_QUEUE_COUNT
Max packets parked at once waiting for neighbor resolution.
RAW_RX_QUEUE_COUNT
Max packets a raw socket queues for receiving.
RAW_SOCKET_COUNT
Max raw sockets a Stack can hold at once.
REASSEMBLY_BUFFER_COUNT
Max datagrams reassembled at once, IPv4 and 6LoWPAN together.
ROUTE_COUNT
Max routes the routing table can hold at once.
SIXLOWPAN_ADDRESS_CONTEXT_COUNT
Max 6LoWPAN address contexts an interface can hold at once.
SLAAC_PREFIX_COUNT
Max advertised prefixes SLAAC tracks per interface.
SLAAC_ROUTER_COUNT
Max default routers SLAAC tracks per interface.
TCP_LISTENER_BACKLOG
Max connections a TCP listener queues for accepting: the SYN backlog.
TCP_LISTENER_COUNT
Max TCP listeners a Stack can hold at once.
TCP_SOCKET_COUNT
Max TCP sockets a Stack can hold at once.
UDP_RX_QUEUE_COUNT
Max datagrams a UDP socket queues for receiving.
UDP_SOCKET_COUNT
Max UDP sockets a Stack can hold at once.