pkg: ship usr/lib/security/amd64/*.so links
[unleashed.git] / include / sys / un.h
blob1fbfa8f7b5b8ce97afaa9c4763284c1fb9fc38d6
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
25 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
26 /* All Rights Reserved */
29 * University Copyright- Copyright (c) 1982, 1986, 1988
30 * The Regents of the University of California
31 * All Rights Reserved
33 * University Acknowledgment- Portions of this document are derived from
34 * software developed by the University of California, Berkeley, and its
35 * contributors.
38 #ifndef _SYS_UN_H
39 #define _SYS_UN_H
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
45 #ifndef _SA_FAMILY_T
46 #define _SA_FAMILY_T
47 typedef unsigned short sa_family_t;
48 #endif
51 * Definitions for UNIX IPC domain.
53 struct sockaddr_un {
54 sa_family_t sun_family; /* AF_UNIX */
55 char sun_path[108]; /* path name (gag) */
58 #if (!defined(_XOPEN_SOURCE) && !defined(_POSIX_C_SOURCE)) || \
59 defined(__EXTENSIONS__)
61 * NOTE: If we ever go to BSD-style sun_len + sun_family, this macro needs to
62 * change.
64 * Also, include a strlen() prototype, and we have to protect it w.r.t.
65 * UNIX{98,03}. And because there's strlen, we need size_t as well.
67 #if !defined(_SIZE_T) || __cplusplus >= 199711L
68 #define _SIZE_T
69 #if defined(_LP64) || defined(_I32LPx)
70 typedef unsigned long size_t; /* size of something in bytes */
71 #else
72 typedef unsigned int size_t; /* (historical version) */
73 #endif
74 #endif /* _SIZE_T */
76 extern size_t strlen(const char *);
78 #define SUN_LEN(su) (sizeof (sa_family_t) + strlen((su)->sun_path))
80 #endif /* (!defined(_XOPEN_SOURCE) && !defined(_POSIX_C_SOURCE)) || ... */
82 #ifdef _KERNEL
83 int unp_discard();
84 #endif
86 #ifdef __cplusplus
88 #endif
90 #endif /* _SYS_UN_H */