2001-03-05 22:29:24 +01:00
|
|
|
/* sys/un.h
|
|
|
|
|
2013-03-07 16:39:35 +01:00
|
|
|
Copyright 1999, 2000, 2001, 2005, 2009, 2013 Red Hat, Inc.
|
2001-03-05 22:29:24 +01:00
|
|
|
|
|
|
|
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-17 20:38:33 +01:00
|
|
|
#ifndef _SYS_UN_H
|
|
|
|
#define _SYS_UN_H
|
|
|
|
|
2009-03-23 09:45:18 +01:00
|
|
|
#include <string.h> /* for strlen */
|
2005-12-31 14:07:43 +01:00
|
|
|
#include <cygwin/socket.h>
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
/* POSIX requires only at least 100 bytes */
|
2013-03-07 16:39:35 +01:00
|
|
|
#define UNIX_PATH_MAX 108
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
struct sockaddr_un {
|
2005-12-31 14:07:43 +01:00
|
|
|
sa_family_t sun_family; /* address family AF_LOCAL/AF_UNIX */
|
2013-03-07 16:39:35 +01:00
|
|
|
char sun_path[UNIX_PATH_MAX]; /* 108 bytes of socket address */
|
2000-02-17 20:38:33 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Evaluates the actual length of `sockaddr_un' structure. */
|
|
|
|
#define SUN_LEN(p) ((size_t)(((struct sockaddr_un *) NULL)->sun_path) \
|
2001-11-05 07:09:15 +01:00
|
|
|
+ strlen ((p)->sun_path))
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
#endif
|