packet

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Overview

Package packet contains common utilities for formatting packets using gopacket.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ARPRequestPacket

func ARPRequestPacket(theirIP []byte, ourMAC []byte, ourIP []byte) ([]byte, error)

ARPRequestPacket returns packet bytes with an ARP request for the specified IP address

func ControllerLLDPPacket

func ControllerLLDPPacket(chassisID string, egressPort uint32) ([]byte, error)

ControllerLLDPPacket returns packet bytes for an ONOS link discovery packet

func IP

func IP(addr string) []byte

IP returns the given IP address as bytes

func IPString

func IPString(addr []byte) string

IPString returns a string representation of an IP address

func MAC

func MAC(addr string) []byte

MAC returns the given MAC address as bytes

func MACString

func MACString(addr []byte) string

MACString returns a string representation of a MAC address

Types

This section is empty.

Jump to

Keyboard shortcuts

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