about summary refs log tree commit diff
path: root/nscd/nscd.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1998-10-18 22:02:47 +0000
committerRoland McGrath <roland@gnu.org>1998-10-18 22:02:47 +0000
commit4f6bfa8090a2465d450fc3b3be1ae2d30b0e53c7 (patch)
tree4995d9580ce6cdc235bb484ada2895eb675e9f46 /nscd/nscd.h
parent7434cee27c19eee320da7a1265a62d0e8665bd22 (diff)
downloadglibc-4f6bfa8090a2465d450fc3b3be1ae2d30b0e53c7.tar.gz
glibc-4f6bfa8090a2465d450fc3b3be1ae2d30b0e53c7.tar.xz
glibc-4f6bfa8090a2465d450fc3b3be1ae2d30b0e53c7.zip
* nscd/nscd-client.h: New file, broken out of "nscd.h".
	* nscd/nscd.h: Move defns needed by clients to "nscd-client.h",
	and #include that.
	* nscd/Makefile (distribute): Add nscd-client.h
Diffstat (limited to 'nscd/nscd.h')
-rw-r--r--nscd/nscd.h87
1 files changed, 5 insertions, 82 deletions
diff --git a/nscd/nscd.h b/nscd/nscd.h
index bc8150aca1..9177235911 100644
--- a/nscd/nscd.h
+++ b/nscd/nscd.h
@@ -24,18 +24,10 @@
 #include <time.h>
 #include <sys/uio.h>
 
-
-/* Version number of the daemon interface */
-#define NSCD_VERSION 2
-
-/* Path of the file where the PID of the running system is stored.  */
-#define _PATH_NSCDPID	 "/var/run/nscd.pid"
-
-/* Path for the Unix domain socket.  */
-#define _PATH_NSCDSOCKET "/var/run/.nscd_socket"
-
-/* Path for the configuration file.  */
-#define _PATH_NSCDCONF	 "/etc/nscd.conf"
+/* The declarations for the request and response types are in the file
+   "nscd-client.h", which should contain everything needed by client
+   functions.  */
+#include "nscd-client.h"
 
 
 /* Handle databases.  */
@@ -48,24 +40,6 @@ typedef enum
 } dbtype;
 
 
-/* Available services.  */
-typedef enum
-{
-  GETPWBYNAME,
-  GETPWBYUID,
-  GETGRBYNAME,
-  GETGRBYGID,
-  GETHOSTBYNAME,
-  GETHOSTBYNAMEv6,
-  GETHOSTBYADDR,
-  GETHOSTBYADDRv6,
-  LASTDBREQ = GETHOSTBYADDRv6,
-  SHUTDOWN,		/* Shut the server down.  */
-  GETSTAT,		/* Get the server statistic.  */
-  LASTREQ,
-} request_type;
-
-
 /* Structure for one hash table entry.  */
 struct hashentry
 {
@@ -106,58 +80,6 @@ struct database
 };
 
 
-/* Header common to all requests */
-typedef struct
-{
-  int version;		/* Version number of the daemon interface.  */
-  request_type type;	/* Service requested.  */
-  ssize_t key_len;	/* Key length.  */
-} request_header;
-
-
-/* Structure sent in reply to password query.  Note that this struct is
-   sent also if the service is disabled or there is no record found.  */
-typedef struct
-{
-  int version;
-  int found;
-  ssize_t pw_name_len;
-  ssize_t pw_passwd_len;
-  uid_t pw_uid;
-  gid_t pw_gid;
-  ssize_t pw_gecos_len;
-  ssize_t pw_dir_len;
-  ssize_t pw_shell_len;
-} pw_response_header;
-
-
-/* Structure sent in reply to group query.  Note that this struct is
-   sent also if the service is disabled or there is no record found.  */
-typedef struct
-{
-  int version;
-  int found;
-  ssize_t gr_name_len;
-  ssize_t gr_passwd_len;
-  gid_t gr_gid;
-  ssize_t gr_mem_cnt;
-} gr_response_header;
-
-
-/* Structure sent in reply to host query.  Note that this struct is
-   sent also if the service is disabled or there is no record found.  */
-typedef struct
-{
-  int version;
-  int found;
-  ssize_t h_name_len;
-  ssize_t h_aliases_cnt;
-  int h_addrtype;
-  int h_length;
-  ssize_t h_addr_list_cnt;
-  int error;
-} hst_response_header;
-
 /* Global variables.  */
 extern const char *dbnames[lastdb];
 extern const char *serv2str[LASTREQ];
@@ -218,4 +140,5 @@ extern void addhstbynamev6 (struct database *db, int fd, request_header *req,
 extern void addhstbyaddrv6 (struct database *db, int fd, request_header *req,
 			    void *key);
 
+
 #endif /* nscd.h */