Documentation ¶
Overview ¶
Package parse provides utilities to parse packets.
Index ¶
- func ARP(pkt stack.PacketBufferPtr) bool
- func ICMPv4(pkt stack.PacketBufferPtr) bool
- func ICMPv6(pkt stack.PacketBufferPtr) bool
- func IPv4(pkt stack.PacketBufferPtr) bool
- func IPv6(pkt stack.PacketBufferPtr) (proto tcpip.TransportProtocolNumber, fragID uint32, fragOffset uint16, ...)
- func TCP(pkt stack.PacketBufferPtr) bool
- func UDP(pkt stack.PacketBufferPtr) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ARP ¶
func ARP(pkt stack.PacketBufferPtr) bool
ARP populates pkt's network header with an ARP header found in pkt.Data.
Returns true if the header was successfully parsed.
func ICMPv4 ¶
func ICMPv4(pkt stack.PacketBufferPtr) bool
ICMPv4 populates the packet buffer's transport header with an ICMPv4 header, if present.
Returns true if an ICMPv4 header was successfully parsed.
func ICMPv6 ¶
func ICMPv6(pkt stack.PacketBufferPtr) bool
ICMPv6 populates the packet buffer's transport header with an ICMPv4 header, if present.
Returns true if an ICMPv6 header was successfully parsed.
func IPv4 ¶
func IPv4(pkt stack.PacketBufferPtr) bool
IPv4 parses an IPv4 packet found in pkt.Data and populates pkt's network header with the IPv4 header.
Returns true if the header was successfully parsed.
func IPv6 ¶
func IPv6(pkt stack.PacketBufferPtr) (proto tcpip.TransportProtocolNumber, fragID uint32, fragOffset uint16, fragMore bool, ok bool)
IPv6 parses an IPv6 packet found in pkt.Data and populates pkt's network header with the IPv6 header.
func TCP ¶
func TCP(pkt stack.PacketBufferPtr) bool
TCP parses a TCP packet found in pkt.Data and populates pkt's transport header with the TCP header.
Returns true if the header was successfully parsed.
func UDP ¶
func UDP(pkt stack.PacketBufferPtr) bool
UDP parses a UDP packet found in pkt.Data and populates pkt's transport header with the UDP header.
Returns true if the header was successfully parsed.
Types ¶
This section is empty.