linux_iptables

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "linux.iptables"

ModuleName is the module name used for models.

Variables

View Source
var (
	ModelRuleChain = models.Register(&RuleChain{}, models.Spec{
		Module:  ModuleName,
		Version: "v2",
		Type:    "rulechain",
	}, models.WithNameTemplate("{{.Name}}"))
)
View Source
var RuleChain_ChainType_name = map[int32]string{
	0: "CUSTOM",
	1: "INPUT",
	2: "OUTPUT",
	3: "FORWARD",
	4: "PREROUTING",
	5: "POSTROUTING",
}
View Source
var RuleChain_ChainType_value = map[string]int32{
	"CUSTOM":      0,
	"INPUT":       1,
	"OUTPUT":      2,
	"FORWARD":     3,
	"PREROUTING":  4,
	"POSTROUTING": 5,
}
View Source
var RuleChain_Policy_name = map[int32]string{
	0: "NONE",
	1: "ACCEPT",
	2: "DROP",
	3: "QUEUE",
	4: "RETURN",
}
View Source
var RuleChain_Policy_value = map[string]int32{
	"NONE":   0,
	"ACCEPT": 1,
	"DROP":   2,
	"QUEUE":  3,
	"RETURN": 4,
}
View Source
var RuleChain_Protocol_name = map[int32]string{
	0: "IPv4",
	1: "IPv6",
}
View Source
var RuleChain_Protocol_value = map[string]int32{
	"IPv4": 0,
	"IPv6": 1,
}
View Source
var RuleChain_Table_name = map[int32]string{
	0: "FILTER",
	1: "NAT",
	2: "MANGLE",
	3: "RAW",
	4: "SECURITY",
}
View Source
var RuleChain_Table_value = map[string]int32{
	"FILTER":   0,
	"NAT":      1,
	"MANGLE":   2,
	"RAW":      3,
	"SECURITY": 4,
}

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"`
	Interfaces           []string                `protobuf:"bytes,3,rep,name=interfaces,proto3" json:"interfaces,omitempty"`
	Protocol             RuleChain_Protocol      `protobuf:"varint,4,opt,name=protocol,proto3,enum=linux.iptables.RuleChain_Protocol" json:"protocol,omitempty"`
	Table                RuleChain_Table         `protobuf:"varint,5,opt,name=table,proto3,enum=linux.iptables.RuleChain_Table" json:"table,omitempty"`
	ChainType            RuleChain_ChainType     `` /* 129-byte string literal not displayed */
	ChainName            string                  `protobuf:"bytes,7,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"`
	DefaultPolicy        RuleChain_Policy        `` /* 138-byte string literal not displayed */
	Rules                []string                `protobuf:"bytes,10,rep,name=rules,proto3" json:"rules,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*RuleChain) Descriptor

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

func (*RuleChain) GetChainName

func (m *RuleChain) GetChainName() string

func (*RuleChain) GetChainType

func (m *RuleChain) GetChainType() RuleChain_ChainType

func (*RuleChain) GetDefaultPolicy

func (m *RuleChain) GetDefaultPolicy() RuleChain_Policy

func (*RuleChain) GetInterfaces

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

func (*RuleChain) GetName

func (m *RuleChain) GetName() string

func (*RuleChain) GetNamespace

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

func (*RuleChain) GetProtocol

func (m *RuleChain) GetProtocol() RuleChain_Protocol

func (*RuleChain) GetRules

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

func (*RuleChain) GetTable

func (m *RuleChain) GetTable() RuleChain_Table

func (*RuleChain) ProtoMessage

func (*RuleChain) ProtoMessage()

func (*RuleChain) Reset

func (m *RuleChain) Reset()

func (*RuleChain) String

func (m *RuleChain) String() string

func (*RuleChain) XXX_DiscardUnknown

func (m *RuleChain) XXX_DiscardUnknown()

func (*RuleChain) XXX_Marshal

func (m *RuleChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RuleChain) XXX_Merge

func (m *RuleChain) XXX_Merge(src proto.Message)

func (*RuleChain) XXX_MessageName

func (*RuleChain) XXX_MessageName() string

func (*RuleChain) XXX_Size

func (m *RuleChain) XXX_Size() int

func (*RuleChain) XXX_Unmarshal

func (m *RuleChain) XXX_Unmarshal(b []byte) error

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) EnumDescriptor

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

func (RuleChain_ChainType) String

func (x RuleChain_ChainType) String() string

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) EnumDescriptor

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

func (RuleChain_Policy) String

func (x RuleChain_Policy) String() string

type RuleChain_Protocol

type RuleChain_Protocol int32
const (
	RuleChain_IPv4 RuleChain_Protocol = 0
	RuleChain_IPv6 RuleChain_Protocol = 1
)

func (RuleChain_Protocol) EnumDescriptor

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

func (RuleChain_Protocol) String

func (x RuleChain_Protocol) String() string

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) EnumDescriptor

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

func (RuleChain_Table) String

func (x RuleChain_Table) String() string

Jump to

Keyboard shortcuts

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