mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-03-20 03:31:27 +00:00
Add DNS address access
This commit is contained in:
parent
18aeb00bb5
commit
2ab5b5ac91
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user