//
pkg.gl
Category
github.com/yudaiyan/go-netlink
netlink
package
0.0.4
Repository:
https://github.com/yudaiyan/go-netlink.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
5
Dependents
2
Files
198 SLOC
#
Functions
AddrAdd
添加网卡ip.
AddrDel
删除网卡ip.
GetAllIps
获取本地所有IP.
GetInterface
获取本地网卡.
GetIps
获取网卡所有IP.
GetLocalInterface
根据网卡名,获取网卡的ip、mask、mac。其中ip、mask默认只获取第一个。.
GetMac
根据网卡名,获取网卡的mac。.
LinkDel
删除网卡.
LinkSetHardwareAddr
修改网卡mac.
LinkSetUp
启用网卡.
LoAddrClear
清空lo上的其他IP.
RandAddrAdd
给网卡添加一个随机的cidr.
RandomCIDR
随机生成cidr.