dhcp

package
Version: v1.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDhcpLayer added in v0.0.2

func GetDhcpLayer(pkt gopacket.Packet) (*layers.DHCPv4, error)

func GetDhcpMessageType added in v0.0.2

func GetDhcpMessageType(dhcp *layers.DHCPv4) (layers.DHCPMsgType, error)

func GetDhcpPacketType added in v0.0.2

func GetDhcpPacketType(pkt gopacket.Packet) (string, error)

returns the DHCP Layer type or error if it's not a DHCP Packet

func HandleNextBbrPacket added in v0.0.2

func HandleNextBbrPacket(onuId uint32, ponPortId uint32, serialNumber string, doneChannel chan bool, pkt gopacket.Packet, client openolt.OpenoltClient) error

This method handle the BBR DHCP Packets BBR does not need to do anything but forward the packets in the correct direction

func HandleNextPacket added in v0.0.2

func HandleNextPacket(onuId uint32, ponPortId uint32, serviceName string, serialNumber string, portNo uint32,
	cTag int, gemPortId uint32, uniId uint32, onuHwAddress net.HardwareAddr, onuStateMachine *fsm.FSM,
	pkt gopacket.Packet, pbit uint8, stream bbsim.Stream) error

func SendDHCPDiscovery added in v0.0.2

func SendDHCPDiscovery(ponPortId uint32, onuId uint32, serviceName string, cTag int, gemPortId uint32,
	serialNumber string, portNo uint32, uniId uint32, stateMachine *fsm.FSM, onuHwAddress net.HardwareAddr,
	pbit uint8, stream bbsim.Stream) error

Types

type DHCPServer added in v1.4.0

type DHCPServer struct {
	DHCPServerMacAddress net.HardwareAddr
}

func NewDHCPServer added in v1.4.0

func NewDHCPServer() *DHCPServer

func (DHCPServer) HandleServerPacket added in v1.4.0

func (s DHCPServer) HandleServerPacket(pkt gopacket.Packet) (gopacket.Packet, error)

HandleServerPacket is a very simple implementation of a DHCP server that only replies to DHCPDiscover and DHCPRequest packets

type DHCPServerIf added in v1.4.0

type DHCPServerIf interface {
	HandleServerPacket(pkt gopacket.Packet) (gopacket.Packet, error)
}

Jump to

Keyboard shortcuts

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