EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Problem in Change in IP runtime

Started by Dhananjay April 13, 2004
hello,
 
   I am using the rabbit2000 board with the RCm2200. on board. I have to change the IP address in run time. I am using the sample program Ping.c for this. I am using the TCP configuration 6 for the same purpose. It change My IP Address in the run time . but the program not pining the address given to this . I am using the function tcp_config() for changing the IP Address and after this I ma using socket_inti(). Now the problem is that it is not Pining the address. Thus help me in this
 
 
Thanks
 
Warm Regards,
Dhananjay.


--- In rabbit-semi@rabb..., "Dhananjay" <dhananjay@b...> wrote:
> hello,
>
> I am using the rabbit2000 board with the RCm2200. on board. I
have to change the IP address in run time. I am using the sample
program Ping.c for this. I am using the TCP configuration 6 for the
same purpose. It change My IP Address in the run time . but the
program not pining the address given to this . I am using the function
tcp_config() for changing the IP Address and after this I ma using
socket_inti(). Now the problem is that it is not Pining the address.
Thus help me in this

JUst use tcp_config() to change the IP address after sock_init().

sock_init() would likely reset the value back to the config 6 value.

tcp_config() is depricated, with 7.3x and later, use the ifconfig()
function.


Refer to my source code.

ifconfig(IF_ETH0,
IFS_IPADDR, aton(ip_addr),
IFS_ROUTER_SET, aton(gw_addr),
IFS_NETMASK, aton(mask_addr),
IFS_UP,
IFS_END);

ip_status = 1;

while(ip_status % 2)
{
ip_status = ifpending(IF_ETH0);
tcp_tick(NULL);
} // Arp Init ( MAC and IP Address Connection)
_arp_init();
--- In rabbit-semi@rabb..., "Scott Henion" <shenion@s...>
wrote:
> --- In rabbit-semi@rabb..., "Dhananjay" <dhananjay@b...>
wrote:
> > hello,
> >
> > I am using the rabbit2000 board with the RCm2200. on board. I
> have to change the IP address in run time. I am using the sample
> program Ping.c for this. I am using the TCP configuration 6 for the
> same purpose. It change My IP Address in the run time . but the
> program not pining the address given to this . I am using the
function
> tcp_config() for changing the IP Address and after this I ma using
> socket_inti(). Now the problem is that it is not Pining the address.
> Thus help me in this
>
> JUst use tcp_config() to change the IP address after sock_init().
>
> sock_init() would likely reset the value back to the config 6 value.
>
> tcp_config() is depricated, with 7.3x and later, use the ifconfig()
> function.





The 2024 Embedded Online Conference