From 49cd92b2186addebba79efffc435083e6086aab1 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 12 Dec 2010 18:55:06 +0100 Subject: s3: Add an async smbsock_connect This connects to 445 and after 5 milliseconds also to 139. It treats a netbios session setup failure as equivalent as a TCP connect failure. So if 139 is faster but fails the nb session setup, the 445 still has the chance to succeed. --- source3/include/proto.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3/include/proto.h') diff --git a/source3/include/proto.h b/source3/include/proto.h index 565f045c44..8577dc2798 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5617,6 +5617,17 @@ struct tevent_req *fncall_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, void *private_data); int fncall_recv(struct tevent_req *req, int *perr); +struct tevent_req *smbsock_connect_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + const struct sockaddr_storage *addr, + const char *called_name, + const char *calling_name); +NTSTATUS smbsock_connect_recv(struct tevent_req *req, int *sock, + uint16_t *port); +NTSTATUS smbsock_connect(const struct sockaddr_storage *addr, + const char *called_name, const char *calling_name, + int *pfd, uint16_t *port); + /* The following definitions come from rpc_server/srv_samr_nt.c */ NTSTATUS access_check_object( struct security_descriptor *psd, struct security_token *token, enum sec_privilege needed_priv_1, enum sec_privilege needed_priv_2, -- cgit