xref: /illumos-gate/usr/src/uts/common/sys/strredir.h (revision 2d6eb4a5)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
58ec5a142Sedp  * Common Development and Distribution License (the "License").
68ec5a142Sedp  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
218ec5a142Sedp 
227c478bd9Sstevel@tonic-gate /*
238ec5a142Sedp  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
248ec5a142Sedp  * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate #ifndef	_SYS_STRREDIR_H
287c478bd9Sstevel@tonic-gate #define	_SYS_STRREDIR_H
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
317c478bd9Sstevel@tonic-gate extern "C" {
327c478bd9Sstevel@tonic-gate #endif
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate /*
357c478bd9Sstevel@tonic-gate  * strredir.h:	Declarations for the redirection driver and its matching
367c478bd9Sstevel@tonic-gate  *		STREAMS module.
377c478bd9Sstevel@tonic-gate  */
387c478bd9Sstevel@tonic-gate 
397c478bd9Sstevel@tonic-gate /*
407c478bd9Sstevel@tonic-gate  * The module's module id.
417c478bd9Sstevel@tonic-gate  *
427c478bd9Sstevel@tonic-gate  * XXX:	Since there's no authority responsible for administering this name
437c478bd9Sstevel@tonic-gate  *	space, there's no guarantee that this value is unique.  That wouldn't
447c478bd9Sstevel@tonic-gate  *	be so bad except that the DKI now suggests that ioctl cookie values
457c478bd9Sstevel@tonic-gate  *	should be based on module id to make them unique...
467c478bd9Sstevel@tonic-gate  */
478ec5a142Sedp #define	STRREDIR_MODID	7326
487c478bd9Sstevel@tonic-gate 
497c478bd9Sstevel@tonic-gate /*
507c478bd9Sstevel@tonic-gate  * Redirection ioctls:
517c478bd9Sstevel@tonic-gate  */
528ec5a142Sedp #define	SRIOCSREDIR	((STRREDIR_MODID<<16) | 1)	/* set redir target */
538ec5a142Sedp #define	SRIOCISREDIR	((STRREDIR_MODID<<16) | 2)	/* is redir target? */
547c478bd9Sstevel@tonic-gate 
557c478bd9Sstevel@tonic-gate 
567c478bd9Sstevel@tonic-gate /*
577c478bd9Sstevel@tonic-gate  * Everything from here on is of interest only to the kernel.
587c478bd9Sstevel@tonic-gate  */
597c478bd9Sstevel@tonic-gate #ifdef	_KERNEL
607c478bd9Sstevel@tonic-gate 
618ec5a142Sedp /* name of the module used to detect closes on redirected streams */
628ec5a142Sedp #define	STRREDIR_MOD	"redirmod"
637c478bd9Sstevel@tonic-gate 
64*e493d0faSns extern void srpop(vnode_t *, boolean_t);
657c478bd9Sstevel@tonic-gate 
667c478bd9Sstevel@tonic-gate #endif	/* _KERNEL */
677c478bd9Sstevel@tonic-gate 
687c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
697c478bd9Sstevel@tonic-gate }
707c478bd9Sstevel@tonic-gate #endif
717c478bd9Sstevel@tonic-gate 
727c478bd9Sstevel@tonic-gate #endif	/* _SYS_STRREDIR_H */
73