iptables

package
v0.333.2-candidate Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2016 License: Apache-2.0 Imports: 10 Imported by: 32

Documentation

Index

Constants

View Source
const (
	Return    Action = "RETURN"
	SourceNAT        = "SNAT"
	Reject           = "REJECT"
	Drop             = "DROP"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string

type Chain

type Chain interface {
	// Create the actual iptable chains in the underlying system.
	// logPrefix defines the log prefix used for logging this chain.
	Setup(logPrefix string) error

	// Destroy the actual iptable chains in the underlying system
	TearDown() error

	AppendRule(source string, destination string, jump Action) error
	DeleteRule(source string, destination string, jump Action) error

	AppendNatRule(source string, destination string, jump Action, to net.IP) error
	DeleteNatRule(source string, destination string, jump Action, to net.IP) error

	PrependFilterRule(rule garden.NetOutRule) error
}

func NewGlobalChain

func NewGlobalChain(name string, runner command_runner.CommandRunner, logger lager.Logger) Chain

NewGlobalChain creates a chain without an associated log chain. The chain is not created by this package (currently it is created in net.sh). It is an error to attempt to call Setup on this chain.

func NewLoggingChain

func NewLoggingChain(name string, useKernelLogging bool, runner command_runner.CommandRunner, logger lager.Logger) Chain

NewLoggingChain creates a chain with an associated log chain. This allows NetOut calls with the 'log' parameter to succesfully log.

type Destroyable

type Destroyable interface {
	Destroy() error
}

type Type

type Type string
const (
	Nat Type = "nat"
)

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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