Downloading Header Files

c

Where can i download the following header files for dev c

sys/types.h
sys/socket.h
netinet/in.h
arpa/inet.h

and also the structure

sockadder and it's derivatives?

Best Answer

I don't know why you need to download these specific files, since they should come with your compiler suite in most modern systems.

You should also keep in mind that they can be radically different depending on your platform and that those files often #include other non-standard files (which #include others and so on). This could make those files very hard to parse and understand.

That said, from some indeterminate version of Linux:

http://linux.die.net/include/sys/types.h

http://linux.die.net/include/sys/socket.h

http://linux.die.net/include/netinet/in.h

http://linux.die.net/include/arpa/inet.h

If you are going to replace missing files, consider getting/reinstalling a proper compiler suite and any developer packages your are missing.

If you want to look at the structure definitions you should definitely be looking at the documentation rather than the actual implementations. That way you avoid tying your code to private definitions e.t.c. that can change between systems.

EDIT:

Just to confirm some of my comments above, struct sockaddr for said version of Linux is defined piece-by-piece in:

http://linux.die.net/include/bits/socket.h

http://linux.die.net/include/bits/sockaddr.h

Related Topic