ifconfig & DHCP related

Hi,
I am new to Rabbit Microcontroller & Dynamic C Compiler.
We have one project which was developed by other software engineer but not finished yet. Now I have to work on this project. We are using RCM3700 and Dynamic C V9.62 .
I am facing one problem related to DHCP connection. We have the following code. I want to get the new IP address it sets dynamically. Because after that IP is set, I need that IP address to send to server application to connect with it again using this new IP.
Please also let me know if, I did something wrong in this code. I have the help file for describing DHCP in Dynamic C but I haven’t figure out it completely. Please provide me the link of some better help for “DHCP & ifconfig” if possible.
Thanks.


ifconfig(IF_ETH0, IFG_DHCP_INFO, &di, IFS_END);

ifconfig(IF_ETH0,
IFS_ICMP_CONFIG, 1,
IFS_IF_CALLBACK, NetworkStateChange,
IFS_DHCP, di != NULL,
IFS_DHCP_TIMEOUT, DTIMEOUT,
IFS_DHCP_FALLBACK, 1,
IFS_DHCP_OPTIONS, sizeof(my_opts), my_opts, opt_callback,
IFS_DHCP_QUERY, IF_P2P(IF_ETH0),
IFS_END);

if (di) {
	// fallbacks to factory network setting
	ifconfig(IF_ETH0,	
		IFS_IPADDR,	    acuConfig.myIPAddress,
		IFS_NETMASK, 	    acuConfig.myNetMask,
		IFS_ROUTER_SET,     acuConfig.myGateway,
		IFS_NAMESERVER_SET, acuConfig.myNameServer,
		IFS_NAMESERVER_ADD, acuConfig.myNameServer2,
		IFS_END);
}