Version: v1.8.0 Latest Latest

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 4 Imported by: 0




This section is empty.


This section is empty.


func GetDstMacAddressFromPacket added in v0.0.2

func GetDstMacAddressFromPacket(packet gopacket.Packet) (net.HardwareAddr, error)

returns the Destination Mac Address contained in the packet

func GetPbit added in v1.0.0

func GetPbit(pkt gopacket.Packet) (uint8, error)

func GetSrcMacAddressFromPacket added in v0.0.2

func GetSrcMacAddressFromPacket(packet gopacket.Packet) (net.HardwareAddr, error)

returns the Source Mac Address contained in the packet

func GetTagsFromPacket added in v1.4.0

func GetTagsFromPacket(pkt gopacket.Packet) (uint16, uint16, error)

godet inner and outer tag from a packet TODO unit test

func GetVlanTag added in v0.0.2

func GetVlanTag(pkt gopacket.Packet) (uint16, error)

func IsDhcpPacket

func IsDhcpPacket(pkt gopacket.Packet) bool

func IsIgmpPacket added in v1.0.0

func IsIgmpPacket(pkt gopacket.Packet) bool

func IsIncomingPacket

func IsIncomingPacket(packet gopacket.Packet) bool

return true if the packet is coming in the OLT from the DHCP Server given that we only check DHCP packets we can use the Operation Request are outgoing (toward the server) Replies are incoming (toward the OLT)

func IsLldpPacket added in v0.0.5

func IsLldpPacket(pkt gopacket.Packet) bool

func PopDoubleTag

func PopDoubleTag(pkt gopacket.Packet) (gopacket.Packet, error)

func PopSingleTag

func PopSingleTag(pkt gopacket.Packet) (gopacket.Packet, error)

func PushDoubleTag added in v0.0.2

func PushDoubleTag(stag int, ctag int, pkt gopacket.Packet, pbit uint8) (gopacket.Packet, error)

func PushSingleTag

func PushSingleTag(tag int, pkt gopacket.Packet, pbit uint8) (gopacket.Packet, error)


type PacketType added in v0.0.2

type PacketType int
const (
	UNKNOWN PacketType = iota

func GetPktType added in v1.0.0

func GetPktType(pkt gopacket.Packet) (PacketType, error)

returns wether it's an EAPOL or DHCP packet, error if it's none

func (PacketType) String added in v0.0.2

func (t PacketType) String() string

Jump to

Keyboard shortcuts

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