Versions in this module Expand all Collapse all v0 v0.1.1 Mar 15, 2021 Changes in this version + const ARPProtocolNumber + const ARPSize + const EthernetAddressSize + const EthernetMinimumSize + const GUEMinimumSize + const ICMPv4DstUnreachableMinimumSize + const ICMPv4EchoMinimumSize + const ICMPv4FragmentationNeeded + const ICMPv4MinimumSize + const ICMPv4PortUnreachable + const ICMPv4ProtocolNumber + const ICMPv6DstUnreachableMinimumSize + const ICMPv6EchoMinimumSize + const ICMPv6MinimumSize + const ICMPv6NeighborAdvertSize + const ICMPv6NeighborSolicitMinimumSize + const ICMPv6PacketTooBigMinimumSize + const ICMPv6PortUnreachable + const ICMPv6ProtocolNumber + const IPv4AddressSize + const IPv4Any + const IPv4Broadcast + const IPv4FlagDontFragment + const IPv4FlagMoreFragments + const IPv4MaximumHeaderSize + const IPv4MinimumSize + const IPv4ProtocolNumber + const IPv4Version + const IPv6AddressSize + const IPv6FragmentHeader + const IPv6FragmentHeaderSize + const IPv6MinimumMTU + const IPv6MinimumSize + const IPv6ProtocolNumber + const IPv6Version + const MaxIPPacketSize + const MaxWndScale + const TCPFlagAck + const TCPFlagFin + const TCPFlagPsh + const TCPFlagRst + const TCPFlagSyn + const TCPFlagUrg + const TCPMaxSACKBlocks + const TCPMinimumSize + const TCPOptionEOL + const TCPOptionMSS + const TCPOptionNOP + const TCPOptionSACK + const TCPOptionSACKPermitted + const TCPOptionTS + const TCPOptionWS + const TCPProtocolNumber + const UDPMinimumSize + const UDPProtocolNumber + func AddTCPOptionPadding(options []byte, offset int) int + func Checksum(buf []byte, initial uint16) uint16 + func ChecksumCombine(a, b uint16) uint16 + func EncodeMSSOption(mss uint32, b []byte) int + func EncodeNOP(b []byte) int + func EncodeSACKBlocks(sackBlocks []SACKBlock, b []byte) int + func EncodeSACKPermittedOption(b []byte) int + func EncodeTSOption(tsVal, tsEcr uint32, b []byte) int + func EncodeWSOption(ws int, b []byte) int + func IPVersion(b []byte) int + func IsV4MappedAddress(addr tcpip.Address) bool + func IsV4MulticastAddress(addr tcpip.Address) bool + func IsV6MulticastAddress(addr tcpip.Address) bool + func LinkLocalAddr(linkAddr tcpip.LinkAddress) tcpip.Address + func PseudoHeaderChecksum(protocol tcpip.TransportProtocolNumber, srcAddr tcpip.Address, ...) uint16 + func SolicitedNodeAddr(addr tcpip.Address) tcpip.Address + type ARP []byte + func (a ARP) HardwareAddressSender() []byte + func (a ARP) HardwareAddressTarget() []byte + func (a ARP) IsValid() bool + func (a ARP) Op() ARPOp + func (a ARP) ProtocolAddressSender() []byte + func (a ARP) ProtocolAddressTarget() []byte + func (a ARP) SetIPv4OverEthernet() + func (a ARP) SetOp(op ARPOp) + type ARPOp uint16 + const ARPReply + const ARPRequest + type Ethernet []byte + func (b Ethernet) DestinationAddress() tcpip.LinkAddress + func (b Ethernet) Encode(e *EthernetFields) + func (b Ethernet) SourceAddress() tcpip.LinkAddress + func (b Ethernet) Type() tcpip.NetworkProtocolNumber + type EthernetFields struct + DstAddr tcpip.LinkAddress + SrcAddr tcpip.LinkAddress + Type tcpip.NetworkProtocolNumber + type GUE []byte + func (b GUE) Encode(i *GUEFields) + func (b GUE) HeaderLength() uint8 + func (b GUE) Protocol() uint8 + func (b GUE) TypeAndControl() uint8 + type GUEFields struct + Control bool + HeaderLength uint8 + Protocol uint8 + Type uint8 + type ICMPv4 []byte + func (ICMPv4) DestinationPort() uint16 + func (ICMPv4) SetDestinationPort(uint16) + func (ICMPv4) SetSourcePort(uint16) + func (ICMPv4) SourcePort() uint16 + func (b ICMPv4) Checksum() uint16 + func (b ICMPv4) Code() byte + func (b ICMPv4) Payload() []byte + func (b ICMPv4) SetChecksum(checksum uint16) + func (b ICMPv4) SetCode(c byte) + func (b ICMPv4) SetType(t ICMPv4Type) + func (b ICMPv4) Type() ICMPv4Type + type ICMPv4Type byte + const ICMPv4DstUnreachable + const ICMPv4Echo + const ICMPv4EchoReply + const ICMPv4InfoReply + const ICMPv4InfoRequest + const ICMPv4ParamProblem + const ICMPv4Redirect + const ICMPv4SrcQuench + const ICMPv4TimeExceeded + const ICMPv4Timestamp + const ICMPv4TimestampReply + type ICMPv6 []byte + func (ICMPv6) DestinationPort() uint16 + func (ICMPv6) SetDestinationPort(uint16) + func (ICMPv6) SetSourcePort(uint16) + func (ICMPv6) SourcePort() uint16 + func (b ICMPv6) Checksum() uint16 + func (b ICMPv6) Code() byte + func (b ICMPv6) Payload() []byte + func (b ICMPv6) SetChecksum(checksum uint16) + func (b ICMPv6) SetCode(c byte) + func (b ICMPv6) SetType(t ICMPv6Type) + func (b ICMPv6) Type() ICMPv6Type + type ICMPv6Type byte + const ICMPv6DstUnreachable + const ICMPv6EchoReply + const ICMPv6EchoRequest + const ICMPv6NeighborAdvert + const ICMPv6NeighborSolicit + const ICMPv6PacketTooBig + const ICMPv6ParamProblem + const ICMPv6RedirectMsg + const ICMPv6RouterAdvert + const ICMPv6RouterSolicit + const ICMPv6TimeExceeded + type IPv4 []byte + func (b IPv4) CalculateChecksum() uint16 + func (b IPv4) Checksum() uint16 + func (b IPv4) DestinationAddress() tcpip.Address + func (b IPv4) Encode(i *IPv4Fields) + func (b IPv4) EncodePartial(partialChecksum, totalLength uint16) + func (b IPv4) Flags() uint8 + func (b IPv4) FragmentOffset() uint16 + func (b IPv4) HeaderLength() uint8 + func (b IPv4) ID() uint16 + func (b IPv4) IsValid(pktSize int) bool + func (b IPv4) Payload() []byte + func (b IPv4) PayloadLength() uint16 + func (b IPv4) Protocol() uint8 + func (b IPv4) SetChecksum(v uint16) + func (b IPv4) SetDestinationAddress(addr tcpip.Address) + func (b IPv4) SetFlagsFragmentOffset(flags uint8, offset uint16) + func (b IPv4) SetSourceAddress(addr tcpip.Address) + func (b IPv4) SetTOS(v uint8, _ uint32) + func (b IPv4) SetTotalLength(totalLength uint16) + func (b IPv4) SourceAddress() tcpip.Address + func (b IPv4) TOS() (uint8, uint32) + func (b IPv4) TTL() uint8 + func (b IPv4) TotalLength() uint16 + func (b IPv4) TransportProtocol() tcpip.TransportProtocolNumber + type IPv4Fields struct + Checksum uint16 + DstAddr tcpip.Address + Flags uint8 + FragmentOffset uint16 + ID uint16 + IHL uint8 + Protocol uint8 + SrcAddr tcpip.Address + TOS uint8 + TTL uint8 + TotalLength uint16 + type IPv6 []byte + func (IPv6) Checksum() uint16 + func (IPv6) SetChecksum(uint16) + func (b IPv6) DestinationAddress() tcpip.Address + func (b IPv6) Encode(i *IPv6Fields) + func (b IPv6) HopLimit() uint8 + func (b IPv6) IsValid(pktSize int) bool + func (b IPv6) NextHeader() uint8 + func (b IPv6) Payload() []byte + func (b IPv6) PayloadLength() uint16 + func (b IPv6) SetDestinationAddress(addr tcpip.Address) + func (b IPv6) SetNextHeader(v uint8) + func (b IPv6) SetPayloadLength(payloadLength uint16) + func (b IPv6) SetSourceAddress(addr tcpip.Address) + func (b IPv6) SetTOS(t uint8, l uint32) + func (b IPv6) SourceAddress() tcpip.Address + func (b IPv6) TOS() (uint8, uint32) + func (b IPv6) TransportProtocol() tcpip.TransportProtocolNumber + type IPv6Fields struct + DstAddr tcpip.Address + FlowLabel uint32 + HopLimit uint8 + NextHeader uint8 + PayloadLength uint16 + SrcAddr tcpip.Address + TrafficClass uint8 + type IPv6Fragment []byte + func (b IPv6Fragment) Checksum() uint16 + func (b IPv6Fragment) DestinationAddress() tcpip.Address + func (b IPv6Fragment) Encode(i *IPv6FragmentFields) + func (b IPv6Fragment) FragmentOffset() uint16 + func (b IPv6Fragment) ID() uint32 + func (b IPv6Fragment) IsValid() bool + func (b IPv6Fragment) More() bool + func (b IPv6Fragment) NextHeader() uint8 + func (b IPv6Fragment) Payload() []byte + func (b IPv6Fragment) SetChecksum(uint16) + func (b IPv6Fragment) SetDestinationAddress(tcpip.Address) + func (b IPv6Fragment) SetSourceAddress(tcpip.Address) + func (b IPv6Fragment) SetTOS(t uint8, l uint32) + func (b IPv6Fragment) SourceAddress() tcpip.Address + func (b IPv6Fragment) TOS() (uint8, uint32) + func (b IPv6Fragment) TransportProtocol() tcpip.TransportProtocolNumber + type IPv6FragmentFields struct + FragmentOffset uint16 + Identification uint32 + M bool + NextHeader uint8 + type Network interface + Checksum func() uint16 + DestinationAddress func() tcpip.Address + Payload func() []byte + SetChecksum func(uint16) + SetDestinationAddress func(tcpip.Address) + SetSourceAddress func(tcpip.Address) + SetTOS func(t uint8, l uint32) + SourceAddress func() tcpip.Address + TOS func() (uint8, uint32) + TransportProtocol func() tcpip.TransportProtocolNumber + type SACKBlock struct + End seqnum.Value + Start seqnum.Value + type TCP []byte + func (b TCP) AckNumber() uint32 + func (b TCP) CalculateChecksum(partialChecksum uint16, totalLen uint16) uint16 + func (b TCP) Checksum() uint16 + func (b TCP) DataOffset() uint8 + func (b TCP) DestinationPort() uint16 + func (b TCP) Encode(t *TCPFields) + func (b TCP) EncodePartial(partialChecksum, length uint16, seqnum, acknum uint32, flags byte, ...) + func (b TCP) Flags() uint8 + func (b TCP) Options() []byte + func (b TCP) ParsedOptions() TCPOptions + func (b TCP) Payload() []byte + func (b TCP) SequenceNumber() uint32 + func (b TCP) SetChecksum(checksum uint16) + func (b TCP) SetDestinationPort(port uint16) + func (b TCP) SetSourcePort(port uint16) + func (b TCP) SourcePort() uint16 + func (b TCP) WindowSize() uint16 + type TCPFields struct + AckNum uint32 + Checksum uint16 + DataOffset uint8 + DstPort uint16 + Flags uint8 + SeqNum uint32 + SrcPort uint16 + UrgentPointer uint16 + WindowSize uint16 + type TCPOptions struct + SACKBlocks []SACKBlock + TS bool + TSEcr uint32 + TSVal uint32 + func ParseTCPOptions(b []byte) TCPOptions + type TCPSynOptions struct + MSS uint16 + SACKPermitted bool + TS bool + TSEcr uint32 + TSVal uint32 + WS int + func ParseSynOptions(opts []byte, isAck bool) TCPSynOptions + type Transport interface + Checksum func() uint16 + DestinationPort func() uint16 + Payload func() []byte + SetChecksum func(uint16) + SetDestinationPort func(uint16) + SetSourcePort func(uint16) + SourcePort func() uint16 + type UDP []byte + func (b UDP) CalculateChecksum(partialChecksum uint16, totalLen uint16) uint16 + func (b UDP) Checksum() uint16 + func (b UDP) DestinationPort() uint16 + func (b UDP) Encode(u *UDPFields) + func (b UDP) Length() uint16 + func (b UDP) Payload() []byte + func (b UDP) SetChecksum(checksum uint16) + func (b UDP) SetDestinationPort(port uint16) + func (b UDP) SetSourcePort(port uint16) + func (b UDP) SourcePort() uint16 + type UDPFields struct + Checksum uint16 + DstPort uint16 + Length uint16 + SrcPort uint16