package
0.0.0-20180524224622-583358ac5197
Repository: https://github.com/costinm/netstack.git
Documentation: pkg.go.dev
# Functions
FindLinkEndpoint finds the link endpoint associated with the given ID.
New allocates a new networking stack with only the requested networking and transport protocols configured with default options.
RegisterLinkEndpoint register a link-layer protocol endpoint and returns an ID that can be used to refer to it.
RegisterNetworkProtocolFactory registers a new network protocol factory with the stack so that it becomes available to users of the stack.
RegisterTransportProtocolFactory registers a new transport protocol factory with the stack so that it becomes available to users of the stack.
# Constants
The following are the supported link endpoint capabilities.
The following are the supported link endpoint capabilities.
The following are the allowed values for ControlType values.
The following are the allowed values for ControlType values.
The following are the allowed values for ControlType values.
# Structs
NetworkEndpointID is the identifier of a network layer protocol endpoint.
NIC represents a "network interface card" to which the networking stack is attached.
NICInfo captures the name and addresses assigned to a NIC.
NICStateFlags holds information about the state of an NIC.
Route represents a route through the networking stack to a given destination.
Stack is a networking stack, with all supported protocols, NICs, and route table.
TCPEndpointID is the unique 4 tuple that identifies a given endpoint.
TCPEndpointState is a copy of the internal state of a TCP endpoint.
TCPFastRecoveryState holds a copy of the internal fast recovery state of a TCP endpoint.
TCPReceiverState holds a copy of the internal state of the receiver for a given TCP endpoint.
TCPSACKInfo holds TCP SACK related information for a given TCP endpoint.
TCPSenderState holds a copy of the internal state of the sender for a given TCP Endpoint.
TransportEndpointID is the identifier of a transport layer protocol endpoint.
# Interfaces
A LinkAddressCache caches link addresses.
A LinkAddressResolver is an extension to a NetworkProtocol that can resolve link addresses.
LinkEndpoint is the interface implemented by data link layer protocols (e.g., ethernet, loopback, raw) and used by network layer protocols to send packets out through the implementer's data link endpoint.
NetworkDispatcher contains the methods used by the network stack to deliver packets to the appropriate network endpoint after it has been handled by the data link layer.
NetworkEndpoint is the interface that needs to be implemented by endpoints of network layer protocols (e.g., ipv4, ipv6).
NetworkProtocol is the interface that needs to be implemented by network protocols (e.g., ipv4, ipv6) that want to be part of the networking stack.
TransportDispatcher contains the methods used by the network stack to deliver packets to the appropriate transport endpoint after it has been handled by the network layer.
TransportEndpoint is the interface that needs to be implemented by transport protocol (e.g., tcp, udp) endpoints that can handle packets.
TransportProtocol is the interface that needs to be implemented by transport protocols (e.g., tcp, udp) that want to be part of the networking stack.
# Type aliases
ControlType is the type of network control message.
LinkEndpointCapabilities is the type associated with the capabilities supported by a link-layer endpoint.
NetworkProtocolFactory provides methods to be used by the stack to instantiate network protocols.
TCPProbeFunc is the expected function type for a TCP probe function to be passed to stack.AddTCPProbe.
TransportProtocolFactory functions are used by the stack to instantiate transport protocols.