kubernetes: k8s.io/kubernetes/pkg/util/ebtables Index | Files

package ebtables

import "k8s.io/kubernetes/pkg/util/ebtables"

Index

Package Files

ebtables.go

type Chain Uses

type Chain string
const (
    ChainPostrouting Chain = "POSTROUTING"
    ChainPrerouting  Chain = "PREROUTING"
    ChainOutput      Chain = "OUTPUT"
    ChainInput       Chain = "INPUT"
)

type Interface Uses

type Interface interface {
    // GetVersion returns the "X.Y.Z" semver string for ebtables.
    GetVersion() (string, error)
    // EnsureRule checks if the specified rule is present and, if not, creates it.  If the rule existed, return true.
    // WARNING: ebtables does not provide check operation like iptables do. Hence we have to do a string match of args.
    // Input args must follow the format and sequence of ebtables list output. Otherwise, EnsureRule will always create
    // new rules and causing duplicates.
    EnsureRule(position RulePosition, table Table, chain Chain, args ...string) (bool, error)
    // EnsureChain checks if the specified chain is present and, if not, creates it.  If the rule existed, return true.
    EnsureChain(table Table, chain Chain) (bool, error)
    // DeleteChain deletes the specified chain.  If the chain did not exist, return error.
    DeleteChain(table Table, chain Chain) error
    // FlushChain flush the specified chain.  If the chain did not exist, return error.
    FlushChain(table Table, chain Chain) error
}

An injectable interface for running ebtables commands. Implementations must be goroutine-safe.

func New Uses

func New(exec utilexec.Interface) Interface

New returns a new Interface which will exec ebtables.

type RulePosition Uses

type RulePosition string
const (
    Prepend RulePosition = "-I"
    Append  RulePosition = "-A"
)

type Table Uses

type Table string
const (
    TableNAT    Table = "nat"
    TableFilter Table = "filter"
)

Package ebtables imports 5 packages (graph) and is imported by 39 packages. Updated 2019-09-26. Refresh now. Tools for package owners.