Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Protocol control block via the socket FD: (1 Item)
   
Protocol control block via the socket FD  
When I use the socket call, I am returned a file descriptor.

Eg: int fd = socket (AF_INET, SOCK_STREAM, 0).

Using this "fd" can I get the pointer to the protocol control block (PCB)?

I can see that the struct socket has a member so_pcb, which points to the PCB. How can I get this struct via the fd 
returned by the socket() call?

Thanks.