arp

package
v1.11.0-cni-plu...-b48975e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const KeySize = 8
View Source
const KeyV6Size = 20
View Source
const ValueSize = 12
View Source
const ValueV6Size = ValueSize

Variables

View Source
var MapParams = maps.MapParameters{
	Type:       "lru_hash",
	KeySize:    KeySize,
	ValueSize:  ValueSize,
	MaxEntries: 10000,
	Name:       "cali_v4_arp",
	Version:    2,
}
View Source
var MapV6Params = maps.MapParameters{
	Type:       "lru_hash",
	KeySize:    KeyV6Size,
	ValueSize:  ValueV6Size,
	MaxEntries: 10000,
	Name:       "cali_v6_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

func MapMemIterV6

func MapMemIterV6(m MapMemV6) maps.IterCallback

MapMemIterV6 returns maps.MapIter that loads the provided MapMem

func MapV6

func MapV6() maps.Map

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 KeyV6

type KeyV6 [KeyV6Size]byte

func NewKeyV6

func NewKeyV6(ip net.IP, ifIndex uint32) KeyV6

func (KeyV6) AsBytes

func (k KeyV6) AsBytes() []byte

func (KeyV6) IP

func (k KeyV6) IP() net.IP

func (KeyV6) IfIndex

func (k KeyV6) IfIndex() uint32

func (KeyV6) String

func (k KeyV6) String() string

type MapMem

type MapMem map[Key]Value

func LoadMapMem

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

LoadMapMem loads ConntrackMap into memory

type MapMemV6

type MapMemV6 map[KeyV6]ValueV6

func LoadMapMemV6

func LoadMapMemV6(m maps.Map) (MapMemV6, 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

type ValueV6

type ValueV6 = Value

Jump to

Keyboard shortcuts

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