POSIX Socket Programming Header Files


 
Thread Tools Search this Thread
Top Forums Programming POSIX Socket Programming Header Files
# 1  
Old 01-10-2011
POSIX Socket Programming Header Files

I can see a number of header files in the POSIX standard related to TCP/IP based socket programming:

Code:
arpa/inet.h
net/if.h
netdb.h
netinet/in.h
netinet/tcp.h
sys/socket.h

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?
# 2  
Old 01-10-2011
The best introduction to network programming is probably this.
This User Gave Thanks to pludi For This Post:
# 3  
Old 01-10-2011
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.
# 4  
Old 01-10-2011
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.
This User Gave Thanks to fpmurphy For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Socket programming

Hi everyone, I'm new to this forum. I'm working on new project for last few days and this forum already helped me on couple of occasions. I don't have any prior experience with network programming so I'll appreciate any advise given. I'm trying to do the following: 1. open user... (2 Replies)
Discussion started by: _thomas
2 Replies

2. UNIX for Advanced & Expert Users

Socket programming

my socket program is not working with larger port numbers like more than 60000 , any reason why ? (4 Replies)
Discussion started by: Gopi Krishna P
4 Replies

3. Programming

Socket programming in C

Hi, i know how to use socket for TCP applications, i also know how to use RAW socket, but i would like to use socket just over IP and bellow TCP, do you know how to do that ? i don't want to reimplement IP :) thanks for your answer. (2 Replies)
Discussion started by: nameless`
2 Replies

4. Programming

Socket programming

Hello!:) I'm trying to do some socket programming based on the following situation: I have a directory service named Casino that will hold all the information regarding the gamers that will try to connect to it in order to play a game(for example (Blackjack).Once they make the login they are... (4 Replies)
Discussion started by: maracumbigo
4 Replies

5. Linux

Reading the header of a tar file(posix header)

say i have these many file in a directory named exam. 1)/exam/newfolder/link.txt. 2)/exam/newfolder1/ and i create a tar say exam.tar well the problem is, when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories. on the... (2 Replies)
Discussion started by: Tanvirk
2 Replies

6. Programming

Socket Programming

Hi , I'm facing the following problem in socket programming. My structure is struct { int i; char *str; }samp; I'm creating the pointer to this structure and assigning the value to the structure members and send via the socket to the another process. The receiver process when... (7 Replies)
Discussion started by: arunviswanath
7 Replies

7. Programming

Need Help Regarding Socket Programming

Can anyone plz me. I need a sample code for the following description. Its urgent. It is C/Socket program with the following descriptions: NAME coreadServer - Concurrent Readers Server. coreadClient - Concurrent Readers Client. SYNOPSIS coreadServer <OutputFile> coreadClient <n>... (1 Reply)
Discussion started by: priya.vmr
1 Replies

8. Programming

Posix Thread Programming

Hello, i have 2 questions: 1. Can I get the current memory usage of a thread? 2. Can I use a member-function as (void*)(*)(void*) method to create a new thread with "pthread_create(...)"?? I would be happy about any suggestion. Regards, Rolf (2 Replies)
Discussion started by: rkasel
2 Replies

9. Programming

Socket Programming socket

Hello, I actually try to make client-server program. I'm using SCO OpenServer Release 5.0.0 and when I try to compile my code (by TELNET) I've got this error : I'm just using this simple code : and I get the same error if I use : If someone can help me, Thanks (2 Replies)
Discussion started by: soshell
2 Replies

10. Programming

Socket Programming

Dear Reader, Is there any way to check up socket status other than 'netstatus ' Thanks in advance, (1 Reply)
Discussion started by: joseph_shibu
1 Replies
Login or Register to Ask a Question