2001-03-06 05:29:24 +08:00
|
|
|
/* sys/un.h
|
|
|
|
|
|
|
|
This file is part of Cygwin.
|
|
|
|
|
|
|
|
This software is a copyrighted work licensed under the terms of the
|
|
|
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
|
|
details. */
|
|
|
|
|
2000-02-18 03:38:33 +08:00
|
|
|
#ifndef _SYS_UN_H
|
|
|
|
#define _SYS_UN_H
|
|
|
|
|
2018-03-01 01:56:13 +08:00
|
|
|
#include <sys/types.h>
|
2009-03-23 16:45:18 +08:00
|
|
|
#include <string.h> /* for strlen */
|
2018-03-01 01:56:13 +08:00
|
|
|
|
2005-12-31 21:07:43 +08:00
|
|
|
|
2000-02-18 03:38:33 +08:00
|
|
|
/* POSIX requires only at least 100 bytes */
|
2013-03-07 23:39:35 +08:00
|
|
|
#define UNIX_PATH_MAX 108
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
struct sockaddr_un {
|
2018-03-01 01:56:13 +08:00
|
|
|
__sa_family_t sun_family; /* address family AF_LOCAL/AF_UNIX */
|
2013-03-07 23:39:35 +08:00
|
|
|
char sun_path[UNIX_PATH_MAX]; /* 108 bytes of socket address */
|
2000-02-18 03:38:33 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Evaluates the actual length of `sockaddr_un' structure. */
|
|
|
|
#define SUN_LEN(p) ((size_t)(((struct sockaddr_un *) NULL)->sun_path) \
|
2001-11-05 14:09:15 +08:00
|
|
|
+ strlen ((p)->sun_path))
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
#endif
|