MCU: TM4C1294NCPDT
TI-RTOS: v2.01.00.03
NDK: v2.23.01.01
CCS: v6.0.1.0040
-
Hi,
Currently, I am using the below mentioned function to detect the self IP while using LAN/Ethernet in DHCP enabled mode. Can you please tell me which function or API to use to get the other parameters like Subnet Mask, Gateway IP & DNS IP (while DHCP is enabled). In a windows OS PC, if we type "ipconfig /all" at the command prompt we get all details (Current IP, Subnet Mask, Gateway IP, DNS IP) even if the PC's LAN is in DHCP enabled mode; similarly I need to know what configuration(s) the NDK have received from the network during DHCP.
-
void mynetworkIPAddrHook(IPN IPAddr, uint IfIdx, uint fAdd)
{
IPN IPTmp;
IPTmp = ntohl(IPAddr);
System_printf("networkIPAddrHook:\tIf-%d:%d.%d.%d.%d\n", IfIdx,
(UINT8)(IPTmp>>24)&0xFF, (UINT8)(IPTmp>>16)&0xFF,
(UINT8)(IPTmp>>8)&0xFF, (UINT8)IPTmp&0xFF);
sprintf(global_currentIP, "%d.%d.%d.%d", (UINT8)(IPTmp>>24)&0xFF, (UINT8)(IPTmp>>16)&0xFF, (UINT8)(IPTmp>>8)&0xFF, (UINT8)IPTmp&0xFF);
}
-
Thanks
-
Regards
Soumyajit