Quiz Sockets 3376 UNIX
In a layered protocol architecture (e.g., TCP/IP), a benefit and rationale for a module at one layer relying on another module at the layer below for some service is:
(All of the above) a) The lower-layer module can extend its service to multiple modules at the higher layer b) If called for, transparent to the higher-layer module, the lower-layer module can be replaced c) The higher-layer module can dispense with coding the logic for that service
Which of the following statements about socket programming is not correct? -A socket descriptor is actually a file descriptor -A socket descriptor can be used with every function that accepts a file descriptor argument
A socket descriptor can be used with every function that accepts a file descriptor argument
The single most important motive for the new IPv6 protocol is:
Address space expansion
Which of the following terms is used to denote units of data being transmitted?
All of the above a) Segment b) Datagram c) Frame
Which of the following is an application layer program designed to run on top of TCP:
All of the above a) TELNET b) File Transfer Protocol (FTP) c) Simple Mail Transfer Program (SMTP)
Which of the following statements about socket programming is not correct?
Applications with their own customized protocol headers cannot bypass the transport protocols (TCP and UDP, for example).
Which of the following statements about socket programming with datagram is not correct?
Datagram provides a connection-oriented service
A service provided by TCP is:
Flow control
Which of the following statements about socket programming (address byte ordering ) is not correct
For a 32bit integer with the value 0x04030201, the most significant byte is 0x01, and the least significant byte is 0x04 for the little-endian byte order.
Which of the following statements about socket programming (socket descriptor) is not correct?
If the socket descriptor is in blocking mode, the application can use either poll or select to determine when the file descriptor is readable
Which of the following is part of the syntax of a protocol (e.g., TCP/IP):
Its packet format
Which of the following statements about socket is not correct?
Many of the functions with file descriptors (e.g., read or write) will not work with a socket descriptor
Which of the following is common to both TCP and UDP
Port-to-port communication
As a data unit moves up from one protocol layer to another (e.g., for TCP\IP), control headers are:
Removed
A protocol architecture (e.g., TCP/IP) performs a task by implementing it as:
Separate program modules, responsible for subtasks, that cooperate with each other
Which of the following statements about socket programming (out-of-band) is not correct?
TCP and UPD support out-of-band data
Which of the following is an application layer protocol (e.g., in TCP/IP model).
Telnet
Which of the following statements about socket programming (socket address) is not correct?
The address associated with a Client's socket must be known to the server with datagram
Which of the following statements about socket programming (close and shutdown) is not correct?
The close function deallocates the network endpoint only when all the active references are closed
To write code for port-to-port communication (e.g., TCP/IP), a programmer uses:
The socket application programming interface
Which of the following is a transport layer protocol (TCP):
UDP
Which of the following statements about socket programming (nonblocking & asynchronous IO) is not correct?
When the socket is in blocking mode, the poll or select functions should be used to send or receive data.
Which of the following statements about socket programming (accept function) is not correct?
accepts provides non-blocking socket
Which of the following statements about socket programming with SOCK_STREAM (TCP) is not correct?
after the connection in place, one can communicate to the other in one direction.
Which of the following statements about socket programming (socket descriptors) is not correct?
one can use read and write to communicate with a socket as long as it is connected
___ allows processes running on different computers ( connected to a common network) to communicate with one another.
socket
Which is not a classical method of IPC provided by various UNIX systems.
thread