Documentation
¶
Index ¶
Constants ¶
View Source
const Group = 0xe1f1
Group is a group to be used within the application while it works
Variables ¶
View Source
var ( // ErrAlreadySet defines that NetlinkManager is already set. ErrAlreadySet = errors.New("already set") // ErrNotSet defines that NetlinkManager is not set yet. ErrNotSet = errors.New("not set") )
Functions ¶
This section is empty.
Types ¶
type NetlinkManager ¶
type NetlinkManager struct {
// contains filtered or unexported fields
}
NetlinkManager is responsible for setting ifgroup to all of the network interfaces given by a deviceList function and reverting the changes when needed.
func NewNetlinkManager ¶
func NewNetlinkManager(deviceList func() ([]net.Interface, error)) *NetlinkManager
NewNetlinkManager is a default constructor for NetlinkManager
func (*NetlinkManager) Set ¶
func (s *NetlinkManager) Set() error
Set sets the ifgroup for all of the network interfaces given by deviceList and stores their group IDs as a backup to be used for unset.
func (*NetlinkManager) Unset ¶
func (s *NetlinkManager) Unset() error
Click to show internal directories.
Click to hide internal directories.