xref: /original-bsd/sys/sys/un.h (revision 6884d44a)
1 /*
2  * Copyright (c) 1982, 1986 Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)un.h	7.7 (Berkeley) 06/28/90
8  */
9 
10 /*
11  * Definitions for UNIX IPC domain.
12  */
13 struct	sockaddr_un {
14 	u_char	sun_len;		/* sockaddr len including null */
15 	u_char	sun_family;		/* AF_UNIX */
16 	char	sun_path[104];		/* path name (gag) */
17 };
18 
19 #ifdef KERNEL
20 int	unp_discard();
21 #else
22 
23 /* actual length of an initialized sockaddr_un */
24 #define SUN_LEN(su) \
25 	(sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
26 #endif
27