embassy-net

Crates

git

Versions

default

Flavors

Skip to main content

Module config

Module config 

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 data structures are statically or dynamically allocated depending on the alloc feature, so some limits apply only with alloc disabled.

Constants§

ASSEMBLER_MAX_SEGMENT_COUNT
Max contiguous data ranges tracked 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.
DHCP_SERVER_CLIENT_ID_SIZE
Longest DHCP client identifier a server lease can store, in bytes.
DHCP_SERVER_LEASE_COUNT
Max leases the DHCP server keeps per interface.
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.
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.
IFACE_COUNT
Max interfaces a Stack can hold.
MULTICAST_GROUP_COUNT
Max multicast groups a Stack can be joined to.
NEIGHBOR_CACHE_COUNT
Max neighbors the stack remembers, across all interfaces.
PENDING_QUEUE_COUNT
Max packets in the “pending neighbor” queue.
RAW_RX_QUEUE_COUNT
Max packets a raw socket queues for receiving.
RAW_SOCKET_COUNT
Max raw sockets a Stack can hold.
REASSEMBLY_BUFFER_COUNT
Max datagrams reassembled, IPv4 and 6LoWPAN together.
ROUTE_COUNT
Max routes the routing table can hold.
SIXLOWPAN_ADDRESS_CONTEXT_COUNT
Max 6LoWPAN address contexts an interface can hold.
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.
TCP_SOCKET_COUNT
Max TCP sockets a Stack can hold.
TX_TIMESTAMP_QUEUE_COUNT
TX timestamps queued per stack with packetmeta-timestamp.
UDP_RX_QUEUE_COUNT
Max datagrams a UDP socket queues for receiving.
UDP_SOCKET_COUNT
Max UDP sockets a Stack can hold.