Crate netstack3_base
source ·Expand description
Base type definitions for netstack3 core.
This crate contains definitions common to the other netstack3 core crates and is the base dependency for most of them.
Modules§
- Reference counted hash map data structure.
- Common types and utilities for sockets.
- Defines generic data structures used to implement common application socket functionality for multiple protocols.
- Sync utilities common to netstack3.
Macros§
- Convenience wrapper around the
TracingContext::duration
trait method.
Structs§
- Error when link address resolution failed for a neighbor.
- An atomic counter for packet statistics, e.g. IPv4 packets received.
- A concrete implementation of
ContextPair
. - Matcher that matches devices with the name.
- A witness type for a port within some ephemeral port range.
- An error and a serializer.
- Error when something exists unexpectedly.
- An implementation of
Payload
backed by up toN
byte slices. - An IP address that witnesses properties needed to be assigned to a device.
- A local timer heap that keeps timers for core modules.
- Maximum packet size, that is the maximum IP payload one packet can carry.
- Maximum segment size, that is the maximum TCP payload one segment can carry.
- An uninstantiable type that performs conversions based on
Into
implementations and an available outerCoreTimerContext
CC
. - Error when something unexpectedly doesn’t exist, such as trying to remove an element when the element is not present.
- Error when something is not supported.
- Contains all supported TCP options.
- The metadata required for a packet to get into the IP layer.
- A TCP segment.
- All non-data portions of a TCP segment.
- Sequence number of a transferred TCP segment.
- Matcher that matches IP addresses in a subnet.
- A token bucket used for rate limiting.
- An uninstantiable type.
- An uninstantiable type that wraps an instantiable type,
A
. - Window size that is used in the window field of a TCP segment.
- This type is a witness for a valid window scale exponent value.
- A witness type for TCP window size.
- Wrapper struct to provide a convenient
GenericOverIp
impl for use withBroadcastIpExt::BroadcastMarker
.
Enums§
- Marker type for a generic device.
- Control flags that can alter the state of a TCP control block.
- A device id that might be either in its strong or weak form.
- The type of address used as the destination address in a device-layer frame.
- An ICMP error of either IPv4 or IPv6.
- An ICMPv4 error type and code.
- An ICMPv6 error type and code.
- An uninstantiable type that performs conversions based on
Into
implementations. - Error type for errors common to local addresses.
- An error encountered when attempting to create a UDP, TCP, or ICMP connection.
- The result of removing some reference-counted resource from core.
- The error type for
SendFrameError
. - Error type for connection errors.
- A common type returned by functions that perform bounded amounts of work.
- Indicates a problem related to an address with a zone.
Traits§
- A type representing an instant in time that can be atomically updated.
- Provides functions for converting infallibly between types.
Ip
extension trait to assist in defining [NextHop
].- A core context that can be created from some builder type.
- A pair of core and bindings contexts.
- A type that provides a context implementation.
- An event context implemented by core contexts to wrap event types that are not exposed to bindings.
- A core context providing timer type conversion.
- A context that stores counters.
- A context trait that allows core to defer observing proper resource cleanup to bindings.
- A device.
- A marker trait tying
DeviceIdContext
implementations. - An execution context which provides device ID types type for various netstack internals to share.
- An identifier for a device.
- Allows the user to match a device with a name.
- A context for emitting events.
- A timer that can be handled by a pair of core context
CC
and bindings contextBC
. - An extension trait adding extra ICMP-related functionality to IP versions.
- A trait that allows a type to record its fields to an
inspector
. - A trait that marks a type as inspectable.
- A trait abstracting a state inspector.
- An extension to
Inspector
that allows transforming and recording device identifiers. - A type representing an instant in time.
- Trait defining the
Instant
type provided by bindings’InstantContext
implementation. - A context that provides access to a monotonic clock.
- An
Ip
extension trait adding functionality specific to the IP layer. Ip
extension trait to assist in defining [NextHop
].- The type of address used by a link device.
- A link device.
- A link address that can be unicast.
- Common pattern to define a matcher for a metadata input
T
. - A marker trait for
BidirectionalConverter
of owned or reference types. - A TCP payload that operates around
u32
instead ofusize
. - A TCP payload that only allows for getting the length of the payload.
- Trait that configures the behavior of port allocation.
- A trait providing the receive implementation for some frame identified by a metadata type.
- A context for receiving frames.
- A context trait determining the types to be used for reference notifications.
- An extension of
ReferenceNotifiers
providing extra functionality. - A context that provides access to per-resource counters for observation and debugging.
- A context that provides a random number generator (RNG).
- A context for sending frames.
- A trait providing the send implementation for some frame identified by a metadata type.
- A strong device reference.
- Opaque types provided by bindings used by
TimerContext
. - A context providing time scheduling to core.
- A handler for timer firing events.
- A context for emitting tracing data.
- A weak device reference.
Functions§
- Implements the algorithm 1 as described in RFC 6056.
Type Aliases§
- An Ipv4 address that witnesses properties needed to be assigned to a device.
- An IPv6 address that witnesses properties needed to be assigned to a device.
- An alias for
RemoveResourceResult
that extracts the receiver type from the bindings context. - Errors returned by
SendFrameContext::send_frame
.