1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-09-30 23:54:41 +00:00

Add DNS address access

This commit is contained in:
David Schmenk 2015-10-30 09:32:45 -07:00
parent 18aeb00bb5
commit 2ab5b5ac91

View File

@ -24,6 +24,8 @@ struc t_inet
word closeTCP
word setInterfaceIP
word getInterfaceHA
word setDNS
word getDNS
end
//
// External interface to net class. Must be first.
@ -40,6 +42,10 @@ word driver = @netDrivers
// DHCP module to load
//
byte dhcp = "DHCP"
//
// DNS address
//
byte[4] dns
export def iNetInit
//
@ -62,6 +68,16 @@ export def iNetInit
return @iNet
end
iNet:initIP = @iNetInit
def iNetSetDNS(ipptr)
return memcpy(@dns, ipptr, 4)
end
done
def iNetGetDNS(ipptr)
return memcpy(ipptr, @dns, 4)
end
iNet:initIP = @iNetInit
iNet:setDNS = @iNetSetDNS
iNet:getDNS = @iNetGetDNS
done