logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

sys_un.h.0p (3108B)


  1. '\" et
  2. .TH sys_un.h "0P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. sys/un.h
  12. \(em definitions for UNIX domain sockets
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <sys/un.h>
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR <sys/un.h>
  21. header shall define the
  22. .BR sockaddr_un
  23. structure, which shall include at least the following members:
  24. .sp
  25. .RS 4
  26. .nf
  27. sa_family_t sun_family \fRAddress family.\fR
  28. char sun_path[] \fRSocket pathname.\fR
  29. .fi
  30. .P
  31. .RE
  32. .P
  33. The
  34. .BR sockaddr_un
  35. structure is used to store addresses for UNIX domain sockets.
  36. Pointers to this type shall be cast by applications to
  37. .BR "struct sockaddr *"
  38. for use with socket functions.
  39. .P
  40. The
  41. .IR <sys/un.h>
  42. header shall define the
  43. .BR sa_family_t
  44. type as described in
  45. .IR <sys/socket.h> .
  46. .LP
  47. .IR "The following sections are informative."
  48. .SH "APPLICATION USAGE"
  49. The size of
  50. .IR sun_path
  51. has intentionally been left undefined. This is because different
  52. implementations use different sizes. For example, 4.3 BSD uses a size of
  53. 108, and 4.4 BSD uses a size of 104. Since most implementations
  54. originate from BSD versions, the size is typically in the range 92 to
  55. 108.
  56. .P
  57. Applications should not assume a particular length for
  58. .IR sun_path
  59. or assume that it can hold
  60. {_POSIX_PATH_MAX}
  61. bytes (256).
  62. .P
  63. Although applications are required to initialize all members
  64. (including any non-standard ones) of a
  65. .BR sockaddr_in6
  66. structure (see
  67. .IR "\fB<netinet_in.h>\fP"),
  68. the same is not required for the
  69. .BR sockaddr_un
  70. structure, since historically many applications only initialized
  71. the standard members. Despite this, applications are encouraged
  72. to initialize
  73. .BR sockaddr_un
  74. structures in a manner similar to the required initialization of
  75. .BR sockaddr_in6
  76. structures.
  77. .SH "RATIONALE"
  78. None.
  79. .SH "FUTURE DIRECTIONS"
  80. None.
  81. .SH "SEE ALSO"
  82. .IR "\fB<netinet_in.h>\fP",
  83. .IR "\fB<sys_socket.h>\fP"
  84. .P
  85. The System Interfaces volume of POSIX.1\(hy2017,
  86. .IR "\fIbind\fR\^(\|)",
  87. .IR "\fIsocket\fR\^(\|)",
  88. .IR "\fIsocketpair\fR\^(\|)"
  89. .\"
  90. .SH COPYRIGHT
  91. Portions of this text are reprinted and reproduced in electronic form
  92. from IEEE Std 1003.1-2017, Standard for Information Technology
  93. -- Portable Operating System Interface (POSIX), The Open Group Base
  94. Specifications Issue 7, 2018 Edition,
  95. Copyright (C) 2018 by the Institute of
  96. Electrical and Electronics Engineers, Inc and The Open Group.
  97. In the event of any discrepancy between this version and the original IEEE and
  98. The Open Group Standard, the original IEEE and The Open Group Standard
  99. is the referee document. The original Standard can be obtained online at
  100. http://www.opengroup.org/unix/online.html .
  101. .PP
  102. Any typographical or formatting errors that appear
  103. in this page are most likely
  104. to have been introduced during the conversion of the source files to
  105. man page format. To report such errors, see
  106. https://www.kernel.org/doc/man-pages/reporting_bugs.html .