linux_iptables

package
v3.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 6 Imported by: 9

Documentation

Index

Constants

View Source
const ModuleName = "linux.iptables"

ModuleName is the module name used for models.

Variables

View Source
var (
	RuleChain_Protocol_name = map[int32]string{
		0: "IPV4",
		1: "IPV6",
	}
	RuleChain_Protocol_value = map[string]int32{
		"IPV4": 0,
		"IPV6": 1,
	}
)

Enum value maps for RuleChain_Protocol.

View Source
var (
	RuleChain_Table_name = map[int32]string{
		0: "FILTER",
		1: "NAT",
		2: "MANGLE",
		3: "RAW",
		4: "SECURITY",
	}
	RuleChain_Table_value = map[string]int32{
		"FILTER":   0,
		"NAT":      1,
		"MANGLE":   2,
		"RAW":      3,
		"SECURITY": 4,
	}
)

Enum value maps for RuleChain_Table.

View Source
var (
	RuleChain_ChainType_name = map[int32]string{
		0: "CUSTOM",
		1: "INPUT",
		2: "OUTPUT",
		3: "FORWARD",
		4: "PREROUTING",
		5: "POSTROUTING",
	}
	RuleChain_ChainType_value = map[string]int32{
		"CUSTOM":      0,
		"INPUT":       1,
		"OUTPUT":      2,
		"FORWARD":     3,
		"PREROUTING":  4,
		"POSTROUTING": 5,
	}
)

Enum value maps for RuleChain_ChainType.

View Source
var (
	RuleChain_Policy_name = map[int32]string{
		0: "NONE",
		1: "ACCEPT",
		2: "DROP",
		3: "QUEUE",
		4: "RETURN",
	}
	RuleChain_Policy_value = map[string]int32{
		"NONE":   0,
		"ACCEPT": 1,
		"DROP":   2,
		"QUEUE":  3,
		"RETURN": 4,
	}
)

Enum value maps for RuleChain_Policy.

View Source
var File_ligato_linux_iptables_iptables_proto protoreflect.FileDescriptor
View Source
var (
	ModelRuleChain = models.Register(&RuleChain{}, models.Spec{
		Module:  ModuleName,
		Version: "v2",
		Type:    "rulechain",
	}, models.WithNameTemplate("{{.Name}}"))
)

Functions

func RuleChainKey

func RuleChainKey(name string) string

RuleChainKey returns the key used in KV database to store configuration of a particular Linux iptables rule chain.

Types

type RuleChain

type RuleChain struct {
	Name       string                  `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace  *namespace.NetNamespace `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`                                              // network namespace in which this rule chain is applied
	Interfaces []string                `protobuf:"bytes,3,rep,name=interfaces,proto3" json:"interfaces,omitempty"`                                            // list of interfaces referred by the rules (optional)
	Protocol   RuleChain_Protocol      `protobuf:"varint,4,opt,name=protocol,proto3,enum=ligato.linux.iptables.RuleChain_Protocol" json:"protocol,omitempty"` // protocol (address family) of the rule chain
	Table      RuleChain_Table         `protobuf:"varint,5,opt,name=table,proto3,enum=ligato.linux.iptables.RuleChain_Table" json:"table,omitempty"`          // table the rule chain belongs to
	ChainType  RuleChain_ChainType     ``                                                                                                                     // type of the chain
	/* 136-byte string literal not displayed */
	ChainName     string           `protobuf:"bytes,7,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` // name of the chain, used only for chains with CUSTOM chain_type
	DefaultPolicy RuleChain_Policy ``                                                                                         // default policy of the chain. Used for FILTER tables only.
	/* 145-byte string literal not displayed */
	Rules []string `protobuf:"bytes,10,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

func (*RuleChain) Descriptor deprecated

func (*RuleChain) Descriptor() ([]byte, []int)

Deprecated: Use RuleChain.ProtoReflect.Descriptor instead.

func (*RuleChain) GetChainName

func (x *RuleChain) GetChainName() string

func (*RuleChain) GetChainType

func (x *RuleChain) GetChainType() RuleChain_ChainType

func (*RuleChain) GetDefaultPolicy

func (x *RuleChain) GetDefaultPolicy() RuleChain_Policy

func (*RuleChain) GetInterfaces

func (x *RuleChain) GetInterfaces() []string

func (*RuleChain) GetName

func (x *RuleChain) GetName() string

func (*RuleChain) GetNamespace

func (x *RuleChain) GetNamespace() *namespace.NetNamespace

func (*RuleChain) GetProtocol

func (x *RuleChain) GetProtocol() RuleChain_Protocol

func (*RuleChain) GetRules

func (x *RuleChain) GetRules() []string

func (*RuleChain) GetTable

func (x *RuleChain) GetTable() RuleChain_Table

func (*RuleChain) ProtoMessage

func (*RuleChain) ProtoMessage()

func (*RuleChain) ProtoReflect added in v3.2.0

func (x *RuleChain) ProtoReflect() protoreflect.Message

func (*RuleChain) Reset

func (x *RuleChain) Reset()

func (*RuleChain) String

func (x *RuleChain) String() string

type RuleChain_ChainType

type RuleChain_ChainType int32
const (
	RuleChain_CUSTOM      RuleChain_ChainType = 0
	RuleChain_INPUT       RuleChain_ChainType = 1
	RuleChain_OUTPUT      RuleChain_ChainType = 2
	RuleChain_FORWARD     RuleChain_ChainType = 3
	RuleChain_PREROUTING  RuleChain_ChainType = 4
	RuleChain_POSTROUTING RuleChain_ChainType = 5
)

func (RuleChain_ChainType) Descriptor added in v3.2.0

func (RuleChain_ChainType) Enum added in v3.2.0

func (RuleChain_ChainType) EnumDescriptor deprecated

func (RuleChain_ChainType) EnumDescriptor() ([]byte, []int)

Deprecated: Use RuleChain_ChainType.Descriptor instead.

func (RuleChain_ChainType) Number added in v3.2.0

func (RuleChain_ChainType) String

func (x RuleChain_ChainType) String() string

func (RuleChain_ChainType) Type added in v3.2.0

type RuleChain_Policy

type RuleChain_Policy int32
const (
	RuleChain_NONE   RuleChain_Policy = 0
	RuleChain_ACCEPT RuleChain_Policy = 1
	RuleChain_DROP   RuleChain_Policy = 2
	RuleChain_QUEUE  RuleChain_Policy = 3
	RuleChain_RETURN RuleChain_Policy = 4
)

func (RuleChain_Policy) Descriptor added in v3.2.0

func (RuleChain_Policy) Enum added in v3.2.0

func (RuleChain_Policy) EnumDescriptor deprecated

func (RuleChain_Policy) EnumDescriptor() ([]byte, []int)

Deprecated: Use RuleChain_Policy.Descriptor instead.

func (RuleChain_Policy) Number added in v3.2.0

func (RuleChain_Policy) String

func (x RuleChain_Policy) String() string

func (RuleChain_Policy) Type added in v3.2.0

type RuleChain_Protocol

type RuleChain_Protocol int32
const (
	RuleChain_IPV4 RuleChain_Protocol = 0
	RuleChain_IPV6 RuleChain_Protocol = 1
)

func (RuleChain_Protocol) Descriptor added in v3.2.0

func (RuleChain_Protocol) Enum added in v3.2.0

func (RuleChain_Protocol) EnumDescriptor deprecated

func (RuleChain_Protocol) EnumDescriptor() ([]byte, []int)

Deprecated: Use RuleChain_Protocol.Descriptor instead.

func (RuleChain_Protocol) Number added in v3.2.0

func (RuleChain_Protocol) String

func (x RuleChain_Protocol) String() string

func (RuleChain_Protocol) Type added in v3.2.0

type RuleChain_Table

type RuleChain_Table int32
const (
	RuleChain_FILTER   RuleChain_Table = 0
	RuleChain_NAT      RuleChain_Table = 1
	RuleChain_MANGLE   RuleChain_Table = 2
	RuleChain_RAW      RuleChain_Table = 3
	RuleChain_SECURITY RuleChain_Table = 4
)

func (RuleChain_Table) Descriptor added in v3.2.0

func (RuleChain_Table) Enum added in v3.2.0

func (x RuleChain_Table) Enum() *RuleChain_Table

func (RuleChain_Table) EnumDescriptor deprecated

func (RuleChain_Table) EnumDescriptor() ([]byte, []int)

Deprecated: Use RuleChain_Table.Descriptor instead.

func (RuleChain_Table) Number added in v3.2.0

func (RuleChain_Table) String

func (x RuleChain_Table) String() string

func (RuleChain_Table) Type added in v3.2.0

Jump to

Keyboard shortcuts

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