Documentation ¶
Index ¶
- type Route
- type Router
- type RouterWindows
- func (r RouterWindows) CreateRoute(interfaceIndex int, destinationSubnet *net.IPNet, gatewayAddress net.IP) error
- func (r RouterWindows) DeleteRoute(interfaceIndex int, destinationSubnet *net.IPNet, gatewayAddress net.IP) error
- func (r RouterWindows) GetAllRoutes() ([]Route, error)
- func (r RouterWindows) GetRoutesFromInterfaceToSubnet(interfaceIndex int, destinationSubnet *net.IPNet) ([]Route, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router interface { // GetAllRoutes returns all existing routes GetAllRoutes() ([]Route, error) // GetRoutesFromInterfaceToSubnet returns all routes from the given Interface to the given subnet GetRoutesFromInterfaceToSubnet(interfaceIndex int, destinationSubnet *net.IPNet) ([]Route, error) // CreateRoute creates a new route CreateRoute(interfaceIndex int, destinationSubnet *net.IPNet, gatewayAddress net.IP) error // DeleteRoute removes an existing route DeleteRoute(interfaceIndex int, destinationSubnet *net.IPNet, gatewayAddress net.IP) error }
Router manages network routes
type RouterWindows ¶
type RouterWindows struct{}
Router manages network routes on Windows OS using MSFT_NetRoute See also https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/hh872448(v%3Dvs.85)
func (RouterWindows) CreateRoute ¶
func (RouterWindows) DeleteRoute ¶
func (RouterWindows) GetAllRoutes ¶
func (r RouterWindows) GetAllRoutes() ([]Route, error)
func (RouterWindows) GetRoutesFromInterfaceToSubnet ¶
Click to show internal directories.
Click to hide internal directories.