修改:设置完网络参数后读取一下当前的网络参数

This commit is contained in:
969753572 2020-07-01 22:19:44 +08:00
parent 129cb6f80c
commit 8ce26eb008
5 changed files with 3 additions and 1 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
goAdapter

Binary file not shown.

View File

@ -37,6 +37,7 @@ func main(){
log.Println("set network ",v.Name)
setNetworkParam(v.ID,v)
}
networkParamList = getNetworkParam()
/**************变量模板初始化****************/
CommunicationManageInit()

View File

@ -202,6 +202,7 @@ func GetNetInformation(netName string) (NetInformation, error) {
if err != nil {
return info, err
}
info.HardwareAddr = inter.HardwareAddr
info.Mac = hex.EncodeToString(inter.HardwareAddr)

View File

@ -1 +1 @@
{"NetworkParam":[{"ID":"1","Name":"eth0","DHCP":"0","IP":"192.168.4.156","Netmask":"255.255.255.0","Broadcast":"192.168.4.255"}]}
{"NetworkParam":[{"ID":"1","Name":"en0","DHCP":"0","IP":"192.168.4.156","Netmask":"255.255.255.0","Broadcast":"192.168.4.255"}]}