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 exampleudp-socket-count-8. Only the values listed inCargo.tomlcan be set this way. - With an environment variable named
XARXA_<NAME>at build time. For exampleXARXA_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
DnsClientcan be given. - IFACE_
ADDR_ COUNT - Max IP addresses an interface can hold at once.
- IFACE_
COUNT - Max interfaces a
Stackcan hold at once. - MULTICAST_
GROUP_ COUNT - Max multicast groups a
Stackcan 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
Stackcan 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
Stackcan hold at once. - TCP_
SOCKET_ COUNT - Max TCP sockets a
Stackcan hold at once. - UDP_
RX_ QUEUE_ COUNT - Max datagrams a UDP socket queues for receiving.
- UDP_
SOCKET_ COUNT - Max UDP sockets a
Stackcan hold at once.