Forum Discussion
Altera_Forum
Honored Contributor
16 years agosimple socket server example on cyclone II dev kit
Hi, I want to use the simple socket server example with the cyclone II dev kit. I compiled it and then I run it. In the file simple_socket_server.h I defined the IP-adress like this:
...
Altera_Forum
Honored Contributor
16 years agoWhich version of Quartus are you using? In 8.0 there was a bug in the IP4_ADDR macro in network_utilites.c. It should have an extra pair of brackets, and should look like this:
#define IP4_ADDR(ipaddr, a,b,c,d) ipaddr =
htonl((((alt_u32)(a & 0xff) << 24) | ((alt_u32)(b & 0xff) << 16) |
((alt_u32)(c & 0xff) << 8) | (alt_u32)(d & 0xff)))