libpkt

package
v0.0.0-...-f4239b7 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendPacket

func SendPacket(ovsDriver *ovsdbDriver.OvsDriver, srcPort string, pkt *Packet, numPkts int) error

func VerifyPacket

func VerifyPacket(ovsDriver *ovsdbDriver.OvsDriver, dstPort string, pkt *Packet, ch chan bool, timeout int, numPkts int)

Types

type ArpLayer

type ArpLayer struct {
	AddrType          layers.LinkType
	Protocol          layers.EthernetType
	HwAddressSize     uint8
	ProtAddressSize   uint8
	Operation         uint16
	SourceHwAddress   string
	SourceProtAddress string
	DstHwAddress      string
	DstProtAddress    string
}

type IPv4Layer

type IPv4Layer struct {
	SrcIP string // Src ip address
	DstIP string // dst ip address

	TTL        uint8 // ip TTL
	IHL        uint8
	TOS        uint8
	Length     uint16
	Id         uint16
	Flags      uint8
	FragOffset uint16
	Protocol   layers.IPProtocol
	Checksum   uint16
	Options    []layers.IPv4Option
	Padding    []byte
	// contains filtered or unexported fields
}

type IPv6Layer

type IPv6Layer struct {
	SrcIP string // Src ip address
	DstIP string // dst ip address

	TrafficClass uint8
	FlowLabel    uint32
	Length       uint16
	Protocol     uint8
	HopLimit     uint8
	NextHeader   layers.IPProtocol
	// contains filtered or unexported fields
}

type Packet

type Packet struct {
	SrcMAC string // src mac
	DstMAC string // dst mac
	IPv4   *IPv4Layer
	IPv6   *IPv6Layer
	Arp    *ArpLayer
}

Jump to

Keyboard shortcuts

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