ifconfig Weird situation

I need my app to be able to switch from using DHCP to Static configurations depending on a jumper on the board. For right now i am using the static configuration.

To prove that its working i have defined the following:
#define MY_GATEWAY “”
#define MY_NAMESERVER “”

I have pourposly made the static IP x.x.x.9 so that if ifconfig really works my IP should be x.x.x.10, see below…

In my main i have the following:

// Set Up Static IP information on Network Interface
               	IFS_IPADDR, aton(""),
               	IFS_ROUTER_SET, aton(""),
               	IFS_NAMESERVER_SET, aton(""),
               	IFS_NAMESERVER_ADD, aton(""),

// Wait for interface to come up
while (ifpending(IF_ETH0) == IF_COMING_UP)

if (ifpending(IF_ETH0) == IF_UP)
	printf("Ethernet Is Up

printf("Ethernet Failed To Come Up

Now, after it boots all is well. i can ping it at its IP @ x.x.x.10.

Yet when i add a TCP listener it does not work. then if i comment out the above and add “sock_init_or_exit(1);” my TCP listener works just fine. whats the deal ?

Where does your sock_init occure in your program? Remember it only needs to be called once so if it is in a loop it could cause complications. Hope this helps; it took me a few head bangs to figure out a simular problem.

Thanks, that was the problem. :o