summaryrefslogtreecommitdiff
path: root/common/nslcd-prot.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/nslcd-prot.h')
-rw-r--r--common/nslcd-prot.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/common/nslcd-prot.h b/common/nslcd-prot.h
index 649be89..acc42f6 100644
--- a/common/nslcd-prot.h
+++ b/common/nslcd-prot.h
@@ -330,44 +330,6 @@ static void debug_dump(const void *ptr, size_t size)
/* These are functions and macors for performing common operations in
the nslcd request/response protocol. */
-/* returns a socket to the server or NULL on error (see errno),
- socket should be closed with tio_close() */
-TFILE *nslcd_client_open(void)
- MUST_USE;
-
-/* generic request code */
-#define NSLCD_REQUEST(fp, action, writefn) \
- /* open a client socket */ \
- if ((fp = nslcd_client_open()) == NULL) \
- { \
- ERROR_OUT_OPENERROR; \
- } \
- /* write a request header with a request code */ \
- WRITE_INT32(fp, (int32_t)NSLCD_VERSION) \
- WRITE_INT32(fp, (int32_t)action) \
- /* write the request parameters (if any) */ \
- writefn; \
- /* flush the stream */ \
- if (tio_flush(fp) < 0) \
- { \
- DEBUG_PRINT("WRITE_FLUSH : error: %s", strerror(errno)); \
- ERROR_OUT_WRITEERROR(fp); \
- } \
- /* read and check response version number */ \
- READ(fp, &tmpint32, sizeof(int32_t)); \
- tmpint32 = ntohl(tmpint32); \
- if (tmpint32 != (int32_t)NSLCD_VERSION) \
- { \
- ERROR_OUT_READERROR(fp); \
- } \
- /* read and check response request number */ \
- READ(fp, &tmpint32, sizeof(int32_t)); \
- tmpint32 = ntohl(tmpint32); \
- if (tmpint32 != (int32_t)(action)) \
- { \
- ERROR_OUT_READERROR(fp); \
- }
-
/* Read the response code (the result code of the query) from
the stream. */
#define READ_RESPONSE_CODE(fp) \