Documentation
¶
Index ¶
- Constants
- type BaseRule
- type Chain
- func (c *Chain) AddRule(cpl *CompleteRule) error
- func (c *Chain) AppendRule(cpl *CompleteRule) error
- func (c *Chain) Clear() error
- func (c *Chain) CreateChild(name string, index int, cpl *CompleteRule) (*Chain, error)
- func (c *Chain) DelChild(child *Chain) error
- func (c *Chain) DelRule(cpl *CompleteRule) error
- func (c *Chain) DelRuleByIndex(index int) error
- func (c *Chain) ExistRule(cpl *CompleteRule) bool
- func (c *Chain) GetChildrenCount() int
- func (c *Chain) GetCreateChildIndex(name string) (int, bool)
- func (c *Chain) GetRuleByIndex(index int) *CompleteRule
- func (c *Chain) GetRulesCount() int
- func (c *Chain) InsertRule(index int, cpl *CompleteRule) error
- func (c *Chain) Remove() error
- type CompleteRule
- type ExtendsElem
- type ExtendsRule
- type Manager
- type Operation
- type Table
Constants ¶
View Source
const ( ACCEPT = "ACCEPT" DROP = "DROP" RETURN = "RETURN" QUEUE = "QUEUE" REDIRECT = "REDIRECT" TPROXY = "TPROXY" MARK = "MARK" )
action
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct { // chain name Name string // PREROUTING,INPUT,FORWARD,OUTPUT,POSTROUTING or self define chain // contains filtered or unexported fields }
chain
func (*Chain) CreateChild ¶
create child chain
func (*Chain) GetCreateChildIndex ¶
current create child index
func (*Chain) GetRuleByIndex ¶
func (c *Chain) GetRuleByIndex(index int) *CompleteRule
get rule index
func (*Chain) InsertRule ¶
func (c *Chain) InsertRule(index int, cpl *CompleteRule) error
insert rule
type CompleteRule ¶
type CompleteRule struct { Action string BaseSl []BaseRule ExtendsSl []ExtendsRule }
one complete rule
func (*CompleteRule) String ¶
func (cpl *CompleteRule) String() string
make string -j ACCEPT -s 1111.2222.3333.4444 -m mark --mark 1
type ExtendsElem ¶
extends elem
type ExtendsRule ¶
type ExtendsRule struct { Match string // -m Elem ExtendsElem // mark --mark 1 }
extends rule
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.