IP Interface Configuration

I have been reading though a lot of code and ACE documentation and cannot find a way to get your current interface configuration (address, net mask, gateway) whether it was assigned by DHCP or static. Does anyone know of a way to do this? There is an ace customizeAceGetInterfaceAddrInfo but I cannot get that to link into my app. Has anyone been able to do what I want to do successfully?

Thanks

Look at “Development Board Parameters”. They aren’t just for the development board. The trick to using them is to find the function you want, search the include files for the header that has it, then include that header and then just use the function.

customizeGetIPParameters() will return everything except the DHCP status. I am not exactly sure how to get that. Dig through the BSP.

-Erik

The Development Board Parameters just read and write data to the NVRam. They dont seem to be able to get the currently used values such as the currently used address.

Try customizeAceGetInterfaceAddrInfo(). Near as I can tell, it returns the current live information, no matter how it was set. I used something like this:

aceAddrInfo liveIPinfo;

stat = customizeAceGetInterfaceAddrInfo(“eth0”, &liveIPinfo);

I tried that a while ago and could never get it to link then I remembered that the GCC does not like cross linking C with C++ and I used an extern “C” to do it and it works like a charm. Thanks for pointing me in the right direction.

Cool! I’ll have to look at that. I have been using static IPs only since I couldn’t figure out how to get the dynamic IP address.

My application is for the government which only uses static IPs anyway. :slight_smile:

One note, if you are checking this stuff, make sure that you check customizeMiiCheckLink() to make sure the Ethernet cable is plugged in. I had to add this since the timeout is so unbelievably long on the connect().

-Erik