packet_dumper

package
v0.0.0-...-a933497 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watch

func Watch(interfaceName, filter string, callback func(output Output) error) error

Types

type Output

type Output struct {
	Timestamp  time.Time  `json:"timestamp"`
	PacketData PacketData `json:"packet_data"`
}

type PacketData

type PacketData struct {
	Timestamp       time.Time `json:"timestamp"`
	Protocol        string    `json:"protocol"`
	SourceMAC       string    `json:"source_mac"`
	DestinationMAC  string    `json:"destination_mac"`
	SourceIP        string    `json:"source_ip"`
	DestinationIP   string    `json:"destination_ip"`
	SourcePort      int       `json:"source_port"`
	DestinationPort int       `json:"destination_port"`
	Length          int       `json:"length"`
}

Jump to

Keyboard shortcuts

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