package
0.0.0-20220815190318-e7033217c5f3
Repository: https://github.com/procyonai/netstack.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
Package buffer provides the implementation of a buffer view.
Package checker provides helper functions to check networking packets for validity.
No description provided by the author
Package header provides the implementation of the encoding and decoding of network protocol headers.
Package iptables supports packet filtering and manipulation via the iptables tool.
No description provided by the author
No description provided by the author
Package ports provides PortManager that manages allocating, reserving and releasing ports.
No description provided by the author
Package seqnum defines the types and methods for TCP sequence numbers such that they fit in 32-bit words and work properly when overflows occur.
Package stack provides the glue between networking protocols and the consumers of the networking stack.
No description provided by the author

# Functions

AddDanglingEndpoint adds a dangling endpoint.
DeleteDanglingEndpoint removes a dangling endpoint.
GetDanglingEndpoints returns all dangling endpoints.
NewSubnet creates a new Subnet, checking that the address and mask are the same length.
ParseMACAddress parses an IEEE 802 address.

# Constants

DelayOption is used by SetSockOpt/GetSockOpt to specify if data should be sent out immediately by the transport protocol.
ReceiveBufferSizeOption is used by SetSockOptInt/GetSockOptInt to specify the receive buffer size option.
ReceiveQueueSizeOption is used in GetSockOptInt to specify that the number of unread bytes in the input buffer should be returned.
SendBufferSizeOption is used by SetSockOptInt/GetSockOptInt to specify the send buffer size option.
SendQueueSizeOption is used in GetSockOptInt to specify that the number of unread bytes in the output buffer should be returned.
Values of the flags that can be passed to the Shutdown() method.
Values of the flags that can be passed to the Shutdown() method.

# Variables

AsyncLoading is the global barrier for asynchronous endpoint loading activities.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.
Errors that can be returned by the network stack.

# Structs

AddressWithPrefix is an address with its subnet prefix length.
A ControlMessages contains socket control messages for IP sockets.
Error represents an error in the netstack error space.
ErrorOption is used in GetSockOpt to specify that the last error reported by the endpoint should be cleared and returned.
ErrSaveRejection indicates a failed save due to unsupported networking state.
FullAddress represents a full transport node address, as required by the Connect() and Bind() methods.
ICMPStats collects ICMP-specific stats (both v4 and v6).
ICMPv4PacketStats enumerates counts for all ICMPv4 packet types.
ICMPv4ReceivedPacketStats collects inbound ICMPv4-specific stats.
ICMPv4SentPacketStats collects outbound ICMPv4-specific stats.
ICMPv6PacketStats enumerates counts for all ICMPv6 packet types.
ICMPv6ReceivedPacketStats collects inbound ICMPv6-specific stats.
ICMPv6SentPacketStats collects outbound ICMPv6-specific stats.
IPStats collects IP-specific stats (both v4 and v6).
MembershipOption is used by SetSockOpt/GetSockOpt as an argument to AddMembershipOption and RemoveMembershipOption.
MulticastInterfaceOption is used by SetSockOpt/GetSockOpt to specify a default interface for multicast.
A PacketBuffer contains all the data of a network packet.
ProtocolAddress is an address and the network protocol it is associated with.
ReadErrors collects segment read errors from an endpoint read call.
ReceiveErrors collects packet receive errors within transport endpoint.
Route is a row in the routing table.
SendErrors collects packet send errors within the transport layer for an endpoint.
A StatCounter keeps track of a statistic.
Stats holds statistics about the networking stack.
StdClock implements Clock with the time package.
Subnet is a subnet defined by its address and mask.
TCPInfoOption is used by GetSockOpt to expose TCP statistics.
TCPStats collects TCP-specific stats.
TransportEndpointStats collects statistics about the endpoint.
UDPStats collects UDP-specific stats.
WriteErrors collects packet write errors from an endpoint write call.
WriteOptions contains options for Endpoint.Write.

# Interfaces

A Clock provides the current time.
Endpoint is the interface implemented by transport protocols (e.g., tcp, udp) that exposes functionality like read, write, connect, etc.
EndpointInfo is the interface implemented by each endpoint info struct.
EndpointStats is the interface implemented by each endpoint stats struct.
Payloader is an interface that provides data.

# Type aliases

AddMembershipOption is used by SetSockOpt/GetSockOpt to join a multicast group identified by the given multicast address, on the interface matching the given interface address.
Address is a byte slice cast as a string that represents the address of a network node.
AddressMask is a bitmask for an address.
AvailableCongestionControlOption is used to query the supported congestion control algorithms.
BindToDeviceOption is used by SetSockOpt/GetSockOpt to specify that sockets should bind only on a specific NIC.
BroadcastOption is used by SetSockOpt/GetSockOpt to specify whether datagram sockets are allowed to send packets to a broadcast address.
CongestionControlOption is used by SetSockOpt/GetSockOpt to set/get the current congestion control algorithm.
CorkOption is used by SetSockOpt/GetSockOpt to specify if data should be held until segments are full by the TCP transport protocol.
DefaultTTLOption is used by stack.(*Stack).NetworkProtocolOption to specify a default TTL.
IPv4TOSOption is used by SetSockOpt/GetSockOpt to specify TOS for all subsequent outgoing IPv4 packets from the endpoint.
IPv6TrafficClassOption is used by SetSockOpt/GetSockOpt to specify TOS for all subsequent outgoing IPv6 packets from the endpoint.
KeepaliveCountOption is used by SetSockOpt/GetSockOpt to specify the number of un-ACKed TCP keepalives that will be sent before the connection is closed.
KeepaliveEnabledOption is used by SetSockOpt/GetSockOpt to specify whether TCP keepalive is enabled for this socket.
KeepaliveIdleOption is used by SetSockOpt/GetSockOpt to specify the time a connection must remain idle before the first TCP keepalive packet is sent.
KeepaliveIntervalOption is used by SetSockOpt/GetSockOpt to specify the interval between sending TCP keepalive packets.
LinkAddress is a byte slice cast as a string that represents a link address.
MaxSegOption is used by SetSockOpt/GetSockOpt to set/get the current Maximum Segment Size(MSS) value as specified using the TCP_MAXSEG option.
ModerateReceiveBufferOption allows the caller to enable/disable TCP receive buffer moderation.
MulticastLoopOption is used by SetSockOpt/GetSockOpt to specify whether multicast packets sent over a non-loopback interface will be looped back.
MulticastTTLOption is used by SetSockOpt/GetSockOpt to control the default TTL value for multicast messages.
NetworkProtocolNumber is the number of a network protocol.
NICID is a number that uniquely identifies a NIC.
OutOfBandInlineOption is used by SetSockOpt/GetSockOpt to specify whether TCP out-of-band data is delivered along with the normal in-band data.
PasscredOption is used by SetSockOpt/GetSockOpt to specify whether SCM_CREDENTIALS socket control messages are enabled.
QuickAckOption is stubbed out in SetSockOpt/GetSockOpt.
RemoveMembershipOption is used by SetSockOpt/GetSockOpt to leave a multicast group identified by the given multicast address, on the interface matching the given interface address.
ReuseAddressOption is used by SetSockOpt/GetSockOpt to specify whether Bind() should allow reuse of local address.
ReusePortOption is used by SetSockOpt/GetSockOpt to permit multiple sockets to be bound to an identical socket address.
ShutdownFlags represents flags that can be passed to the Shutdown() method of the Endpoint interface.
SlicePayload implements Payloader for slices.
SockOpt represents socket options which values have the int type.
TCPLingerTimeoutOption is used by SetSockOpt/GetSockOpt to set/get the maximum duration for which a socket lingers in the TCP_FIN_WAIT_2 state before being marked closed.
TCPTimeWaitTimeoutOption is used by SetSockOpt/GetSockOpt to set/get the maximum duration for which a socket lingers in the TIME_WAIT state before being marked closed.
TransportProtocolNumber is the number of a transport protocol.
TTLOption is used by SetSockOpt/GetSockOpt to control the default TTL/hop limit value for unicast messages.
V6OnlyOption is used by SetSockOpt/GetSockOpt to specify whether an IPv6 socket is to be restricted to sending and receiving IPv6 packets only.