mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-07 08:50:25 +08:00
19 lines
438 B
Go
19 lines
438 B
Go
//go:build windows
|
|
// +build windows
|
|
|
|
package lower
|
|
|
|
func (n *NIC) prepare() {
|
|
execute("/sbin/ip", "link", "set", "dev", ifcename, "mtu", "1500")
|
|
execute("/sbin/ip", "addr", "add", ip, "dev", ifcename)
|
|
execute("/sbin/ip", "route", "add", subnet, "dev", ifcename)
|
|
}
|
|
|
|
func (n *NIC) Up() {
|
|
execute("/sbin/ip", "link", "set", "dev", ifcename, "up")
|
|
}
|
|
|
|
func (n *NIC) Down() {
|
|
execute("/sbin/ip", "link", "set", "dev", ifcename, "down")
|
|
}
|