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
- func GetIPFamily(ip net.IP) int
- func IsIP4(ip net.IP) bool
- func IsIP6(ip net.IP) bool
- func StrableListToString(prefix string, arg interface{}) string
- type IPIPTunnel
- type IPProto
- type IPSecSA
- type IPsecTunnelProtection
- type IfAddress
- type SaFlags
- type Tunnel
- type VXLanTunnel
- type VppIPIP
- type VppIpsec
- type WireguardPeer
- type WireguardTunnel
Constants ¶
const ( // Family type definitions FAMILY_ALL = unix.AF_UNSPEC FAMILY_V4 = unix.AF_INET FAMILY_V6 = unix.AF_INET6 )
const InvalidInterface = ^uint32(0)
Variables ¶
This section is empty.
Functions ¶
func GetIPFamily ¶
func StrableListToString ¶
Types ¶
type IPIPTunnel ¶
func (*IPIPTunnel) String ¶
func (t *IPIPTunnel) String() string
type IPsecTunnelProtection ¶
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