Documentation
¶
Overview ¶
Package ipset provides a basic wrapper to the ipset utility for IPTables. More information about ipset can be found at: http://ipset.netfilter.org/index.html
Index ¶
- type IPSet
- func (set *IPSet) Add(name string, entry string, options ...string) error
- func (set *IPSet) AddUnique(name, entry string, options ...string) error
- func (set *IPSet) Create(name string, typ string, options ...string) error
- func (set *IPSet) Delete(name string, entry string, options ...string) error
- func (set *IPSet) Destroy(name string) error
- func (set *IPSet) Flush(name string) error
- func (set *IPSet) Rename(from string, to string) error
- func (set *IPSet) Restore(filename string) error
- func (set *IPSet) Save(name string, filename string) error
- func (set *IPSet) Swap(from string, to string) error
- func (set *IPSet) Test(name string, entry string, options ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPSet ¶
func (*IPSet) AddUnique ¶
AddUnique adds a new entry to the named set, if it does not already exist.
func (*IPSet) Create ¶
Create creates a new ipset with a given name and type. For more on set types, please see: http://ipset.netfilter.org/ipset.man.html#lbAT. Additional options can be passed to the Create() command. These options must be passed in a sequential key, value order. For example, ipset.Create("test", "hash:ip", "timeout", "300") will add a new set with the timeout option set to a value of 300.
Click to show internal directories.
Click to hide internal directories.