xref: /netbsd-src/external/bsd/openldap/dist/servers/slapd/back-sock/back-sock.h (revision 549b59ed3ccf0d36d3097190a0db27b770f3a839)
1 /*	$NetBSD: back-sock.h,v 1.3 2021/08/14 16:15:01 christos Exp $	*/
2 
3 /* sock.h - socket backend header file */
4 /* $OpenLDAP$ */
5 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
6  *
7  * Copyright 2007-2021 The OpenLDAP Foundation.
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted only as authorized by the OpenLDAP
12  * Public License.
13  *
14  * A copy of this license is available in the file LICENSE in the
15  * top-level directory of the distribution or, alternatively, at
16  * <http://www.OpenLDAP.org/license.html>.
17  */
18 /* ACKNOWLEDGEMENTS:
19  * This work was initially developed by Brian Candler for inclusion
20  * in OpenLDAP Software.
21  */
22 
23 #ifndef SLAPD_SOCK_H
24 #define SLAPD_SOCK_H
25 
26 #include "proto-sock.h"
27 
28 LDAP_BEGIN_DECL
29 
30 struct sockinfo {
31 	const char	*si_sockpath;
32 	slap_mask_t	si_extensions;
33 	slap_mask_t	si_ops;		/* overlay: operations to act on */
34 	slap_mask_t	si_resps;	/* overlay: responses to forward */
35 	regex_t	si_dnpat;		/* overlay: DN pattern to match */
36 	struct berval 	si_dnpatstr;
37 };
38 
39 #define	SOCK_EXT_BINDDN	1
40 #define	SOCK_EXT_PEERNAME	2
41 #define	SOCK_EXT_SSF		4
42 #define	SOCK_EXT_CONNID		8
43 
44 extern FILE *opensock LDAP_P((
45 	const char *sockpath));
46 
47 extern void sock_print_suffixes LDAP_P((
48 	FILE *fp,
49 	BackendDB *bd));
50 
51 extern void sock_print_conn LDAP_P((
52 	FILE *fp,
53 	Connection *conn,
54 	struct sockinfo *si));
55 
56 extern int sock_read_and_send_results LDAP_P((
57 	Operation *op,
58 	SlapReply *rs,
59 	FILE *fp));
60 
61 LDAP_END_DECL
62 
63 #endif
64