Hi,
we are using NDK v2.23.2.03.
the NDK is configured using the XCONF tool
we want to be able to restart the DHCP client because we either switched networks or just lost the link on the same network and want to be sure we get the same IP address.
i saw in the documentation the DHCPOpen/close routines but there is very little on how to configure them. when i try to configure it like so:
NTARGS args;
NTPARAM_DHCP dhcpParams;
if(hDHCPCfg != NULL)
{
DHCPClose(hDHCPCfg);
}
memset(&args, NULL, sizeof(args));
memset(&dhcpParams, NULL, sizeof(dhcpParams));
args.CallMode = NT_MODE_IFIDX;
//args.IPAddr = ;
args.IfIdx = 1;
args.hCallback = hDHCPCfg;
args.pCb = &NDKServiceReport;
hDHCPCfg = DHCPOpen(&args, &dhcpParams);
i get errors in the log:
Service Status: DHCPC : Enabled : Running : 000
Network Added: If-1:192.168.1.9
Service Status: DHCPC : Enabled : Running : 017
00024.500 Illegal reentrant call to llEnter()
00024.500 Illegal call to llExit()
Network Removed: If-1:192.168.1.9
i know i must have it configured wrong or i am somehow supposed to shut down the existing DHCP service. i hoping there is just some command i can send to the existing DHCP service to just restart it instead of starting a brand new one.
so i need to know either:
1) what is the correct way to restart the existing DHCP client so i can get a new IP address
or
2) what is the correct way to shut down, configure, and start a new DHCP service?