kubernetes/pkg/util/iptables/testing/parse.go

type IPTablesDump

type Table

type Chain

var declareTableRegex

var declareChainRegex

var addRuleRegex

var deleteChainRegex

type parseState

const parseTableDeclaration

const parseChainDeclarations

const parseChains

// ParseIPTablesDump parses an IPTables rules dump. Note: this may ignore some bad data.
func ParseIPTablesDump(data string) (*IPTablesDump, error) {}

func (dump *IPTablesDump) String() string {}

func (dump *IPTablesDump) GetTable(table iptables.Table) (*Table, error) {}

func (dump *IPTablesDump) GetChain(table iptables.Table, chain iptables.Chain) (*Chain, error) {}

type Rule

type IPTablesValue

// for debugging; otherwise %v will just print the pointer value
func (v *IPTablesValue) String() string {}

// Matches returns true if cmp equals / doesn't equal v.Value (depending on
// v.Negated).
func (v *IPTablesValue) Matches(cmp string) bool {}

// findParamField finds a field in value with the struct tag "param:${param}" and if found,
// returns a pointer to the Value of that field, and the value of its "negatable" tag.
func findParamField(value reflect.Value, param string) (*reflect.Value, bool) {}

var wordRegex

var boolPtrType

var ipTablesValuePtrType

// ParseRule parses rule. If strict is false, it will parse the recognized
// parameters and ignore unrecognized ones. If it is true, parsing will fail if there are
// unrecognized parameters.
func ParseRule(rule string, strict bool) (*Rule, error) {}