arp

package
v0.0.0-...-21cfbab Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const KeySize = 8
View Source
const ValueSize = 12

Variables

View Source
var MapParams = maps.MapParameters{
	Type:       "lru_hash",
	KeySize:    KeySize,
	ValueSize:  ValueSize,
	MaxEntries: 10000,
	Name:       "cali_v4_arp",
	Version:    2,
}

Functions

func Map

func Map() maps.Map

func MapMemIter

func MapMemIter(m MapMem) maps.IterCallback

MapMemIter returns maps.MapIter that loads the provided MapMem

Types

type Key

type Key [KeySize]byte

func NewKey

func NewKey(ip net.IP, ifIndex uint32) Key

func (Key) AsBytes

func (k Key) AsBytes() []byte

func (Key) IP

func (k Key) IP() net.IP

func (Key) IfIndex

func (k Key) IfIndex() uint32

func (Key) String

func (k Key) String() string

type MapMem

type MapMem map[Key]Value

func LoadMapMem

func LoadMapMem(m maps.Map) (MapMem, error)

LoadMapMem loads ConntrackMap into memory

type Value

type Value [ValueSize]byte

func NewValue

func NewValue(macSrc, macDst net.HardwareAddr) Value

func (Value) AsBytes

func (v Value) AsBytes() []byte

func (Value) DstMAC

func (v Value) DstMAC() net.HardwareAddr

func (Value) SrcMAC

func (v Value) SrcMAC() net.HardwareAddr

func (Value) String

func (v Value) String() string

Jump to

Keyboard shortcuts

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