pinhole

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Overview

Package pinhole provides networkservice.NetworkService{Client,Server} chain elements for ensuring remote mechanism packets get through any ACLs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteExtra added in v1.7.0

func DeleteExtra(ctx context.Context, isClient bool)

DeleteExtra deletes an extra IPPort stored in per Connection.Id metadata

func NewClient

func NewClient(vppConn api.Connection, opts ...Option) networkservice.NetworkServiceClient

NewClient - returns a new client that will set an ACL permitting remote protocols packets through if and only if there's an ACL on the interface

func NewServer

func NewServer(vppConn api.Connection, opts ...Option) networkservice.NetworkServiceServer

NewServer - returns a new client that will set an ACL permitting remote protocols packets through if and only if there's an ACL on the interface

func StoreExtra added in v1.7.0

func StoreExtra(ctx context.Context, isClient bool, ipPort *IPPort)

StoreExtra sets an extra IPPort stored in per Connection.Id metadata.

Types

type IPPort added in v1.7.0

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

IPPort stores IP and port for an ACL rule

func LoadExtra added in v1.7.0

func LoadExtra(ctx context.Context, isClient bool) (value *IPPort, ok bool)

LoadExtra returns an extra IPPort stored in per Connection.Id metadata, or nil if no value is present. The ok result indicates whether value was found in the per Connection.Id metadata.

func NewIPPort added in v1.7.0

func NewIPPort(ip string, port uint16) *IPPort

NewIPPort returns *IPPort entry

func (*IPPort) IP added in v1.7.0

func (i *IPPort) IP() net.IP

IP - converts string to net.IP

func (*IPPort) Port added in v1.7.0

func (i *IPPort) Port() uint16

Port - returns port

type Option added in v1.7.0

type Option func(*option)

Option - options for the pinhole chain element

func WithSharedMutex added in v1.7.0

func WithSharedMutex(mutex *sync.Mutex) Option

WithSharedMutex - set shared mutex between client and server chain elements. This is necessary because the pinhole chain element dumps VPP, performs some manipulations and reassign ACL rules. Possible data race.

Jump to

Keyboard shortcuts

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