2005-01-07 02:29:27 +00:00
|
|
|
/*-
|
1994-05-24 10:09:53 +00:00
|
|
|
* Copyright (c) 1982, 1986, 1993
|
|
|
|
* The Regents of the University of California. All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 4. Neither the name of the University nor the names of its contributors
|
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
Merge in Lite2: add function prototypes.
Did not accept prototypes for unp_attach(), unp_bind(), unp_connect(),
unp_detach(), unp_discard(), unp_disconnect(), unp_drop(),
np_gc(), unp_mark(), unp_scan(), and unp_shutdown().
They are used only in uipc_usrreq.c and declared static there.
Reviewed by: davidg & bde
1996-03-11 02:12:57 +00:00
|
|
|
* @(#)un.h 8.3 (Berkeley) 2/19/95
|
1999-08-28 01:08:13 +00:00
|
|
|
* $FreeBSD$
|
1994-05-24 10:09:53 +00:00
|
|
|
*/
|
|
|
|
|
1994-08-21 04:42:17 +00:00
|
|
|
#ifndef _SYS_UN_H_
|
|
|
|
#define _SYS_UN_H_
|
|
|
|
|
2002-04-20 02:26:43 +00:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include <sys/_types.h>
|
|
|
|
|
2002-08-21 16:20:02 +00:00
|
|
|
#ifndef _SA_FAMILY_T_DECLARED
|
|
|
|
typedef __sa_family_t sa_family_t;
|
|
|
|
#define _SA_FAMILY_T_DECLARED
|
2002-04-20 02:26:43 +00:00
|
|
|
#endif
|
|
|
|
|
1994-05-24 10:09:53 +00:00
|
|
|
/*
|
|
|
|
* Definitions for UNIX IPC domain.
|
|
|
|
*/
|
2001-09-05 01:22:14 +00:00
|
|
|
struct sockaddr_un {
|
2002-06-19 19:05:41 +00:00
|
|
|
unsigned char sun_len; /* sockaddr len including null */
|
2002-04-20 02:26:43 +00:00
|
|
|
sa_family_t sun_family; /* AF_UNIX */
|
1994-05-24 10:09:53 +00:00
|
|
|
char sun_path[104]; /* path name (gag) */
|
|
|
|
};
|
|
|
|
|
2002-04-20 02:26:43 +00:00
|
|
|
#if __BSD_VISIBLE
|
|
|
|
|
2001-08-17 22:01:18 +00:00
|
|
|
/* Socket options. */
|
2013-01-22 20:37:31 +00:00
|
|
|
#define LOCAL_PEERCRED 1 /* retrieve peer credentials */
|
|
|
|
#define LOCAL_CREDS 2 /* pass credentials to receiver */
|
|
|
|
#define LOCAL_CONNWAIT 4 /* connects block until accepted */
|
2001-08-17 22:01:18 +00:00
|
|
|
|
2013-02-01 15:32:20 +00:00
|
|
|
/* Start of reserved space for third-party socket options. */
|
|
|
|
#define LOCAL_VENDOR SO_VENDOR
|
|
|
|
|
2008-10-06 18:43:11 +00:00
|
|
|
#ifndef _KERNEL
|
Merge in Lite2: add function prototypes.
Did not accept prototypes for unp_attach(), unp_bind(), unp_connect(),
unp_detach(), unp_discard(), unp_disconnect(), unp_drop(),
np_gc(), unp_mark(), unp_scan(), and unp_shutdown().
They are used only in uipc_usrreq.c and declared static there.
Reviewed by: davidg & bde
1996-03-11 02:12:57 +00:00
|
|
|
|
1994-05-24 10:09:53 +00:00
|
|
|
/* actual length of an initialized sockaddr_un */
|
|
|
|
#define SUN_LEN(su) \
|
|
|
|
(sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
|
1994-08-21 04:42:17 +00:00
|
|
|
|
2008-10-06 18:43:11 +00:00
|
|
|
#endif /* !_KERNEL */
|
Merge in Lite2: add function prototypes.
Did not accept prototypes for unp_attach(), unp_bind(), unp_connect(),
unp_detach(), unp_discard(), unp_disconnect(), unp_drop(),
np_gc(), unp_mark(), unp_scan(), and unp_shutdown().
They are used only in uipc_usrreq.c and declared static there.
Reviewed by: davidg & bde
1996-03-11 02:12:57 +00:00
|
|
|
|
2002-04-20 02:26:43 +00:00
|
|
|
#endif /* __BSD_VISIBLE */
|
|
|
|
|
Merge in Lite2: add function prototypes.
Did not accept prototypes for unp_attach(), unp_bind(), unp_connect(),
unp_detach(), unp_discard(), unp_disconnect(), unp_drop(),
np_gc(), unp_mark(), unp_scan(), and unp_shutdown().
They are used only in uipc_usrreq.c and declared static there.
Reviewed by: davidg & bde
1996-03-11 02:12:57 +00:00
|
|
|
#endif /* !_SYS_UN_H_ */
|