Hello, I use next code on my RCM 6710:
if (ifconfig(IF_ETH0, IFS_IPADDR, aton(“10.10.6.100”),
IFS_NETMASK, aton(“255.255.255.0”), IFS_ROUTER_SET, aton(“10.10.6.1”),
This code doesn’t work, because sock_init_or_exit(1) says that ip is the one I set by #define _PRIMARY_STATIC_IP
If you set a primary static IP address the way you have done then it is not possible to change the address at run time.
If you want to have full flexibility on setting IP configurations at run time you are probably best setting TCPCONFIG to 6 and issuing the required ifconfig()s to set up the addressing you need. The addp.c example in the samples cpip folder is a good one to examin to see how this works.
Worked great for me, thank you.