1sys_un.h(0P)               POSIX Programmer's Manual              sys_un.h(0P)
2
3
4

PROLOG

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

NAME

12       sys/un.h — definitions for UNIX domain sockets
13

SYNOPSIS

15       #include <sys/un.h>
16

DESCRIPTION

18       The <sys/un.h> header shall define  the  sockaddr_un  structure,  which
19       shall include at least the following members:
20
21
22           sa_family_t  sun_family  Address family.
23           char         sun_path[]  Socket pathname.
24
25       The  sockaddr_un  structure  is used to store addresses for UNIX domain
26       sockets.  Pointers to this type shall be cast by applications to struct
27       sockaddr * for use with socket functions.
28
29       The <sys/un.h> header shall define the sa_family_t type as described in
30       <sys/socket.h>.
31
32       The following sections are informative.
33

APPLICATION USAGE

35       The size of sun_path has intentionally been  left  undefined.  This  is
36       because different implementations use different sizes. For example, 4.3
37       BSD uses a size of 108, and 4.4 BSD uses a  size  of  104.  Since  most
38       implementations  originate  from BSD versions, the size is typically in
39       the range 92 to 108.
40
41       Applications should not assume a  particular  length  for  sun_path  or
42       assume that it can hold {_POSIX_PATH_MAX} bytes (256).
43
44       Although applications are required to initialize all members (including
45       any   non-standard   ones)   of   a   sockaddr_in6    structure    (see
46       <netinet_in.h>),  the  same  is not required for the sockaddr_un struc‐
47       ture, since historically many applications only initialized  the  stan‐
48       dard  members.  Despite this, applications are encouraged to initialize
49       sockaddr_un structures in a manner similar to the required  initializa‐
50       tion of sockaddr_in6 structures.
51

RATIONALE

53       None.
54

FUTURE DIRECTIONS

56       None.
57

SEE ALSO

59       <netinet_in.h>, <sys_socket.h>
60
61       The System Interfaces volume of POSIX.1‐2017, bind(), socket(), socket‐
62       pair()
63
65       Portions of this text are reprinted and reproduced in  electronic  form
66       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
67       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
68       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
69       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
70       event of any discrepancy between this version and the original IEEE and
71       The Open Group Standard, the original IEEE and The Open Group  Standard
72       is  the  referee document. The original Standard can be obtained online
73       at http://www.opengroup.org/unix/online.html .
74
75       Any typographical or formatting errors that appear  in  this  page  are
76       most likely to have been introduced during the conversion of the source
77       files to man page format. To report such errors,  see  https://www.ker
78       nel.org/doc/man-pages/reporting_bugs.html .
79
80
81
82IEEE/The Open Group                  2017                         sys_un.h(0P)
Impressum