Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd-server.h
blob: c400b7a0636159e167d0f50411ed68de912819c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
   nslcd-server.h - server socket routines

   Copyright (C) 2006 West Consulting
   Copyright (C) 2006 Arthur de Jong

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with this library; if not, write to the Free
   Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
   MA 02110-1301 USA
*/

#ifndef _NSLCD_SERVER_H
#define _NSLCD_SERVER_H 1

#include "nslcd.h"
#include "nslcd-common.h"

/* returns a socket ready to answer requests from the client,
   return <0 on error */
int nslcd_server_open(void);

/* read a request message, returns <0 in case of errors,
   this function closes the socket */
void nslcd_server_handlerequest(int sock);

/* LDAP methods */
/* TODO: these definitions should probably be moved */

/* the caller should take care of opening and closing the stream */
int nslcd_passwd_byname(FILE *fp);

/* the caller should take care of opening and closing the stream */
int nslcd_passwd_byuid(FILE *fp);

/* the caller should take care of opening and closing the stream */
int nslcd_passwd_all(FILE *fp);

int nslcd_alias_byname(FILE *fp);

int nslcd_alias_all(FILE *fp);

#endif /* not _NSLCD_SERVER_H */