xref: /illumos-gate/usr/src/uts/common/sys/strredir.h (revision f5cd957f512eb3fe078de1043418ae6acf52a4c6)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * strredir.h:	Declarations for the redirection driver and its matching
38  *		STREAMS module.
39  */
40 
41 /*
42  * The module's module id.
43  *
44  * XXX:	Since there's no authority responsible for administering this name
45  *	space, there's no guarantee that this value is unique.  That wouldn't
46  *	be so bad except that the DKI now suggests that ioctl cookie values
47  *	should be based on module id to make them unique...
48  */
49 #define	STRREDIR_MODID	7326
50 
51 /*
52  * Redirection ioctls:
53  */
54 #define	SRIOCSREDIR	((STRREDIR_MODID<<16) | 1)	/* set redir target */
55 #define	SRIOCISREDIR	((STRREDIR_MODID<<16) | 2)	/* is redir target? */
56 
57 
58 /*
59  * Everything from here on is of interest only to the kernel.
60  */
61 #ifdef	_KERNEL
62 
63 /* name of the module used to detect closes on redirected streams */
64 #define	STRREDIR_MOD	"redirmod"
65 
66 extern void srpop(vnode_t *, boolean_t);
67 
68 #endif	/* _KERNEL */
69 
70 #ifdef	__cplusplus
71 }
72 #endif
73 
74 #endif	/* _SYS_STRREDIR_H */
75