SysSockSetIpAddressAndNetMask (FUN)
FUNCTION SysSockSetIpAddressAndNetMask : RTS_IEC_RESULT
Set IP address and subnet mask of an adapter.
It depends on the device, whether the new ip address and subnet mask is reset during reboot or
if it is retained. In general the caller should consider these as volatile. The combination
IP address = 0.0.0.0 and subnet mask = 0.0.0.0 can be used to remove the IP address from the adapter.
After this there is no IP based communication possible anymore, until a new IP address is set.
Replaces the functions SysSockSetIPAddress() and SysSockSetSubnetMask().
- InOut:
Scope
Name
Type
Comment
Return
SysSockSetIpAddressAndNetMaskRTS_IEC_RESULTRuntime system error code (see CmpErrors.library).
Input
wsAdapterNameREFERENCE TO WSTRING
Adapter name provided by SysSockGetFirstAdapter() / SysSockGetNextAdapter()
IpAddrREFERENCE TO INADDR
Ip address to set in network byte order
NetMaskREFERENCE TO INADDR
Subnet mask to set in network byte order