Expand description
Netstack3 core IP layer.
This crate contains the IP layer for netstack3.
Modules§
- device
- Definitions for devices at the IP layer.
- gmp
- Group management protocols.
- icmp
- The Internet Control Message Protocol (ICMP).
- marker
- Marker traits controlling IP context behavior.
- multicast_
forwarding - Multicast Forwarding
- nud
- Neighbor Unreachability Detection.
- raw
- Raw IP sockets.
- socket
- IP Layer definitions supporting sockets.
Structs§
- Addable
Entry AddableEntry
is a routing entry that may be used to add a new entry to the forwarding table.- Destination
- The destination of an outbound IP packet.
- Device
IpLayer Metadata - Metadata that is produced and consumed by the IP layer for each packet, but which also traverses the device layer.
- Entry
- A forwarding entry.
- Fragment
Timer Id - The timer ID for the fragment cache.
- Fragmentation
Counters - Counters kept by the IP stack pertaining to fragmentation.
- Generation
- Used to compare routes for how early they were added to the table.
- HopLimits
- Hop limits for packets sent to multicast and unicast destinations.
- IpCounters
- Ip layer counters.
- IpPacket
Fragment Cache - A cache of inbound IP packet fragments.
- IpState
Inner - The inner state for the IP layer for IP version
I
. - Ipv4
State - The stack’s IPv4 state.
- Ipv4
State Builder - A builder for IPv4 state.
- Ipv6
State - The stack’s IPv6 state.
- Ipv6
State Builder - A builder for IPv6 state.
- Local
Delivery Packet Info - Information for an incoming packet.
- Mark
Matchers - The 2 mark matchers a rule can specify. All non-none markers must match.
- Pmtu
Cache - A path MTU cache.
- RawMetric
- The priority of a forwarding entry. Lower metrics are preferred.
- Receive
IpPacket Meta - Meta information for an incoming packet.
- Resolved
Route - The resolved route to a destination IP address.
- Route
Resolve Options - The options for
RoutesApi::resolve_route
api. - Router
Advertisement Event - An event signifying a router advertisement has been received.
- Routes
AnyApi - The routes API interacting with all IP versions.
- Routes
Api - The routes API for a specific IP version
I
. - Routing
Table - An IP routing table.
- Routing
Table Id - Identifier to a routing table.
- Rule
- A routing rule.
- Rule
Matcher - Contains traffic matchers for a given rule.
- Rules
Table - Table that contains routing rules.
- Send
IpPacket Meta - The metadata associated with an outgoing IP packet.
- Transparent
Local Delivery - Informs the transport layer of parameters for transparent local delivery.
Enums§
- AddRoute
Error - An error encountered when adding a routing entry.
- Addable
Entry Either - An IPv4 forwarding entry or an IPv6 forwarding entry.
- Addable
Metric - The metric for an
AddableEntry
. - Address
Status - The status of an IP address on an interface.
- Bound
Device Matcher - Matcher for the bound device of locally generated traffic.
- Drop
Reason - The reason a received IP packet is dropped.
- Entry
Either - An IPv4 forwarding entry or an IPv6 forwarding entry.
- Internal
Forwarding - Internal forwarding semantics.
- IpLayer
Event - Events observed at the IP layer.
- IpLayer
Timer Id - The identifier for timer events in the IP layer.
- IpPacket
Destination - Packed destination passed to
IpDeviceSendContext::send_ip_frame
. - IpSend
Frame Error Reason - Send error cause for
IpSendFrameError
. - Ipv4
Present Address Status - The status of an IPv4 address.
- Ipv6
Present Address Status - The status of an IPv6 address.
- Mark
Matcher - A matcher to the socket mark.
- Metric
- The metric for an
Entry
. - NextHop
- The next hop for a
Destination
. - NonLocal
SrcAddr Policy - Tells whether a non local IP address is allowed as the source address for route selection.
- Packet
Origin - Tells whether the packet being routed is generated by us or someone else.
- Receive
Packet Action - The action to take in order to process a received IP packet.
- Resolve
Route Error - An error occurred while resolving the route to a destination
- Rule
Action - The action part of a
Rule
. - Traffic
Origin Matcher - Matches with
PacketOrigin
. - Transport
Receive Error - An error encountered when receiving a transport-layer packet.
Constants§
- DEFAULT_
HOP_ LIMITS - Default hop limits for sockets.
- DEFAULT_
TTL - Default IPv4 TTL.
- IPV6_
DEFAULT_ SUBNET - The IPv6 subnet that contains all addresses;
::/0
.
Traits§
- Base
Transport IpContext - The base execution context provided by the IP layer to transport layer protocols.
- Filter
Handler Provider - Abstracts access to a
filter::FilterHandler
for core contexts. - Fragment
Context - The state context for the fragment cache.
- IpDevice
Confirm Reachable Context - Provides the ability to check neighbor reachability via a specific device.
- IpDevice
Context - The IP device context provided to the IP layer.
- IpDevice
Egress State Context - Provides access to an IP device’s state for IP layer egress.
- IpDevice
Ingress State Context - Provides access to an IP device’s state for IP layer ingress.
- IpDevice
MtuContext - Provides access to an IP device’s MTU for the IP layer.
- IpHeader
Info - Abstracts extracting information from IP headers for upper layers.
- IpLayer
Bindings Context - The bindings execution context for the IP layer.
- IpLayer
Context - The execution context for the IP layer.
- IpLayer
Handler - Trait for abstracting the IP layer for locally-generated traffic. That is, traffic generated by the netstack itself (e.g. ICMP, IGMP, or MLD).
- IpLayer
IpExt - An extension trait providing IP layer properties.
- IpRoute
Table Context - The state context that gives access to a singular routing table.
- IpRoute
Tables Context - The state context that gives access to routing tables provided to the IP layer.
- IpRouting
Device Context - Provides access to a device for the purposes of IP routing.
- IpSas
Handler - A handler for Source Address Selection.
- IpState
Context - The state context provided to the IP layer.
- IpTransport
Context - The execution context provided by a transport layer protocol to the IP layer.
- IpTransport
Dispatch Context - The IP context providing dispatch to the available transport protocols.
- Multicast
Membership Handler - Abstraction over the ability to join and leave multicast groups.
- NdpBindings
Context - Ipv6-specific bindings execution context for the IP layer.
- Pmtu
Context - The core context for the path MTU cache.
- Transport
IpContext - A marker trait for the traits required by the transport layer from the IP layer.
Functions§
- gen_
ip_ packet_ id - Generates an IP packet ID.
- receive_
ipv4_ packet - Receive an IPv4 packet from a device.
- receive_
ipv4_ packet_ action - Computes the action to take in order to process a received IPv4 packet.
- receive_
ipv6_ packet - Receive an IPv6 packet from a device.
- receive_
ipv6_ packet_ action - Computes the action to take in order to process a received IPv6 packet.
- request_
context_ add_ route - Requests that a route be added to the routing table.
- request_
context_ del_ routes - Requests that routes matching these specifiers be removed from the routing table.
- resolve_
output_ route_ to_ destination - Returns the outgoing routing instructions for reaching the given destination.
Type Aliases§
- IpSend
Frame Error - Send errors observed at or above the IP layer that carry a serializer.
- Routable
IpAddr - An IP Address that witnesses properties needed to be routed.