Documentation
¶
Overview ¶
Package ipset provides interaction with ipset (ipset.netfilter.org)
It runs ipset in interactive mode (ipset -) instead of running the binary on every call.
Example of usage:
package main import ( "github.com/42wim/ipsetd/ipset" "fmt" ) func main() { ipset := NewIPset("/usr/sbin/ipset") fmt.Print(ipset.Cmd("version")) fmt.Print(ipset.Cmd("create abc hash:ip")) fmt.Print(ipset.Cmd("add abc 1.2.3.4")) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPset ¶
type IPset struct {
// contains filtered or unexported fields
}
IPset struct
func NewIPset ¶
NewIPset starts ipset specified with path in interactive mode (ipset - ) and returns a new IPset.
func NewIPsetExtra ¶
func NewWithIgnore ¶
NewWithIgnore starts ipset specified with path in interactive mode (ipset -! - ) with ignore errors and returns a new IPset.
Click to show internal directories.
Click to hide internal directories.