xref: /titanic_41/usr/src/uts/common/sys/tl.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SYS_TL_H
28 #define	_SYS_TL_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * These are Sun private declarations. Not to be used by any
38  * external applications/code.
39  */
40 
41 /*
42  * Protocol level for option header - (hex for ascii "TL")
43  * (Hopefully unique!)
44  */
45 #define	TL_PROT_LEVEL 0x544c
46 
47 /*
48  * Option and data structures used for sending credentials
49  */
50 #define	TL_OPT_PEER_CRED 10
51 typedef struct tl_credopt {
52 	uid_t	tc_uid;		/* Effective user id */
53 	gid_t	tc_gid;		/* Effective group id */
54 	uid_t	tc_ruid;	/* Real user id */
55 	gid_t	tc_rgid;	/* Real group id */
56 	uid_t	tc_suid;	/* Saved user id (from exec) */
57 	gid_t	tc_sgid;	/* Saved group id (from exec) */
58 	uint_t	tc_ngroups;	/* number of supplementary groups */
59 } tl_credopt_t;
60 
61 #define	TL_OPT_PEER_UCRED 11	/* data structure is ucred */
62 
63 /*
64  * Ioctl's for the 'tl' driver
65  */
66 #define	TL_IOC		(('T' << 16)|('L' << 8))
67 #define	TL_IOC_CREDOPT	(TL_IOC|001)
68 /* unused		(TL_IOC|002) */
69 #define	TL_IOC_UCREDOPT	(TL_IOC|003)
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif /* _SYS_TL_H */
76