diff options
author | Volker Lendecke <vl@samba.org> | 2010-12-12 18:55:06 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-12-22 16:39:15 +0100 |
commit | 49cd92b2186addebba79efffc435083e6086aab1 (patch) | |
tree | efa30cec98b918b0a35a5fbfe73fd1b3915f0600 /source3/include | |
parent | 02a74fd36db962eaf6da14b920bccbee7d25f07e (diff) | |
download | samba-49cd92b2186addebba79efffc435083e6086aab1.tar.gz samba-49cd92b2186addebba79efffc435083e6086aab1.tar.bz2 samba-49cd92b2186addebba79efffc435083e6086aab1.zip |
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.
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/proto.h | 11 |
1 files changed, 11 insertions, 0 deletions
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, |