Documentation ¶
Index ¶
- type FakeNetsh
- func (*FakeNetsh) DeleteIPAddress(args []string) error
- func (*FakeNetsh) DeletePortProxyRule(args []string) error
- func (*FakeNetsh) EnableForwarding(iface string) error
- func (*FakeNetsh) EnsurePortProxyRule(args []string) (bool, error)
- func (*FakeNetsh) GetDefaultGatewayIfaceName() (string, error)
- func (*FakeNetsh) GetInterfaceByIP(ipAddr string) (netsh.Ipv4Interface, error)
- func (*FakeNetsh) GetInterfaceByName(name string) (netsh.Ipv4Interface, error)
- func (*FakeNetsh) GetInterfaceNameToIndexMap() (map[string]int, error)
- func (*FakeNetsh) GetInterfaces() ([]netsh.Ipv4Interface, error)
- func (*FakeNetsh) Restore(args []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeNetsh ¶
type FakeNetsh struct { }
no-op implementation of netsh Interface
func (*FakeNetsh) DeleteIPAddress ¶
DeleteIPAddress checks if the specified IP address is present and, if so, deletes it.
func (*FakeNetsh) DeletePortProxyRule ¶
DeletePortProxyRule deletes the specified portproxy rule. If the rule did not exist, return error.
func (*FakeNetsh) EnableForwarding ¶
Enable forwarding on the interface (name or index)
func (*FakeNetsh) EnsurePortProxyRule ¶
func (*FakeNetsh) GetDefaultGatewayIfaceName ¶
GetDefaultGatewayIfaceName returns a fake default interface
func (*FakeNetsh) GetInterfaceByIP ¶
func (*FakeNetsh) GetInterfaceByIP(ipAddr string) (netsh.Ipv4Interface, error)
Gets an interface by ip address
func (*FakeNetsh) GetInterfaceByName ¶
func (*FakeNetsh) GetInterfaceByName(name string) (netsh.Ipv4Interface, error)
Gets an interface by name
func (*FakeNetsh) GetInterfaceNameToIndexMap ¶
func (*FakeNetsh) GetInterfaces ¶
func (*FakeNetsh) GetInterfaces() ([]netsh.Ipv4Interface, error)
GetInterfaces uses the show addresses command and returns a formatted structure
Click to show internal directories.
Click to hide internal directories.