Documentation ¶
Overview ¶
Package ipset is a library providing a wrapper to the IPtables ipset userspace utility
Index ¶
- func DestroyAll() error
- func Swap(from, to string) error
- type IPSet
- func (s *IPSet) Add(entry string, timeout int) error
- func (s *IPSet) AddOption(entry string, option string, timeout int) error
- func (s *IPSet) Del(entry string) error
- func (s *IPSet) Destroy() error
- func (s *IPSet) Flush() error
- func (s *IPSet) List() ([]string, error)
- func (s *IPSet) Refresh(entries []string) error
- func (s *IPSet) Test(entry string) (bool, error)
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IPSet ¶
type IPSet struct { Name string HashType string HashFamily string HashSize int MaxElem int Timeout int }
IPSet implements an Interface to an set.
func New ¶
New creates a new set and returns an Interface to it. Example:
testIpset := ipset.New("test", "hash:ip", &ipset.Params{})
func (*IPSet) Add ¶
Add is used to add the specified entry to the set. A timeout of 0 means that the entry will be stored permanently in the set.
func (*IPSet) AddOption ¶ added in v0.1.1
AddOption is used to add the specified entry to the set. A timeout of 0 means that the entry will be stored permanently in the set.
Click to show internal directories.
Click to hide internal directories.