iptables

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain struct {
	Policy  string
	Packets uint64
	Bytes   uint64
	Rules   []Rule
}

type ParseError

type ParseError struct {
	Message    string
	LineNumber int
	LineText   string
}

func (ParseError) Error

func (e ParseError) Error() string

type Rule

type Rule struct {
	Destination     string
	DestinationPort int
	Bytes           uint64
	Match           string // tcp, owner
	Packets         uint64
	Protocol        string // tcp/udp
	Source          string
	SourcePort      int
	Target          string // ACCEPT, DROP
	ChefSync        string // is rule from chef?
}

type Table

type Table map[string]Chain

type Tables

type Tables map[string]Table

func GetTables

func GetTables() (Tables, error)

func ParseIptablesFile added in v0.3.5

func ParseIptablesFile(r io.Reader) (Tables, error)

func ParseIptablesSave

func ParseIptablesSave(r io.Reader) (Tables, error)

Jump to

Keyboard shortcuts

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