aboutsummaryrefslogtreecommitdiffstats
path: root/src/libnsss/nsss-switch-internal.h
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-09-09 19:58:12 +0000
committerLaurent Bercot <ska@appnovation.com>2021-09-09 19:58:12 +0000
commit6fdb4834cdb5557d9bd7562f61984da8bd0d9c80 (patch)
treec9ac0c6bc512beed2e550b9aba09eb2af090e6a7 /src/libnsss/nsss-switch-internal.h
parent1f213b642deb1d8e6139d2b7daac8f639c8717e7 (diff)
downloadnsss-6fdb4834cdb5557d9bd7562f61984da8bd0d9c80.tar.gz
Prepare for 0.2.0.0, lots of changes.
- Make _r functions completely thread-safe. - Save a lot of forking by having a persistent nsss_switch_query - Introduce a timeout to make the server expire - Start writing nsss-switch, not working yet. Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libnsss/nsss-switch-internal.h')
-rw-r--r--src/libnsss/nsss-switch-internal.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/libnsss/nsss-switch-internal.h b/src/libnsss/nsss-switch-internal.h
index 2b93434..50615d8 100644
--- a/src/libnsss/nsss-switch-internal.h
+++ b/src/libnsss/nsss-switch-internal.h
@@ -3,19 +3,34 @@
#ifndef NSSS_SWITCH_INTERNAL_H
#define NSSS_SWITCH_INTERNAL_H
+#include <stddef.h>
+#include <sys/uio.h>
+#include <pthread.h>
+
#include <skalibs/tai.h>
#include <skalibs/buffer.h>
#include <skalibs/stralloc.h>
#include <skalibs/genalloc.h>
+
#include <nsss/pwd-def.h>
#include <nsss/grp-def.h>
#include <nsss/shadow-def.h>
#include <nsss/nsss-switch.h>
-extern nsss_switch_t nsss_switch_here ;
+extern nsss_switch_t nsss_switch_enumerator ;
+extern pthread_mutex_t nsss_switch_enumerator_mutex ;
+
+extern nsss_switch_t nsss_switch_query ;
+extern pthread_mutex_t nsss_switch_query_mutex ;
+
+extern int nsss_switch_query_start (char const *, unsigned int, unsigned int, tain const *, tain *) ;
+
extern int nsss_switch_op (nsss_switch_t *, char, tain const *, tain *) ;
extern int nsss_switch_pwd_read (buffer *, struct passwd *, stralloc *, tain const *, tain *) ;
extern int nsss_switch_grp_read (buffer *, struct group *, stralloc *, genalloc *, tain const *, tain *) ;
extern int nsss_switch_shadow_read (buffer *, struct spwd *, stralloc *, tain const *, tain *) ;
+extern int nsss_switch_send (nsss_switch_t *, char const *, size_t, tain const *, tain *) ;
+extern int nsss_switch_sendv (nsss_switch_t *, struct iovec const *, unsigned int, tain const *, tain *) ;
+
#endif