Documentation ¶
Index ¶
Constants ¶
View Source
const ( RTF_PROTO1 = '1' RTF_PROTO2 = '2' RTF_PROTO3 = '3' RTF_BLACKHOLE = 'B' RTF_BROADCAST = 'b' RTF_CLONING = 'C' RTF_PRCLONING = 'c' RTF_DYNAMIC = 'D' RTF_GATEWAY = 'G' RTF_HOST = 'H' RTF_IFSCOPE = 'I' RTF_IFREF = 'i' RTF_LLINFO = 'L' RTF_MODIFIED = 'M' RTF_MULTICAST = 'm' RTF_REJECT = 'R' RTF_ROUTER = 'r' RTF_STATIC = 'S' RTF_UP = 'U' RTF_WASCLONED = 'W' RTF_XRESOLVE = 'X' RTF_PROXY = 'Y' )
View Source
const PERSISTENT = "PERSISTENT"
View Source
const SEPARATOR = "==========================================================================="
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BSDRouteWrapper ¶
type BSDRouteWrapper struct {
// contains filtered or unexported fields
}
func NewBSDRouteWrapper ¶
func NewBSDRouteWrapper(netstatCommand string, routeCommand string) (*BSDRouteWrapper, error)
func (*BSDRouteWrapper) AddRoute ¶
func (wrapper *BSDRouteWrapper) AddRoute(route Route) error
func (*BSDRouteWrapper) DefaultRoutes ¶
func (wrapper *BSDRouteWrapper) DefaultRoutes() ([]Route, error)
func (*BSDRouteWrapper) GetInterface ¶
func (wrapper *BSDRouteWrapper) GetInterface(name string) (*net.Interface, error)
func (*BSDRouteWrapper) Routes ¶
func (wrapper *BSDRouteWrapper) Routes() ([]Route, error)
type CommandExecError ¶
func (*CommandExecError) Error ¶
func (err *CommandExecError) Error() (retval string)
type CommandSpec ¶
func (CommandSpec) Clone ¶
func (cmd CommandSpec) Clone() CommandSpec
type Route ¶
type Route struct { Destination net.IPNet Gateway net.IP Interface *net.Interface Flags map[string]string Expire int Metric int }
func (*Route) DestinationIsNetwork ¶
func (*Route) IsDefaultRoute ¶
type Routing ¶
type Routing interface { Routes() ([]Route, error) DefaultRoutes() ([]Route, error) AddRoute(Route) error GetInterface(name string) (*net.Interface, error) }
func NewRouteWrapper ¶
type WindowsRouteWrapper ¶
type WindowsRouteWrapper struct {
// contains filtered or unexported fields
}
func NewWindowsRouteWrapper ¶
func NewWindowsRouteWrapper(routeCommand string) (*WindowsRouteWrapper, error)
func (*WindowsRouteWrapper) AddRoute ¶
func (wrapper *WindowsRouteWrapper) AddRoute(route Route) error
func (*WindowsRouteWrapper) DefaultRoutes ¶
func (wrapper *WindowsRouteWrapper) DefaultRoutes() ([]Route, error)
func (*WindowsRouteWrapper) GetInterface ¶
func (wrapper *WindowsRouteWrapper) GetInterface(name string) (*net.Interface, error)
func (*WindowsRouteWrapper) Routes ¶
func (wrapper *WindowsRouteWrapper) Routes() ([]Route, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.