proxy

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(cb bpf.DumpCallback) error

func GC

func GC() int

Types

type LogRecord

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

type Proxy

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

func NewProxy

func NewProxy(minPort uint16, maxPort uint16) *Proxy

func (*Proxy) CreateOrUpdateRedirect

func (p *Proxy) CreateOrUpdateRedirect(l4 *policy.L4Filter, id string, source ProxySource) (*Redirect, error)

func (*Proxy) RemoveRedirect

func (p *Proxy) RemoveRedirect(id string) error

type Proxy4Key

type Proxy4Key struct {
	SAddr   types.IPv4
	DPort   uint16
	SPort   uint16
	Nexthdr uint8
}

func (*Proxy4Key) Convert

func (k *Proxy4Key) Convert() *Proxy4Key

func (*Proxy4Key) GetKeyPtr

func (k *Proxy4Key) GetKeyPtr() unsafe.Pointer

func (*Proxy4Key) HostPort

func (k *Proxy4Key) HostPort() string

func (Proxy4Key) NewValue

func (k Proxy4Key) NewValue() bpf.MapValue

func (*Proxy4Key) String

func (k *Proxy4Key) String() string

type Proxy4Value

type Proxy4Value struct {
	OrigDAddr types.IPv4
	OrigDPort uint16
	Lifetime  uint16
}

func LookupEgress4

func LookupEgress4(key *Proxy4Key) (*Proxy4Value, error)

func (*Proxy4Value) Convert

func (k *Proxy4Value) Convert() *Proxy4Value

func (*Proxy4Value) GetValuePtr

func (v *Proxy4Value) GetValuePtr() unsafe.Pointer

func (*Proxy4Value) HostPort

func (p *Proxy4Value) HostPort() string

func (*Proxy4Value) String

func (v *Proxy4Value) String() string

type ProxySource

type ProxySource interface {
}

type Redirect

type Redirect struct {
	FromPort uint16
	ToPort   uint16
	Rules    []policy.AuxRule
	// contains filtered or unexported fields
}

func (*Redirect) Log

func (r *Redirect) Log(l *LogRecord, code int, reason string)

Jump to

Keyboard shortcuts

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