Documentation
¶
Overview ¶
Package testutil builds deterministic, fictional packet-pipeline fixtures.
Index ¶
- func Ethernet(ip []byte) []byte
- func Fragment(ip []byte, id uint32, start, end int, more bool) []byte
- func IP(v6, reverse bool, protocol layers.IPProtocol, payload []byte) []byte
- func Packet(raw []byte, index int, ordinal uint64) gopacket.Packet
- func Serialize(parts ...gopacket.SerializableLayer) []byte
- func TCP(v6, reverse bool, seq, ack uint32, flags string, payload string) []byte
- func Tunnel(kind string, id uint32, inner []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fragment ¶
Fragment returns an IP fragment from an unfragmented datagram. start/end are offsets in the IP payload, so tests can deliberately create overlaps and holes.
func Serialize ¶
func Serialize(parts ...gopacket.SerializableLayer) []byte
Types ¶
This section is empty.