Programming Question Pool
- Which function maintains a struct that allows a programmer to obtain a socket's portnumber?
- gethostbyname
- getservebyname
- getsockname
- getportbyname
- In BSD socket programming, which one has the correct order of API calls for server before server blocks?
- socket()->bind()->accept()->listen()
- socket()->listen()->bind()->accept()
- socket()->bind()->listen()->accept()
- socket()->accept()->bind()->listen()
- BSD sockets are best described as:
- places for light bulbs.
- integers.
- network data structures.
- an ISO communications protocol.
- The Unix connect system call (using TCP as the transport) returns:
- after the Syn is sent.
- after the Syn/Ack is sent.
- after the Ack is sent.
- after the Ack is received.
- A BSD socket is an interface between:
- Layers 1 and 2
- Layers 2 and 3
- Layers 3 and 4
- Layers 4 and 5
- Layers 5 and 6
- The Unix system call gethostbyname() is associated most closely with which protocol:
- The routine used to get a UDP packet from a socket is ____________.