Documentation ¶
Index ¶
Constants ¶
View Source
const (
ROUTE_FILE_PATH = "/proc/net/route"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetRoute ¶
type NetRoute struct { Metric uint32 `json:"metric"` Destination string `json:"dest"` Gateway string `json:"gateway"` Flags string `json:"flags"` NetIf string `json:"iface"` }
func (NetRoute) ToPortableJSON ¶
func (NetRoute) ToTableString ¶
type RouteFlag ¶
type RouteFlag struct { U bool `json:"up"` // 路由是活动的 H bool `json:"dest_is_single_host"` // 目标是一个主机 G bool `json:"gateway"` // 路由指向网关 S bool `json:"static"` // bsd Cloned bool `json:"clone_based_on_route"` // bsd W bool `json:"clone_auto_local"` // bsd L bool `json:"link_to_hw"` // bsd Reinsta bool `json:"reinstate_route"` // linux D bool `json:"dynamic_installed"` // linux 由路由的后台程序动态地安装 M bool `json:"modified_from_routing_sw"` // linux 由路由的后台程序修改 A bool `json:"installed_by_addrconf"` // linux Cached bool `json:"cached"` // linux Rejected bool `json:"rejected"` // linux `!` 拒绝路由 }
func (RouteFlag) ToPortableJSON ¶
func (RouteFlag) ToTableString ¶
Click to show internal directories.
Click to hide internal directories.