Utilities and Functional Tools in STL M7 Test
-
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
-
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
-
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
-
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
-
The connection oriented communication model uses:
- DHCP protocol
- TCP protocol
- UDP protocol
- ICMP protocol
-
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()
-
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
-
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
-
The
MSG_PEEK
flag makes therecvfrom()
function:- return immediately
- retain received data in the input buffers
- scan received data for specified patterns
- wait for data to come
-
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
-
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);
-
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
- must be used instead of
-
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
-
A regular IP address consists of:
- two octets
- four octets
- six octets
- eight octets
-
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
-
Which of the following typecasts properly sets the
sin_addr
filed of thesockaddr_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)
-
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
-
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
-
The connectionless communication model uses:
- DHCP protocol
- UDP protocol
- TCP protocol
- ICMP protocol
-
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
- should followed by an appropriate number of
Subscribe
0 Comments
Newest