I'm trying to retrieve the current DHCP address, subnet mask, gateway, and DNS values from within a different task than what the DHCP client is running in. i.e. I need to get the current DHCP values to put in my display for the user.
I obviously don't want to create a new DHCP client object. How can I best access these values from within my Display Task?
I'm on a MOD5270 if that matters.
Thanks.
Scott
Accessing Current DHCP address/mask/gateway/DNS values
Re: Accessing Current DHCP address/mask/gateway/DNS values
Nevermind... I found the answer in this.
InterfaceBlock *ib = GetInterFaceBlock(InterfaceNumber);
iprintf("IP: "); ShowIP(ib->netIP); iprintf("\r\n");
iprintf("Mask: "); ShowIP(ib->netIpMask); iprintf("\r\n");
iprintf("Gate: "); ShowIP(ib->netIpGate); iprintf("\r\n");
iprintf("DNS: "); ShowIP(ib->netDNS); iprintf("\r\n");
InterfaceBlock *ib = GetInterFaceBlock(InterfaceNumber);
iprintf("IP: "); ShowIP(ib->netIP); iprintf("\r\n");
iprintf("Mask: "); ShowIP(ib->netIpMask); iprintf("\r\n");
iprintf("Gate: "); ShowIP(ib->netIpGate); iprintf("\r\n");
iprintf("DNS: "); ShowIP(ib->netDNS); iprintf("\r\n");