netSetLANParam (Function) |
Top Previous Next |
Sets TCP/IP-specific parameters for establishing connections over the LAN network interface. It has the same effect as setting the parameters via Device: Network: Network Settings.
The LAN network interface must be closed and opened again before the changes can take effect if already opened (see also netClose / netOpen).
The format of an IP address is the same as returned by the sockGetLocalIP function.
Input: iface : SINT (default 2) The network interface to configure. 2 = LAN 1 network, 3 = LAN 2 network, etc. (See Network) Please note that the iface parameter is only supported on NX32L.
DHCP : BOOL (default TRUE) Use DHCP to obtain TCP/IP parameters automatically.
IP : DINT (default 0) The IP address of the device.
SubnetMask : DINT (default 0) The Subnet mask of the device.
Gateway : DINT (default 0) The TCP/IP gateway the device must use.
AutoDNS : BOOL (default TRUE) Obtain the DNS parameters automatically. Can only be used in combination with DHCP.
DNS1 : DINT (default 0) The first Domain Name Server the device should use to look up symbolic names.
DNS2 : DINT (default 0) The second Domain Name Server the device should use to look up symbolic names.
Returns: INT
Declaration: FUNCTION netSetLANParam : INT;
Example: INCLUDE rtcu.inc |