Except for socket.h, I am a little confused what's the purpose of so many header files and when to include which. One way of finding an answer could be to read each header file in detail but if someone has an easier answer to my question, I would be obliged. Reiterating the question: What does each TCP/IP programming related header file listed above do?
Well, that's a very interesting guide but slightly different from what I wanted. Firstly, there is too much baby talk. And secondly, it doesn't discuss the "header" files aspect till the point I have read.
But still, it's a great introduction as compared to other tutorials I have seen so far.
For each API, read the man page. It will tell you which header(s) to include. The headers in the POSIX standard only contain the minimum set of features and definitions which must be present on POSIX-compliant platforms. In most cases a far richer set of features and definitions are available within a particular computing ecosystem.