sys_un.h(3)                POSIX Programmer's Manual               sys_un.h(3)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       sys/un.h -- definitions for UNIX domain sockets

SSYYNNOOPPSSIISS
       #include <sys/un.h>

DDEESSCCRRIIPPTTIIOONN
       The _<_s_y_s_/_u_n_._h_> header shall define the ssoocckkaaddddrr__uunn structure, which
       shall include at least the following members:


           sa_family_t  sun_family  Address family.
           char         sun_path[]  Socket pathname.

       The ssoocckkaaddddrr__uunn structure is used to store addresses for UNIX domain
       sockets.  Pointers to this type shall be cast by applications to ssttrruucctt
       ssoocckkaaddddrr ** for use with socket functions.

       The _<_s_y_s_/_u_n_._h_> header shall define the ssaa__ffaammiillyy__tt type as described in
       _<_s_y_s_/_s_o_c_k_e_t_._h_>.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       The size of _s_u_n___p_a_t_h has intentionally been left undefined. This is
       because different implementations use different sizes. For example, 4.3
       BSD uses a size of 108, and 4.4 BSD uses a size of 104. Since most
       implementations originate from BSD versions, the size is typically in
       the range 92 to 108.

       Applications should not assume a particular length for _s_u_n___p_a_t_h or
       assume that it can hold {_POSIX_PATH_MAX} bytes (256).

       Although applications are required to initialize all members (including
       any non-standard ones) of a ssoocckkaaddddrr__iinn66 structure (see
       <<nneettiinneett__iinn..hh>>), the same is not required for the ssoocckkaaddddrr__uunn
       structure, since historically many applications only initialized the
       standard members. Despite this, applications are encouraged to
       initialize ssoocckkaaddddrr__uunn structures in a manner similar to the required
       initialization of ssoocckkaaddddrr__iinn66 structures.

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       <<nneettiinneett__iinn..hh>>, <<ssyyss__ssoocckkeett..hh>>

       The System Interfaces volume of POSIX.1-2017, _b_i_n_d(), _s_o_c_k_e_t(),
       _s_o_c_k_e_t_p_a_i_r()

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the
       Institute of Electrical and Electronics Engineers, Inc and The Open
       Group.  In the event of any discrepancy between this version and the
       original IEEE and The Open Group Standard, the original IEEE and The
       Open Group Standard is the referee document. The original Standard can
       be obtained online at http://www.opengroup.org/unix/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017                          sys_un.h(3)
