test_linux

package
v0.0.0-...-ac9ef1f Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

vxlan_linux.go NOTE: this is meant for testing, it should eventually live in asicd

Index

Constants

This section is empty.

Variables

View Source
var VxlanConfigMode string = "proxy"

options "proxy", "linux" TODO eventually read this from config file

View Source
var VxlanDB map[uint32]VxlanDbEntry

Functions

This section is empty.

Types

type VtepConfig

type VtepConfig struct {
	Vni                   uint32           `SNAPROUTE: KEY` //VxLAN ID.
	VtepName              string           //VTEP instance name.
	SrcIfName             string           //Source interface ifIndex.
	UDP                   uint16           //vxlan udp port.  Deafult is the iana default udp port
	TTL                   uint16           //TTL of the Vxlan tunnel
	TOS                   uint16           //Type of Service
	InnerVlanHandlingMode int32            //The inner vlan tag handling mode.
	Learning              bool             //specifies if unknown source link layer  addresses and IP addresses are entered into the VXLAN  device forwarding database.
	Rsc                   bool             //specifies if route short circuit is turned on.
	L2miss                bool             //specifies if netlink LLADDR miss notifications are generated.
	L3miss                bool             //specifies if netlink IP ADDR miss notifications are generated.
	TunnelSrcIp           net.IP           //Source IP address for the static VxLAN tunnel
	TunnelDstIp           net.IP           //Destination IP address for the static VxLAN tunnel
	VlanId                uint16           //Vlan Id to encapsulate with the vtep tunnel ethernet header
	TunnelSrcMac          net.HardwareAddr //Src Mac assigned to the VTEP within this VxLAN. If an address is not assigned the the local switch address will be used.
	TunnelDstMac          net.HardwareAddr
}

tunnel endpoint for the VxLAN

type VxlanConfig

type VxlanConfig struct {
	VNI    uint32
	VlanId uint16 // used to tag inner ethernet frame when egressing
	Group  net.IP // multicast group IP
	MTU    uint32 // MTU size for each VTEP
}

bridge for the VNI

type VxlanDbEntry

type VxlanDbEntry struct {
	VNI    uint32
	VlanId uint16 // used to tag inner ethernet frame when egressing
	Group  net.IP // multicast group IP
	MTU    uint32 // MTU size for each VTEP
	Brg    *netlink.Bridge
	Links  []*netlink.Link
}

type VxlanLinux

type VxlanLinux struct {
	// contains filtered or unexported fields
}

func NewVxlanLinux

func NewVxlanLinux(logger *logging.Writer) *VxlanLinux

func (*VxlanLinux) CreateVtep

func (v *VxlanLinux) CreateVtep(c *VtepConfig)

func (*VxlanLinux) CreateVxLAN

func (v *VxlanLinux) CreateVxLAN(c *VxlanConfig)

createVxLAN is the equivalent to creating a bridge in the linux The VNI is actually associated with the VTEP so lets just create a bridge if necessary

func (*VxlanLinux) DeleteVtep

func (v *VxlanLinux) DeleteVtep(c *VtepConfig)

func (*VxlanLinux) DeleteVxLAN

func (v *VxlanLinux) DeleteVxLAN(c *VxlanConfig)

func (*VxlanLinux) LearnFdbVtep

func (v *VxlanLinux) LearnFdbVtep(mac string, vtepname string, ifindex int32)

type VxlanMacDbEntry

type VxlanMacDbEntry struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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