packet

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModifyField

func ModifyField(layer layers.Layer, fieldName string, value interface{}) error

ModifyField dynamically modifies a layer field.

Types

type Packet

type Packet struct {
	Layers []layers.Layer
	Raw    []byte
}

Packet is a structure representing a network packet.

func (*Packet) AddLayers

func (p *Packet) AddLayers(layers ...layers.Layer)

func (*Packet) Build

func (p *Packet) Build() ([]byte, error)

Build converts the packet into a sequence of bytes.

func (*Packet) Dissect

func (p *Packet) Dissect()

Dissect converts received bytes into Layer

func (*Packet) DissectFrom added in v0.4.5

func (p *Packet) DissectFrom()

func (*Packet) Show

func (p *Packet) Show()

Show displays the types of all layers in the package and accesses specific fields via the reflect lib.

func (*Packet) ShowF added in v0.4.0

func (p *Packet) ShowF(filter ...string)

ShowF displays only layers passed as arguments. Other layers are not detailed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL