Previous section.

Networking Services (XNS) Issue 5
Copyright © 1997 The Open Group

NAME

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

SYNOPSIS

#include <sys/un.h>

DESCRIPTION

The <sys/un.h> header defines the sockaddr_un structure that includes at least the following members:
sa_family_t sun_family    address family
char        sun_path[]    socket pathname

The sockaddr_un structure is used to store addresses for UNIX domain sockets. Values of this type must be cast to struct sockaddr for use with the socket interfaces defined in this document.

The <sys/un.h> header defines the type sa_family_t as described in <sys/socket.h>.

The size of sun_path (see <sys/un.h> ) has intentionally been left undefined. This was done for good reasons. Different implementations have used different sizes. For example, BSD4.3 uses a size of 108. BSD4.4 uses a size of 104. Since most of the implementations today originated from BSD versions, most of the major vendors today use a size that ranges from 92 to 108. Applications should not assume a particular length for sun_path or assume that it can hold _POSIX_PATH_MAX characters (255).

SEE ALSO

bind(), socket(), socketpair().

Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index