ggeettssoocckknnaammee() -- Sockets Function (libsocket)

Get the name of a socket
iinntt ggeettssoocckknnaammee(_s_o_c_k_e_t, _n_a_m_e, _n_a_m_e_l_e_n)
iinntt _s_o_c_k_e_t, *_n_a_m_e_l_e_n; ssttrruucctt ssoocckkaaddddrr *_n_a_m_e;

Function ggeettssoocckknnaammee() returns the current name that is bound to _s_o_c_k_e_t.

_s_o_c_k_e_t is  a file descriptor that identifies the  socket in question.  _n_a_m_e
points  to a  space into  which  ggeettssoocckknnaammee() can  write the  socket name.
_n_a_m_e_l_e_n points to  an integer that holds the number  of bytes to which _n_a_m_e
points.  ggeettssoocckknnaammee()  re-initializes this integer to  the number of bytes
in the name that it writes at address _n_a_m_e.

If  all goes  well, ggeettssoocckknnaammee()  returns zero.  If  a problem  occurs, it
returns -1 and sets eerrrrnnoo to an appropriate value.  The following lists the
errors that can occur, by the value to which ggeettssoocckknnaammee() sets eerrrrnnoo:

EEBBAADDFF
     _s_o_c_k_e_t is not a valid file descriptor.

_E_N_O_T_S_O_C_K
     _s_o_c_k_e_t identifies a file, not a socket.

EENNOOBBUUFFSS
     The system lacks sufficient resources to perform the operation.

EEFFAAUULLTT
     _n_a_m_e contains an illegal address.

_S_e_e _A_l_s_o
bbiinndd(), lliibbssoocckkeett, ssoocckkeett()
