DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Interprocess communication using UNIX domain sockets

Address structures (UNIX domain)

This section describes address structures and library routines used to call them.

The two most common addressing schemes are AF_UNIX and AF_INET, (the AF stands for address family). AF_UNIX addressing uses UNIX System pathnames to identify sockets. These sockets are very useful for interprocess communication (IPC) between processes on the same machine. For the UNIX address family, the sockaddr_un structure members specify the protocol family of the address, and the pathname.

struct sockaddr_un {
	short sun_family;      /*address family--AF_UNIX*/
	char sun_path[108];    /*pathname*/
};
The underlying generic structure of sockaddr is:
struct sockaddr {
    short sa_family;      /*address family*/
    char sa_data[14];     /*up to 14 bytes of address*/
};

Next topic: Elementary system calls (UNIX domain)
Previous topic: Creating a socket (UNIX domain)

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003