/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4 1.8 */
/*
* This module establishes a unique connection on
* a STREAMS-based pipe.
*/
#include <sys/sysmacros.h>
/*
* This is the loadable module wrapper.
*/
"connld",
&conninfo,
};
/*
* Module linkage information for the kernel.
*/
};
};
int
_init()
{
return (mod_install(&modlinkage));
}
int
_fini()
{
return (mod_remove(&modlinkage));
}
int
{
}
/*
* Define local and external routines.
*/
/*
* Define STREAMS header information.
*/
1003,
"connld",
0,
};
NULL,
NULL,
};
NULL,
NULL,
NULL,
NULL,
};
};
/*
* For each invocation of connopen(), create a new pipe. One end of the pipe
* is sent to the process on the other end of this STREAM. The vnode for
* the other end is returned to the open() system call as the vnode for
* the opened object.
*
* On the first invocation of connopen(), a flag is set and the routine
* returns 0, since the first open corresponds to the pushing of the module.
*/
/*ARGSUSED*/
int
{
int error = 0;
return (EINVAL);
}
/*
* CONNLD is only allowed to be pushed onto a "pipe" that has both
* of its ends open.
*/
goto out;
}
goto out;
}
/*
* If this is the first time CONNLD was opened while on this stream,
* it is being pushed. Therefore, set a flag and return 0.
*/
goto out;
}
}
out:
return (error);
}
/*ARGSUSED*/
int
{
qprocsoff(q);
return (0);
}
/*
* Use same put procedure for write and read queues.
*/
int
{
return (0);
}