types

package
v0.0.0-...-802297c Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Copyright (C) 2019 Cisco Systems Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (C) 2021 Cisco Systems Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (C) 2019 Cisco Systems Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (C) 2020 Cisco Systems Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (C) 2020 Cisco Systems Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	// Family type definitions
	FAMILY_ALL = unix.AF_UNSPEC
	FAMILY_V4  = unix.AF_INET
	FAMILY_V6  = unix.AF_INET6
)
View Source
const InvalidInterface = ^uint32(0)

Variables

This section is empty.

Functions

func GetIPFamily

func GetIPFamily(ip net.IP) int

func IsIP4

func IsIP4(ip net.IP) bool

func IsIP6

func IsIP6(ip net.IP) bool

func StrableListToString

func StrableListToString(prefix string, arg interface{}) string

Types

type IPIPTunnel

type IPIPTunnel struct {
	Src       net.IP
	Dst       net.IP
	TableID   uint32
	SwIfIndex uint32
}

func (*IPIPTunnel) String

func (t *IPIPTunnel) String() string

type IPProto

type IPProto uint8
const (
	TCP IPProto = iota
	UDP
	SCTP
	ICMP
	ICMP6
	INVALID
)

type IPSecSA

type IPSecSA struct {
	SAId         uint32
	Spi          uint32
	Salt         uint32
	CryptoKey    []byte
	IntegrityKey []byte
	SrcPort      int
	DstPort      int
	Tunnel       *Tunnel
	Flags        SaFlags
}

type IPsecTunnelProtection

type IPsecTunnelProtection struct {
	SwIfIndex   uint32
	NextHop     net.IP
	OutSAIndex  uint32
	InSAIndices []uint32
}

type IfAddress

type IfAddress struct {
	IPNet     net.IPNet
	SwIfIndex uint32
}

type SaFlags

type SaFlags uint32

type Tunnel

type Tunnel struct {
	Src     net.IP
	Dst     net.IP
	TableID uint32
}

func (*Tunnel) String

func (t *Tunnel) String() string

type VXLanTunnel

type VXLanTunnel struct {
	SrcAddress     net.IP
	DstAddress     net.IP
	SrcPort        uint16
	DstPort        uint16
	Vni            uint32
	DecapNextIndex uint32
	SwIfIndex      uint32
}

func (*VXLanTunnel) String

func (t *VXLanTunnel) String() string

type VppIPIP

type VppIPIP interface {
	ListIPIPTunnels() ([]*IPIPTunnel, error)
	AddIPIPTunnel(tunnel *IPIPTunnel) (uint32, error)
	DelIPIPTunnel(tunnel *IPIPTunnel) (err error)
}

type VppIpsec

type VppIpsec interface {
	GetIPsecTunnelProtection(tunnelInterface uint32) (protections []IPsecTunnelProtection, err error)
	AddIpsecSA(sa *IPSecSA) error
	DelIpsecSA(sa *IPSecSA) error
	AddIpsecSAProtect(swIfIndex, saIn, saOut uint32) error
	DelIpsecSAProtect(swIfIndex uint32) error
	AddIpsecInterface() (uint32, error)
	DelIpsecInterface(swIfIndex uint32) error
	GetSaFlagNone() SaFlags
	GetSaFlagUseEsn() SaFlags
	GetSaFlagAntiReplay() SaFlags
	GetSaFlagIsTunnel() SaFlags
	GetSaFlagIsTunnelV6() SaFlags
	GetSaFlagUdpEncap() SaFlags
	GetSaFlagIsInbound() SaFlags
	GetSaFlagAsync() SaFlags
}

type WireguardPeer

type WireguardPeer struct {
	PublicKey           []byte
	Port                uint16
	PersistentKeepalive int
	TableID             uint32
	Addr                net.IP
	SwIfIndex           uint32
	Index               uint32
	AllowedIps          []net.IPNet
}

func (*WireguardPeer) AddAllowedIp

func (t *WireguardPeer) AddAllowedIp(addr net.IPNet)

func (*WireguardPeer) DelAllowedIp

func (t *WireguardPeer) DelAllowedIp(addr net.IPNet)

func (*WireguardPeer) Equal

func (t *WireguardPeer) Equal(o *WireguardPeer) bool

func (*WireguardPeer) String

func (t *WireguardPeer) String() string

type WireguardTunnel

type WireguardTunnel struct {
	Addr       net.IP
	Port       uint16
	SwIfIndex  uint32
	PublicKey  []byte
	PrivateKey []byte
}

func (*WireguardTunnel) String

func (t *WireguardTunnel) String() string

Jump to

Keyboard shortcuts

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