xref: /illumos-gate/usr/src/uts/common/sys/strredir.h (revision 2d6eb4a5)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
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.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SYS_STRREDIR_H
28 #define	_SYS_STRREDIR_H
29 
30 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 /*
35  * strredir.h:	Declarations for the redirection driver and its matching
36  *		STREAMS module.
37  */
38 
39 /*
40  * The module's module id.
41  *
42  * XXX:	Since there's no authority responsible for administering this name
43  *	space, there's no guarantee that this value is unique.  That wouldn't
44  *	be so bad except that the DKI now suggests that ioctl cookie values
45  *	should be based on module id to make them unique...
46  */
47 #define	STRREDIR_MODID	7326
48 
49 /*
50  * Redirection ioctls:
51  */
52 #define	SRIOCSREDIR	((STRREDIR_MODID<<16) | 1)	/* set redir target */
53 #define	SRIOCISREDIR	((STRREDIR_MODID<<16) | 2)	/* is redir target? */
54 
55 
56 /*
57  * Everything from here on is of interest only to the kernel.
58  */
59 #ifdef	_KERNEL
60 
61 /* name of the module used to detect closes on redirected streams */
62 #define	STRREDIR_MOD	"redirmod"
63 
64 extern void srpop(vnode_t *, boolean_t);
65 
66 #endif	/* _KERNEL */
67 
68 #ifdef	__cplusplus
69 }
70 #endif
71 
72 #endif	/* _SYS_STRREDIR_H */
73