It was a call to:
printf("connection from client: %s\n", (char *)inet_ntoa(cliaddr.sin_addr));
The error was occurring in libc (vsprintf).
I simply compiled with the -m32 flag and linked to the 32-bit libs. Everything functioned properly when compiled as 32-bit. So this is a good reminder from an article written by Michael Barr (http://embeddedgurus.com/embedded-systems-bloggers/michael-barr/) titled something like "Test Everything." It was primarily written for embedded systems, but as you can imagine how it can extend to virtually any aspect of engineering just by reading the title.
I'll modify the code to use some of the newer C networking methods. Here's a really good reference (http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html) that I've referenced over the years. Primarily the calls that accommodate IPv4 and IPv6.
No comments:
Post a Comment