1 /* Copyright (c) 1998, 1999, 2000 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 /* This file defines everything that client code should need to
21 know to talk to the nscd daemon. */
23 #ifndef _NSCD_CLIENT_H
24 #define _NSCD_CLIENT_H 1
26 #include <nscd-types.h>
28 /* Version number of the daemon interface */
29 #define NSCD_VERSION 2
31 /* Path of the file where the PID of the running system is stored. */
32 #define _PATH_NSCDPID "/var/run/nscd.pid"
34 /* Path for the Unix domain socket. */
35 #define _PATH_NSCDSOCKET "/var/run/.nscd_socket"
37 /* Path for the configuration file. */
38 #define _PATH_NSCDCONF "/etc/nscd.conf"
41 /* Available services. */
52 LASTDBREQ
= GETHOSTBYADDRv6
,
53 SHUTDOWN
, /* Shut the server down. */
54 GETSTAT
, /* Get the server statistic. */
55 INVALIDATE
, /* Invalidate one special cache. */
60 /* Header common to all requests */
63 int32_t version
; /* Version number of the daemon interface. */
64 request_type type
; /* Service requested. */
65 int32_t key_len
; /* Key length. */
69 /* Structure sent in reply to password query. Note that this struct is
70 sent also if the service is disabled or there is no record found. */
75 nscd_ssize_t pw_name_len
;
76 nscd_ssize_t pw_passwd_len
;
79 nscd_ssize_t pw_gecos_len
;
80 nscd_ssize_t pw_dir_len
;
81 nscd_ssize_t pw_shell_len
;
85 /* Structure sent in reply to group query. Note that this struct is
86 sent also if the service is disabled or there is no record found. */
91 nscd_ssize_t gr_name_len
;
92 nscd_ssize_t gr_passwd_len
;
94 nscd_ssize_t gr_mem_cnt
;
98 /* Structure sent in reply to host query. Note that this struct is
99 sent also if the service is disabled or there is no record found. */
104 nscd_ssize_t h_name_len
;
105 nscd_ssize_t h_aliases_cnt
;
108 nscd_ssize_t h_addr_list_cnt
;
110 } hst_response_header
;