package
Version:
v0.0.0-...-2891190
Opens a new window with list of versions in this module.
Published: Oct 24, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
GetDefaultRoute 获取默认路由
判断依据是 route 对象是否拥有 gw 成员,因为一般的路由只有 dst 成员,而没有 gw 成员。
如果没有默认路由,则返回 nil。
MakeDefaultRoute 生成用于默认路由的对象,需要指定网关, 返回一个 netlink.Route 对象。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.