|
Protocol control block via the socket FD
|
03/08/2016 7:40 AM
post115927
|
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.
|
|
|