Back to product page

SetIP method


Attempts to set local IP and netmask for the adapter.

Syntax

  • C++
void SetIP(char *ip, char *netmask);
The SetIP(ip,netmask) syntax has these parts:
ipNULL terminated data buffer with new IP address.
netmaskNULL terminated data buffer with new IP address.

Remarks

SetIP will attempt to set new IP/Netmask values for the interface. It is assumed that process have root/Administrator privileges when calling this method. On Windwos, this method will call 'netsh' command, and on UNIXes it will call 'ifconfig' for setting up parameters.

Platforms

Windows
Mac OSX
Linux
BSD