parse

package
v1.4.25 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CommitBytes is the string "COMMIT" in bytes array
	CommitBytes = []byte("COMMIT")
	// SpaceBytes is white space in bytes array
	SpaceBytes = []byte(" ")
	// MinOptionLength indicates the minimum length of an option
	MinOptionLength = 2
)

Functions

func Iptables

func Iptables(tableName string) (*NPMIPtable.Table, error)

Iptables creates a Go object from specified iptable by calling iptables-save within node.

func IptablesFile

func IptablesFile(tableName string, iptableSaveFile string) (*NPMIPtable.Table, error)

IptablesFile creates a Go object from specified iptable by reading from an iptables-save file.

func Line

func Line(readIndex int, iptableBuffer []byte) ([]byte, int)

Line parses the line starting from the given readIndex of the iptableBuffer. Returns a slice of line starting from given read index and the next index to read from.

Types

This section is empty.

Jump to

Keyboard shortcuts

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