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
5*cb5caa98Sdjl  * Common Development and Distribution License (the "License").
6*cb5caa98Sdjl  * 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  */
217c478bd9Sstevel@tonic-gate /*
22*cb5caa98Sdjl  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef	_GETXBY_DOOR_H
277c478bd9Sstevel@tonic-gate #define	_GETXBY_DOOR_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate /*
307c478bd9Sstevel@tonic-gate  * Definitions for client side of doors-based name service caching
317c478bd9Sstevel@tonic-gate  */
327c478bd9Sstevel@tonic-gate 
337c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
347c478bd9Sstevel@tonic-gate extern "C" {
357c478bd9Sstevel@tonic-gate #endif
367c478bd9Sstevel@tonic-gate 
377c478bd9Sstevel@tonic-gate #include <netdb.h>
387c478bd9Sstevel@tonic-gate #include <netinet/in.h>
397c478bd9Sstevel@tonic-gate #include <arpa/inet.h>
407c478bd9Sstevel@tonic-gate #include <sys/socket.h>
417c478bd9Sstevel@tonic-gate #include <grp.h>
427c478bd9Sstevel@tonic-gate #include <pwd.h>
437c478bd9Sstevel@tonic-gate #include <exec_attr.h>
447c478bd9Sstevel@tonic-gate #include <prof_attr.h>
457c478bd9Sstevel@tonic-gate #include <user_attr.h>
46*cb5caa98Sdjl #include <nss_dbdefs.h>
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate /*
49*cb5caa98Sdjl  * nscd version 2 doors interfaces
50*cb5caa98Sdjl  * The known, but private NAME_SERVICE_DOOR, filesystem name remains
51*cb5caa98Sdjl  * the same, even though the transfer contents is significantly different.
527c478bd9Sstevel@tonic-gate  */
537c478bd9Sstevel@tonic-gate 
54*cb5caa98Sdjl #define	NAME_SERVICE_DOOR_V2 2
55*cb5caa98Sdjl #define	NAME_SERVICE_DOOR_VERSION 2
56*cb5caa98Sdjl #ifndef NAME_SERVICE_DOOR
57*cb5caa98Sdjl #define	NAME_SERVICE_DOOR "/var/run/name_service_door"
587c478bd9Sstevel@tonic-gate #endif
59*cb5caa98Sdjl #define	NAME_SERVICE_DOOR_COOKIE ((void*)(0xdeadbeef^NAME_SERVICE_DOOR_VERSION))
607c478bd9Sstevel@tonic-gate 
617c478bd9Sstevel@tonic-gate /*
62*cb5caa98Sdjl  * internal APIs
637c478bd9Sstevel@tonic-gate  */
647c478bd9Sstevel@tonic-gate 
65*cb5caa98Sdjl nss_status_t	_nsc_trydoorcall(void **dptr, size_t *bsize, size_t *dsize);
66*cb5caa98Sdjl nss_status_t	_nsc_trydoorcall_ext(void **dptr, size_t *bsize, size_t *dsize);
67*cb5caa98Sdjl int		_nsc_getdoorbuf(void **dptr, size_t *bsize);
68*cb5caa98Sdjl void		_nsc_resizedoorbuf(size_t bsize);
69*cb5caa98Sdjl int		_nsc_proc_is_cache();
707c478bd9Sstevel@tonic-gate 
717c478bd9Sstevel@tonic-gate 
727c478bd9Sstevel@tonic-gate struct passwd *
737c478bd9Sstevel@tonic-gate _uncached_getpwuid_r(uid_t uid, struct passwd *result, char *buffer,
747c478bd9Sstevel@tonic-gate 	int buflen);
757c478bd9Sstevel@tonic-gate 
767c478bd9Sstevel@tonic-gate struct passwd *
777c478bd9Sstevel@tonic-gate _uncached_getpwnam_r(const char *name, struct passwd *result, char *buffer,
787c478bd9Sstevel@tonic-gate 	int buflen);
797c478bd9Sstevel@tonic-gate 
807c478bd9Sstevel@tonic-gate struct group *
817c478bd9Sstevel@tonic-gate _uncached_getgrnam_r(const char *name, struct group *result, char *buffer,
827c478bd9Sstevel@tonic-gate     int buflen);
837c478bd9Sstevel@tonic-gate 
847c478bd9Sstevel@tonic-gate struct group *
857c478bd9Sstevel@tonic-gate _uncached_getgrgid_r(gid_t gid, struct group *result, char *buffer, int buflen);
867c478bd9Sstevel@tonic-gate 
877c478bd9Sstevel@tonic-gate 
887c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
897c478bd9Sstevel@tonic-gate }
907c478bd9Sstevel@tonic-gate #endif
917c478bd9Sstevel@tonic-gate 
927c478bd9Sstevel@tonic-gate 
937c478bd9Sstevel@tonic-gate #endif	/* _GETXBY_DOOR_H */
94