Hello,
how I can restart network interface, when I try reconfigure this interface? I’m using RCM3700 and when I call setIP(), which reconfire ETH0:
err = ifconfig(IF_ETH0,
IFS_IPADDR, aton(set.ip_unit),
IFS_NETMASK, aton(set.nm_unit),
IFS_ROUTER_SET,aton(set.gw_unit),
IFS_UP,
IFS_END);
Don’t know if it is happening to you, but I had to manually disable the DHCP configuration in order to switch.
Should be able to do so with:
ifconfig( IF_ETH0, IFS_DHCP, 0, IFS_END );
However, I am using the RCM4000 and the calls may be different. Also, I don’t see you using IFS_DOWN at the beginning. You may not be able to bring it up before it goes down.