10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*2830Sdjl * Common Development and Distribution License (the "License"). 6*2830Sdjl * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 22*2830Sdjl * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _GETXBY_DOOR_H 270Sstevel@tonic-gate #define _GETXBY_DOOR_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 300Sstevel@tonic-gate 310Sstevel@tonic-gate /* 320Sstevel@tonic-gate * Definitions for client side of doors-based name service caching 330Sstevel@tonic-gate */ 340Sstevel@tonic-gate 350Sstevel@tonic-gate #ifdef __cplusplus 360Sstevel@tonic-gate extern "C" { 370Sstevel@tonic-gate #endif 380Sstevel@tonic-gate 390Sstevel@tonic-gate #include <netdb.h> 400Sstevel@tonic-gate #include <netinet/in.h> 410Sstevel@tonic-gate #include <arpa/inet.h> 420Sstevel@tonic-gate #include <sys/socket.h> 430Sstevel@tonic-gate #include <grp.h> 440Sstevel@tonic-gate #include <pwd.h> 450Sstevel@tonic-gate #include <exec_attr.h> 460Sstevel@tonic-gate #include <prof_attr.h> 470Sstevel@tonic-gate #include <user_attr.h> 48*2830Sdjl #include <nss_dbdefs.h> 490Sstevel@tonic-gate 500Sstevel@tonic-gate /* 51*2830Sdjl * nscd version 2 doors interfaces 52*2830Sdjl * The known, but private NAME_SERVICE_DOOR, filesystem name remains 53*2830Sdjl * the same, even though the transfer contents is significantly different. 540Sstevel@tonic-gate */ 550Sstevel@tonic-gate 56*2830Sdjl #define NAME_SERVICE_DOOR_V2 2 57*2830Sdjl #define NAME_SERVICE_DOOR_VERSION 2 58*2830Sdjl #ifndef NAME_SERVICE_DOOR 59*2830Sdjl #define NAME_SERVICE_DOOR "/var/run/name_service_door" 60*2830Sdjl #endif 61*2830Sdjl #define NAME_SERVICE_DOOR_COOKIE ((void*)(0xdeadbeef^NAME_SERVICE_DOOR_VERSION)) 620Sstevel@tonic-gate 630Sstevel@tonic-gate /* 64*2830Sdjl * internal APIs 650Sstevel@tonic-gate */ 660Sstevel@tonic-gate 67*2830Sdjl nss_status_t _nsc_trydoorcall(void **dptr, size_t *bsize, size_t *dsize); 68*2830Sdjl nss_status_t _nsc_trydoorcall_ext(void **dptr, size_t *bsize, size_t *dsize); 69*2830Sdjl int _nsc_getdoorbuf(void **dptr, size_t *bsize); 70*2830Sdjl void _nsc_resizedoorbuf(size_t bsize); 71*2830Sdjl int _nsc_proc_is_cache(); 720Sstevel@tonic-gate 730Sstevel@tonic-gate 740Sstevel@tonic-gate struct passwd * 750Sstevel@tonic-gate _uncached_getpwuid_r(uid_t uid, struct passwd *result, char *buffer, 760Sstevel@tonic-gate int buflen); 770Sstevel@tonic-gate 780Sstevel@tonic-gate struct passwd * 790Sstevel@tonic-gate _uncached_getpwnam_r(const char *name, struct passwd *result, char *buffer, 800Sstevel@tonic-gate int buflen); 810Sstevel@tonic-gate 820Sstevel@tonic-gate struct group * 830Sstevel@tonic-gate _uncached_getgrnam_r(const char *name, struct group *result, char *buffer, 840Sstevel@tonic-gate int buflen); 850Sstevel@tonic-gate 860Sstevel@tonic-gate struct group * 870Sstevel@tonic-gate _uncached_getgrgid_r(gid_t gid, struct group *result, char *buffer, int buflen); 880Sstevel@tonic-gate 890Sstevel@tonic-gate 900Sstevel@tonic-gate #ifdef __cplusplus 910Sstevel@tonic-gate } 920Sstevel@tonic-gate #endif 930Sstevel@tonic-gate 940Sstevel@tonic-gate 950Sstevel@tonic-gate #endif /* _GETXBY_DOOR_H */ 96