summaryrefslogtreecommitdiff
path: root/source4/libcli/cldap/cldap.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-01-09 22:12:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:49:57 -0500
commitf55ea8bb3dca868e21663cd90eaea7a35cd7886c (patch)
tree80aab2a3f10310e1946821603752cd407e435214 /source4/libcli/cldap/cldap.h
parent806b3fdbc12b3284ab9872a4ecae3a7ee34ea171 (diff)
downloadsamba-f55ea8bb3dca868e21663cd90eaea7a35cd7886c.tar.gz
samba-f55ea8bb3dca868e21663cd90eaea7a35cd7886c.tar.bz2
samba-f55ea8bb3dca868e21663cd90eaea7a35cd7886c.zip
r12804: This patch reworks the Samba4 sockets layer to use a socket_address
structure that is more generic than just 'IP/port'. It now passes make test, and has been reviewed and updated by metze. (Thankyou *very* much). This passes 'make test' as well as kerberos use (not currently in the testsuite). The original purpose of this patch was to have Samba able to pass a socket address stucture from the BSD layer into the kerberos routines and back again. It also removes nbt_peer_addr, which was being used for a similar purpose. It is a large change, but worthwhile I feel. Andrew Bartlett (This used to be commit 88198c4881d8620a37086f80e4da5a5b71c5bbb2)
Diffstat (limited to 'source4/libcli/cldap/cldap.h')
-rw-r--r--source4/libcli/cldap/cldap.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/source4/libcli/cldap/cldap.h b/source4/libcli/cldap/cldap.h
index 0baaec02df..944510077b 100644
--- a/source4/libcli/cldap/cldap.h
+++ b/source4/libcli/cldap/cldap.h
@@ -41,8 +41,7 @@ struct cldap_request {
enum cldap_request_state state;
/* where to send the request */
- const char *dest_addr;
- int dest_port;
+ struct socket_address *dest;
/* timeout between retries (seconds) */
int timeout;
@@ -87,7 +86,7 @@ struct cldap_socket {
/* what to do with incoming request packets */
struct {
void (*handler)(struct cldap_socket *, struct ldap_message *,
- const char *, int );
+ struct socket_address *);
void *private;
} incoming;
};
@@ -114,7 +113,7 @@ struct cldap_socket *cldap_socket_init(TALLOC_CTX *mem_ctx,
struct event_context *event_ctx);
NTSTATUS cldap_set_incoming_handler(struct cldap_socket *cldap,
void (*handler)(struct cldap_socket *, struct ldap_message *,
- const char *, int ),
+ struct socket_address *),
void *private);
struct cldap_request *cldap_search_send(struct cldap_socket *cldap,
struct cldap_search *io);
@@ -129,8 +128,7 @@ NTSTATUS cldap_search(struct cldap_socket *cldap, TALLOC_CTX *mem_ctx,
*/
struct cldap_reply {
uint32_t messageid;
- const char *dest_address;
- int dest_port;
+ struct socket_address *dest;
struct ldap_SearchResEntry *response;
struct ldap_Result *result;
};
@@ -167,9 +165,9 @@ NTSTATUS cldap_netlogon(struct cldap_socket *cldap,
NTSTATUS cldap_empty_reply(struct cldap_socket *cldap,
uint32_t message_id,
- const char *src_address, int src_port);
+ struct socket_address *src);
NTSTATUS cldap_netlogon_reply(struct cldap_socket *cldap,
uint32_t message_id,
- const char *src_address, int src_port,
+ struct socket_address *src,
uint32_t version,
union nbt_cldap_netlogon *netlogon);