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§
- ref_
counted_ hash_ map - Reference counted hash map data structure.
- socket
- Common types and utilities for sockets.
- socketmap
- Defines generic data structures used to implement common application socket functionality for multiple protocols.
- sync
- Sync utilities common to netstack3.
Structs§
- Address
Resolution Failed - Error when link address resolution failed for a neighbor.
- Counter
- An atomic counter for packet statistics, e.g. IPv4 packets received.
- CtxPair
- A concrete implementation of
ContextPair
. - Device
Name Matcher - Matcher that matches devices with the name.
- Ephemeral
Port - A witness type for a port within some ephemeral port range.
- Error
AndSerializer - An error and a serializer.
- Exists
Error - Error when something exists unexpectedly.
- Fragmented
Payload - An implementation of
Payload
backed by up toN
byte slices. - Handshake
Options - Segment options only set on handshake.
- IpDevice
Addr - An IP address that witnesses properties needed to be assigned to a device.
- Local
Timer Heap - A local timer heap that keeps timers for core modules.
- Mark
- A mark attached to packets/sockets.
- Mark
Storage - A storage backed by an array with the same cardinality of
MarkDomain
. - Mms
- Maximum packet size, that is the maximum IP payload one packet can carry.
- Mss
- Maximum segment size, that is the maximum TCP payload one segment can carry.
- Nested
Into Core Timer Ctx - An uninstantiable type that performs conversions based on
Into
implementations and an available outerCoreTimerContext
CC
. - NotFound
Error - Error when something unexpectedly doesn’t exist, such as trying to remove an element when the element is not present.
- NotSupported
Error - Error when something is not supported.
- Positive
Isize - An
isize
that is strictly positive (greater than 0). - Recv
IpFrame Meta - The metadata required for a packet to get into the IP layer.
- Sack
Block - A selective ACK block.
- Sack
Blocks - Blocks of selective ACKs.
- Segment
- A TCP segment.
- Segment
Header - All non-data portions of a TCP segment.
- Segment
Options - Segment options set on non-handshake segments.
- SeqNum
- Sequence number of a transferred TCP segment.
- Subnet
Matcher - Matcher that matches IP addresses in a subnet.
- Token
Bucket - A token bucket used for rate limiting.
- Uninstantiable
- An uninstantiable type.
- Uninstantiable
Wrapper - An uninstantiable type that wraps an instantiable type,
A
. - Unscaled
Window Size - Window size that is used in the window field of a TCP segment.
- Window
Scale - This type is a witness for a valid window scale exponent value.
- Window
Size - A witness type for TCP window size.
- Wrap
Broadcast Marker - Wrapper struct to provide a convenient
GenericOverIp
impl for use withBroadcastIpExt::BroadcastMarker
.
Enums§
- AnyDevice
- Marker type for a generic device.
- Control
- Control flags that can alter the state of a TCP control block.
- Either
Device Id - A device id that might be either in its strong or weak form.
- Frame
Destination - The type of address used as the destination address in a device-layer frame.
- Icmp
Error Code - An ICMP error of either IPv4 or IPv6.
- Icmpv4
Error Code - An ICMPv4 error type and code.
- Icmpv6
Error Code - An ICMPv6 error type and code.
- Into
Core Timer Ctx - An uninstantiable type that performs conversions based on
Into
implementations. - Local
Address Error - Error type for errors common to local addresses.
- Mark
Domain - Mark domains.
- Options
- Contains all supported TCP options.
- Remote
Address Error - An error encountered when attempting to create a UDP, TCP, or ICMP connection.
- Remove
Resource Result - The result of removing some reference-counted resource from core.
- Send
Frame Error Reason - The error type for
SendFrameError
. - Socket
Error - Error type for connection errors.
- Work
Queue Report - A common type returned by functions that perform bounded amounts of work.
- Zoned
Address Error - Indicates a problem related to an address with a zone.
Traits§
- Assigned
Addr IpExt - An extension trait adding an associated type for an IP address assigned to a device.
- Atomic
Instant - A type representing an instant in time that can be atomically updated.
- Bidirectional
Converter - Provides functions for converting infallibly between types.
- Broadcast
IpExt Ip
extension trait to assist in defining [NextHop
].- Buildable
Core Context - A core context that can be created from some builder type.
- Context
Pair - A pair of core and bindings contexts.
- Context
Provider - A type that provides a context implementation.
- Core
Event Context - An event context implemented by core contexts to wrap event types that are not exposed to bindings.
- Core
Timer Context - A core context providing timer type conversion.
- Core
TxMetadata Context - A core context providing tx metadata type conversion.
- Counter
Context - A context that stores counters.
- Deferred
Resource Removal Context - A context trait that allows core to defer observing proper resource cleanup to bindings.
- Device
- A device.
- Device
IdAny Compat Context - A marker trait tying
DeviceIdContext
implementations. - Device
IdContext - An execution context which provides device ID types type for various netstack internals to share.
- Device
Identifier - An identifier for a device.
- Device
With Name - Allows the user to match a device with a name.
- Event
Context - A context for emitting events.
- Handleable
Timer - A timer that can be handled by a pair of core context
CC
and bindings contextBC
. - Icmp
IpExt - An extension trait adding extra ICMP-related functionality to IP versions.
- Inspectable
- A trait that allows a type to record its fields to an
inspector
. - Inspectable
Value - A trait that marks a type as inspectable.
- Inspector
- A trait abstracting a state inspector.
- Inspector
Device Ext - An extension to
Inspector
that allows transforming and recording device identifiers. - Inspector
Ext - Extension trait for
Inspector
adding support for netstack3-specific types. - Instant
- A type representing an instant in time.
- Instant
Bindings Types - Trait defining the
Instant
type provided by bindings’InstantContext
implementation. - Instant
Context - A context that provides access to a monotonic clock.
- IpAddress
Id - An IP address ID.
- IpDevice
Address IdContext - Provides the execution context related to address IDs.
- IpExt
- An
Ip
extension trait adding functionality specific to the IP layer. - IpTypes
IpExt Ip
extension trait to assist in defining [NextHop
].- Link
Address - The type of address used by a link device.
- Link
Device - A link device.
- Link
Unicast Address - A link address that can be unicast.
- Matcher
- Common pattern to define a matcher for a metadata input
T
. - Owned
OrRefs Bidirectional Converter - A marker trait for
BidirectionalConverter
of owned or reference types. - Payload
- A TCP payload that operates around
u32
instead ofusize
. - Payload
Len - A TCP payload that only allows for getting the length of the payload.
- Port
Alloc Impl - Trait that configures the behavior of port allocation.
- Receivable
Frame Meta - A trait providing the receive implementation for some frame identified by a metadata type.
- Recv
Frame Context - A context for receiving frames.
- Reference
Notifiers - A context trait determining the types to be used for reference notifications.
- Reference
Notifiers Ext - An extension of
ReferenceNotifiers
providing extra functionality. - Resource
Counter Context - A context that provides access to per-resource counters for observation and debugging.
- RngContext
- A context that provides a random number generator (RNG).
- Send
Frame Context - A context for sending frames.
- Sendable
Frame Meta - A trait providing the send implementation for some frame identified by a metadata type.
- Strong
Device Identifier - A strong device reference.
- Timer
Bindings Types - Opaque types provided by bindings used by
TimerContext
. - Timer
Context - A context providing time scheduling to core.
- Timer
Handler - A handler for timer firing events.
- TxMetadata
Bindings Types - A trait abstracting TX frame metadata when traversing the stack.
- Weak
Device Identifier - A weak device reference.
- Weak
IpAddress Id - A weak IP address ID.
Functions§
- simple_
randomized_ port_ alloc - Implements the algorithm 1 as described in RFC 6056.
Type Aliases§
- Ipv4
Device Addr - An Ipv4 address that witnesses properties needed to be assigned to a device.
- Ipv6
Device Addr - An IPv6 address that witnesses properties needed to be assigned to a device.
- Marks
- The 2 marks that can be attached to packets.
- Remove
Resource Result With Context - An alias for
RemoveResourceResult
that extracts the receiver type from the bindings context. - Send
Frame Error - Errors returned by
SendFrameContext::send_frame
.