Last Updated on May 5, 2022 by Admin 2

Utilities and Functional Tools in STL M7 Test 

  1. The bind() function is utilized:

    • in the connectionless communication model only
    • in both connection oriented and connectionless communication models
    • in communication models other than connection oriented and connectionless
    • in the connection oriented communication  model only
  2. A client-server communication model assumes that the connection:

    • is initiated by the server
    • is initiated by the client 
    • doesn’t have to be established explicitly
    • is initiated by either of the parties
  3. The so called “network order” is a term descripting:

    • an arrangement used to connect network hosts
    • a sequence in which the server receives the client’s requests
    • a network command
    • a way in which octets are deployed inside multi octet data
  4. The inet__ntop() function:

    • doesn’t work in the INET domain
    • works only with IP protocol
    • works only with IP6 protocol
    • works with both IP and IP6 protocols
  5. The connection oriented communication model uses:

    • DHCP protocol
    • TCP protocol
    • UDP protocol
    • ICMP protocol
  6. Which function assures that the following variable’s value will be properly deployed inside a sockaddr_in structure?

    int http = 80;
    • ntoh1()
    • hton1()
    • ntohs()
    • htons()
  7. The getservbyname() function converts:

    • a pair consisting of a server name and a server IP address into a canonical name
    • a server name into a server IP address
    • a service name into a service number
    • a pair consisting of a service name and a protocol name into a service number
  8. A structure defined in the following way reflects the content of a system file named:

    struct <?> {
            char *p_name;
            char **p_aliases;
            int p_proto;
    • hosts
    • services
    • protocols
    • password
  9. The MSG_PEEK flag makes the recvfrom() function:

    • return immediately
    • retain received data in the input buffers
    • scan received data for specified patterns
    • wait for data to come
  10. The listen() function is utilized:

    • at the server side to allow the server to receive the client’s connections
    • at the client side to receive the server’s responses
    • at the client side to put the client in an inactive state
    • at the server side to receive the client’s requests
  11. Which of the following is a proper socket()  function header?

    • int socket(int domain, int type, int protocol);
    • void socket(int domain, int protocol);
    • struct socket * socket(void);
    • FILE * socket(int domain, int type);
  12. The closesocket() function:

    • must be used instead of close() on MS Windows platform
    • is designed for IP6 traffic only 
    • must be used instead of close() on Unix/Linux platform
    • is a direct equivalent of the close() function
  13. Using a WinSock compared to a regular BSD socket:

    • requires additional initialization and terminating of invocation
    • requires additional initialization of invocation
    • is extract the same 
    • requires the terminating of invocation
  14.  A regular IP address consists of:

    • two octets
    • four octets
    • six octets
    • eight octets
  15. The term “socket address” in the INET domain refers to:

    • a pair consisting of an IP address and a service number
    • a pair consisting of an IP address and a corresponding canonical host name
    • an equivalent of the IP address
    • an equivalent of a canonical host name using the dot notation
  16. Which of the following typecasts properly sets the sin_addr filed of the sockaddr_in structure?

    • ((struct in_addr *) hent > h_addr)
    • *((struct in_addr *) hent > h_addr)
    • *((struct in_addr ) hent > h_addr)
    • ((struct in_addr ) hent > h_addr)
  17. The term “domain” in the sense used by the socket library refers to:

    • any Internet domain
    • any top level Internet domain
    • an environment in which two cooperating process exchange data
    • a process which transmits data to another process
  18. The “backlog” parameter of the listen() function:

    • sets the maximal number of all incoming connections
    • sets the input queue length
    • sets the number of working threads
    • sets the maximal number of concurrent connections
  19. The connectionless communication model uses:

    • DHCP protocol
    • UDP protocol
    • TCP protocol
    • ICMP protocol
  20. The successful invocation of the getaddrinfo() function:

    • should followed by an appropriate number of free() invocations
    • is not allowed in a Unix/Linux Windows environment
    • is not allowed in an MS Windows environment 
    • should followed by a freeaddrinfo()function