ipsec

package
v2.6.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

package IPsec provides primitives for establishing IPsec in the fastdp mode.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPSec

type IPSec struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(log *logrus.Logger) (*IPSec, error)

func (*IPSec) Destroy

func (ipsec *IPSec) Destroy(localPeer, remotePeer mesh.PeerName, connUID uint64, localIP, remoteIP net.IP, udpPort int) error

Destroy destroys any (inbound / outbound) ipsec establishment between the peers.

func (*IPSec) Flush

func (ipsec *IPSec) Flush(destroy bool) error

Flush removes all policies/SAs established by us. Also, it removes chains and rules of iptables.

If destroy is true, the chains and the rules won't be re-created.

func (*IPSec) InitSALocal

func (ipsec *IPSec) InitSALocal(localPeer, remotePeer mesh.PeerName, connUID uint64, localIP, remoteIP net.IP, udpPort int, sessionKey *[32]byte) ([]byte, error)

InitSALocal initializes inbound ipsec from remotePeer and triggers the initialization on remotePeer.

func (*IPSec) InitSARemote

func (ipsec *IPSec) InitSARemote(msgInitSARemote []byte, localPeer, remotePeer mesh.PeerName, connUID uint64, localIP, remoteIP net.IP, udpPort int, sessionKey *[32]byte) error

InitSARemote initializes outbound ipsec to remotePeer. Triggered by remotePeer.

type SPI

type SPI uint32

Jump to

Keyboard shortcuts

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