2 Unix SMB/CIFS implementation.
6 Copyright (C) Andrew Tridgell 2005
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #include "../libcli/netlogon/netlogon.h"
25 struct tsocket_address
;
28 struct cldap_incoming
{
32 struct tsocket_address
*src
;
33 struct ldap_message
*ldap_msg
;
37 a general cldap search request
41 const char *dest_address
;
44 const char * const *attributes
;
49 struct ldap_SearchResEntry
*response
;
50 struct ldap_Result
*result
;
54 NTSTATUS
cldap_socket_init(TALLOC_CTX
*mem_ctx
,
55 const struct tsocket_address
*local_addr
,
56 const struct tsocket_address
*remote_addr
,
57 struct cldap_socket
**_cldap
);
59 NTSTATUS
cldap_set_incoming_handler(struct cldap_socket
*cldap
,
60 struct tevent_context
*ev
,
61 void (*handler
)(struct cldap_socket
*,
63 struct cldap_incoming
*),
65 struct tevent_req
*cldap_search_send(TALLOC_CTX
*mem_ctx
,
66 struct tevent_context
*ev
,
67 struct cldap_socket
*cldap
,
68 const struct cldap_search
*io
);
69 NTSTATUS
cldap_search_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
70 struct cldap_search
*io
);
71 NTSTATUS
cldap_search(struct cldap_socket
*cldap
, TALLOC_CTX
*mem_ctx
,
72 struct cldap_search
*io
);
79 struct tsocket_address
*dest
;
80 struct ldap_SearchResEntry
*response
;
81 struct ldap_Result
*result
;
84 NTSTATUS
cldap_reply_send(struct cldap_socket
*cldap
, struct cldap_reply
*io
);
86 NTSTATUS
cldap_empty_reply(struct cldap_socket
*cldap
,
88 struct tsocket_address
*dst
);
89 NTSTATUS
cldap_error_reply(struct cldap_socket
*cldap
,
91 struct tsocket_address
*dst
,
93 const char *errormessage
);
96 a netlogon cldap request
98 struct cldap_netlogon
{
100 const char *dest_address
;
105 const char *domain_guid
;
106 const char *domain_sid
;
112 struct netlogon_samlogon_response netlogon
;
116 struct tevent_req
*cldap_netlogon_send(TALLOC_CTX
*mem_ctx
,
117 struct tevent_context
*ev
,
118 struct cldap_socket
*cldap
,
119 const struct cldap_netlogon
*io
);
120 NTSTATUS
cldap_netlogon_recv(struct tevent_req
*req
,
122 struct cldap_netlogon
*io
);
123 NTSTATUS
cldap_netlogon(struct cldap_socket
*cldap
,
125 struct cldap_netlogon
*io
);
126 char *cldap_netlogon_create_filter(TALLOC_CTX
*mem_ctx
,
127 const struct cldap_netlogon
*io
);
129 NTSTATUS
cldap_netlogon_reply(struct cldap_socket
*cldap
,
131 struct tsocket_address
*dst
,
133 struct netlogon_samlogon_response
*netlogon
);