So, I'm learning about sockets and reading everything in sight. I started digging into the developer's handbook and after an entire section about the perils of byte ordering in socket connections, I was presented with this little gem:
sa.sin_addr.s_addr = htonl((((((132 << 8) | 163) << 8) | 96)...
I've looked at the Handbook, Developer's handbook, and pored through a number of google searches and haven't found what I'm looking for. I would like to learn to write network programs on FreeBSD, in C. What is a good way for me to learn the basics? I have seen lots of books, but I'm a little...
Hi all,
I am trying to perform two operations and wondering if I can use one libc function to do both. Specifically:
Determine if a certain string is an IPv4 or IPv6 address
Get its numeric IP representation. (ie, ::1 is 1, 192.168.1.1 is 3232235777)
Currently, I am using getaddrinfo for the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.