un.h revision 2165
1238106Sdes/*
2238106Sdes * Copyright (c) 1982, 1986, 1993
3238106Sdes *	The Regents of the University of California.  All rights reserved.
4238106Sdes *
5238106Sdes * Redistribution and use in source and binary forms, with or without
6238106Sdes * modification, are permitted provided that the following conditions
7238106Sdes * are met:
8238106Sdes * 1. Redistributions of source code must retain the above copyright
9238106Sdes *    notice, this list of conditions and the following disclaimer.
10238106Sdes * 2. Redistributions in binary form must reproduce the above copyright
11238106Sdes *    notice, this list of conditions and the following disclaimer in the
12238106Sdes *    documentation and/or other materials provided with the distribution.
13238106Sdes * 3. All advertising materials mentioning features or use of this software
14238106Sdes *    must display the following acknowledgement:
15238106Sdes *	This product includes software developed by the University of
16238106Sdes *	California, Berkeley and its contributors.
17238106Sdes * 4. Neither the name of the University nor the names of its contributors
18238106Sdes *    may be used to endorse or promote products derived from this software
19238106Sdes *    without specific prior written permission.
20238106Sdes *
21238106Sdes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22238106Sdes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23238106Sdes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24269257Sdes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25269257Sdes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26269257Sdes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27269257Sdes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28269257Sdes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29269257Sdes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30269257Sdes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31269257Sdes * SUCH DAMAGE.
32269257Sdes *
33269257Sdes *	@(#)un.h	8.1 (Berkeley) 6/2/93
34238106Sdes * $Id: un.h,v 1.3 1994/08/02 07:54:03 davidg Exp $
35238106Sdes */
36238106Sdes
37238106Sdes#ifndef _SYS_UN_H_
38238106Sdes#define _SYS_UN_H_
39238106Sdes
40238106Sdes/*
41238106Sdes * Definitions for UNIX IPC domain.
42238106Sdes */
43238106Sdesstruct	sockaddr_un {
44238106Sdes	u_char	sun_len;		/* sockaddr len including null */
45291767Sdes	u_char	sun_family;		/* AF_UNIX */
46238106Sdes	char	sun_path[104];		/* path name (gag) */
47238106Sdes};
48238106Sdes
49238106Sdes#ifndef KERNEL
50238106Sdes/* actual length of an initialized sockaddr_un */
51238106Sdes#define SUN_LEN(su) \
52238106Sdes	(sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
53238106Sdes#endif
54238106Sdes
55238106Sdes#endif
56238106Sdes