From 9f1210a243654fd6d94acdef83f468a33c1b3b3f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2004 01:03:22 +0000 Subject: r3419: moved the libcli/raw structures into libcli/raw/libcliraw.h and made them private (This used to be commit 386ac565c452ede1d74e06acb401ca9db99d3ff3) --- source4/libcli/raw/libcliraw.h | 286 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 286 insertions(+) create mode 100644 source4/libcli/raw/libcliraw.h (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h new file mode 100644 index 0000000000..48abc82a68 --- /dev/null +++ b/source4/libcli/raw/libcliraw.h @@ -0,0 +1,286 @@ +/* + Unix SMB/CIFS implementation. + SMB parameters and setup + Copyright (C) Andrew Tridgell 1992-1998 + Copyright (C) Luke Kenneth Casson Leighton 1996-1998 + Copyright (C) Jeremy Allison 1998 + Copyright (C) James Myers 2003 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +struct smbcli_tree; /* forward declare */ +struct smbcli_request; /* forward declare */ +struct smbcli_session; /* forward declare */ +struct smbcli_transport; /* forward declare */ + +/* context that will be and has been negotiated between the client and server */ +struct smbcli_negotiate { + /* + * negotiated maximum transmit size - this is given to us by the server + */ + uint32_t max_xmit; + + /* maximum number of requests that can be multiplexed */ + uint16_t max_mux; + + /* the negotiatiated protocol */ + enum protocol_types protocol; + + uint8_t sec_mode; /* security mode returned by negprot */ + uint8_t key_len; + DATA_BLOB server_guid; /* server_guid */ + DATA_BLOB secblob; /* cryptkey or negTokenInit blob */ + uint32_t sesskey; + + struct smb_signing_context sign_info; + + /* capabilities that the server reported */ + uint32_t capabilities; + + int server_zone; + time_t server_time; + uint_t readbraw_supported:1; + uint_t writebraw_supported:1; + + char *server_domain; +}; + +/* this is the context for a SMB socket associated with the socket itself */ +struct smbcli_socket { + struct in_addr dest_ip; + /* dest hostname (which may or may not be a DNS name) */ + char *hostname; + + /* the port used */ + int port; + + struct socket_context *sock; + + /* a count of the number of packets we have received. We + * actually only care about zero/non-zero at this stage */ + uint_t pkt_count; + + /* the network address of the client */ + char *client_addr; + + /* timeout for socket operations in milliseconds. */ + int timeout; +}; + +/* + this structure allows applications to control the behaviour of the + client library +*/ +struct smbcli_options { + uint_t use_oplocks:1; + uint_t use_level2_oplocks:1; + uint_t use_spnego:1; + uint32_t max_xmit; + uint16_t max_mux; +}; + +/* this is the context for the client transport layer */ +struct smbcli_transport { + /* socket level info */ + struct smbcli_socket *socket; + + /* the next mid to be allocated - needed for signing and + request matching */ + uint16_t next_mid; + + /* negotiated protocol information */ + struct smbcli_negotiate negotiate; + + /* options to control the behaviour of the client code */ + struct smbcli_options options; + + /* is a readbraw pending? we need to handle that case + specially on receiving packets */ + uint_t readbraw_pending:1; + + /* an idle function - if this is defined then it will be + called once every period seconds while we are waiting + for a packet */ + struct { + void (*func)(struct smbcli_transport *, void *); + void *private; + uint_t period; + } idle; + + /* the error fields from the last message */ + struct { + enum {ETYPE_NONE, ETYPE_DOS, ETYPE_NT, ETYPE_SOCKET, ETYPE_NBT} etype; + union { + struct { + uint8_t eclass; + uint16_t ecode; + } dos; + NTSTATUS nt_status; + enum {SOCKET_READ_TIMEOUT, + SOCKET_READ_EOF, + SOCKET_READ_ERROR, + SOCKET_WRITE_ERROR, + SOCKET_READ_BAD_SIG} socket_error; + uint_t nbt_error; + } e; + } error; + + struct { + /* a oplock break request handler */ + BOOL (*handler)(struct smbcli_transport *transport, + uint16_t tid, uint16_t fnum, uint8_t level, void *private); + /* private data passed to the oplock handler */ + void *private; + } oplock; + + /* a list of async requests that are pending for send on this connection */ + struct smbcli_request *pending_send; + + /* a list of async requests that are pending for receive on this connection */ + struct smbcli_request *pending_recv; + + /* remember the called name - some sub-protocols require us to + know the server name */ + struct nmb_name called; + + /* a buffer for partially received SMB packets. */ + struct { + uint8_t header[NBT_HDR_SIZE]; + size_t req_size; + size_t received; + uint8_t *buffer; + } recv_buffer; + + /* the event handle for waiting for socket IO */ + struct { + struct event_context *ctx; + struct fd_event *fde; + struct timed_event *te; + } event; +}; + +/* this is the context for the user */ + +/* this is the context for the session layer */ +struct smbcli_session { + /* transport layer info */ + struct smbcli_transport *transport; + + /* after a session setup the server provides us with + a vuid identifying the security context */ + uint16_t vuid; + + /* default pid for this session */ + uint32_t pid; + + /* the flags2 for each packet - this allows + the user to control these for torture testing */ + uint16_t flags2; + + DATA_BLOB user_session_key; + + /* the spnego context if we use extented security */ + struct gensec_security *gensec; +}; + +/* + smbcli_tree context: internal state for a tree connection. + */ +struct smbcli_tree { + /* session layer info */ + struct smbcli_session *session; + + uint16_t tid; /* tree id, aka cnum */ + char *device; + char *fs_type; +}; + + +/* + a client request moves between the following 4 states. +*/ +enum smbcli_request_state {SMBCLI_REQUEST_INIT, /* we are creating the request */ + SMBCLI_REQUEST_SEND, /* the request is in the outgoing socket Q */ + SMBCLI_REQUEST_RECV, /* we are waiting for a matching reply */ + SMBCLI_REQUEST_DONE, /* the request is finished */ + SMBCLI_REQUEST_ERROR}; /* a packet or transport level error has occurred */ + +/* the context for a single SMB request. This is passed to any request-context + * functions (similar to context.h, the server version). + * This will allow requests to be multi-threaded. */ +struct smbcli_request { + /* allow a request to be part of a list of requests */ + struct smbcli_request *next, *prev; + + /* each request is in one of 4 possible states */ + enum smbcli_request_state state; + + /* a request always has a transport context, nearly always has + a session context and usually has a tree context */ + struct smbcli_transport *transport; + struct smbcli_session *session; + struct smbcli_tree *tree; + + /* the flags2 from the SMB request, in raw form (host byte + order). Used to parse strings */ + uint16_t flags2; + + /* the NT status for this request. Set by packet receive code + or code detecting error. */ + NTSTATUS status; + + /* the sequence number of this packet - used for signing */ + uint_t seq_num; + + /* set if this is a one-way request, meaning we are not + expecting a reply from the server. */ + uint_t one_way_request:1; + + /* set this when the request should only increment the signing + counter by one */ + uint_t sign_single_increment:1; + + /* the mid of this packet - used to match replies */ + uint16_t mid; + + struct request_buffer in; + struct request_buffer out; + + /* information on what to do with a reply when it is received + asyncronously. If this is not setup when a reply is received then + the reply is discarded + + The private pointer is private to the caller of the client + library (the application), not private to the library + */ + struct { + void (*fn)(struct smbcli_request *); + void *private; + } async; +}; + +/* useful way of catching wct errors with file and line number */ +#define SMBCLI_CHECK_MIN_WCT(req, wcount) if ((req)->in.wct < (wcount)) { \ + DEBUG(1,("Unexpected WCT %d at %s(%d) - expected min %d\n", (req)->in.wct, __FILE__, __LINE__, wcount)); \ + req->status = NT_STATUS_INVALID_PARAMETER; \ + goto failed; \ +} + +#define SMBCLI_CHECK_WCT(req, wcount) if ((req)->in.wct != (wcount)) { \ + DEBUG(1,("Unexpected WCT %d at %s(%d) - expected %d\n", (req)->in.wct, __FILE__, __LINE__, wcount)); \ + req->status = NT_STATUS_INVALID_PARAMETER; \ + goto failed; \ +} -- cgit From 284349482f5293a9a23d0f72d7c2aab46b55843b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2004 22:48:25 +0000 Subject: r3443: the next stage in the include files re-organisation. I have created the include/system/ directory, which will contain the wrappers for the system includes for logical subsystems. So far I have created include/system/kerberos.h and include/system/network.h, which contain all the system includes for kerberos code and networking code. These are the included in subsystems that need kerberos or networking respectively. Note that this method avoids the mess of #ifdef HAVE_XXX_H in every C file, instead each C module includes the include/system/XXX.h file for the logical system support it needs, and the details are kept isolated in include/system/ This patch also creates a "struct ipv4_addr" which replaces "struct in_addr" in our code. That avoids every C file needing to import all the system networking headers. (This used to be commit 2e25c71853f8996f73755277e448e7d670810349) --- source4/libcli/raw/libcliraw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 48abc82a68..9bbdd8a222 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -60,7 +60,7 @@ struct smbcli_negotiate { /* this is the context for a SMB socket associated with the socket itself */ struct smbcli_socket { - struct in_addr dest_ip; + struct ipv4_addr dest_ip; /* dest hostname (which may or may not be a DNS name) */ char *hostname; -- cgit From aa34fcebf8aa0660574a7c6976b33b3f37985e27 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 07:18:24 +0000 Subject: r3466: split out request.h, signing.h, and smb_server.h (This used to be commit 7c4e6ebf05790dd6e29896dd316db0fff613aa4e) --- source4/libcli/raw/libcliraw.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 9bbdd8a222..9b03ab713b 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -21,6 +21,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "request.h" + struct smbcli_tree; /* forward declare */ struct smbcli_request; /* forward declare */ struct smbcli_session; /* forward declare */ -- cgit From dde07058075d357cfdc63624c8dcaa67ebd40add Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 3 Nov 2004 10:09:48 +0000 Subject: r3507: - added deferred replies on sharing violation in pvfs open. The deferred reply is short-circuited immediately when the file is closed by another user, allowing it to be opened by the waiting user. - added a sane set of timeval manipulation routines - converted all the events code and code that uses it to use struct timeval instead of time_t, which allows for microsecond resolution instead of 1 second resolution. This was needed for doing the pvfs deferred open code, and is why the patch is so big. (This used to be commit 0d51511d408d91eb5f68a35e980e0875299b1831) --- source4/libcli/raw/libcliraw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 9b03ab713b..b00af846b7 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -114,7 +114,7 @@ struct smbcli_transport { uint_t readbraw_pending:1; /* an idle function - if this is defined then it will be - called once every period seconds while we are waiting + called once every period microseconds while we are waiting for a packet */ struct { void (*func)(struct smbcli_transport *, void *); -- cgit From 75f58e2d0fc3d2b07659caf34a07a0fb20cc1756 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Nov 2004 05:45:37 +0000 Subject: r4015: correct copyright attributions (This used to be commit 078d9ab05bffc79e4f329ea18fe3dafd144d989c) --- source4/libcli/raw/libcliraw.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index b00af846b7..51b50fdcb9 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -1,9 +1,8 @@ /* Unix SMB/CIFS implementation. SMB parameters and setup - Copyright (C) Andrew Tridgell 1992-1998 - Copyright (C) Luke Kenneth Casson Leighton 1996-1998 - Copyright (C) Jeremy Allison 1998 + + Copyright (C) Andrew Tridgell 2002-2004 Copyright (C) James Myers 2003 This program is free software; you can redistribute it and/or modify -- cgit From e89fd49df7e63dcf37ee1aa7e2f50965851725c9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 15 Jan 2005 10:38:12 +0000 Subject: r4757: added the ability of the clisocket level of libcli to handle async socket connections. This was complicated by a few factors: - it meant moving the event context from clitransport to clisocket, so lots of structures changed - we need to asynchronously handle connection to lists of port numbers, not just one port number. The code internally tries each port in the list in turn, without ever blocking - the man page on how connect() is supposed to work asynchronously doesn't work in practice (now why doesn't this surprise me?). The getsockopt() for SOL_ERROR is supposed to retrieve the error, but in fact the next (unrelated) connect() call on the same socket also gets an error, though not the right error. To work around this I need to tear down the whole socket between each attempted port. I hate posix. Note that clisocket.c still does a blocking name resolution call in smbcli_sock_connect_byname(). That will be fixed when we add the async NBT resolution code. Also note that I arranged things so that every SMB connection is now async internally, so using plain smbclient or smbtorture tests all the async features of this new code. (This used to be commit 468f8ebbfdbdf37c757fdc4863626aa9946a8870) --- source4/libcli/raw/libcliraw.h | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 51b50fdcb9..4047a5d369 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -61,24 +61,20 @@ struct smbcli_negotiate { /* this is the context for a SMB socket associated with the socket itself */ struct smbcli_socket { - struct ipv4_addr dest_ip; - /* dest hostname (which may or may not be a DNS name) */ - char *hostname; + struct socket_context *sock; - /* the port used */ + /* what port we ended up connected to */ int port; - - struct socket_context *sock; - /* a count of the number of packets we have received. We - * actually only care about zero/non-zero at this stage */ - uint_t pkt_count; + /* the hostname we connected to */ + const char *hostname; - /* the network address of the client */ - char *client_addr; - - /* timeout for socket operations in milliseconds. */ - int timeout; + /* the event handle for waiting for socket IO */ + struct { + struct event_context *ctx; + struct fd_event *fde; + struct timed_event *te; + } event; }; /* @@ -164,13 +160,6 @@ struct smbcli_transport { size_t received; uint8_t *buffer; } recv_buffer; - - /* the event handle for waiting for socket IO */ - struct { - struct event_context *ctx; - struct fd_event *fde; - struct timed_event *te; - } event; }; /* this is the context for the user */ -- cgit From 2383787f199c51cdc202a3cef5822a9fe6b8774c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 21 Jan 2005 11:18:56 +0000 Subject: r4891: - added a generic resolve_name() async interface in libcli/resolve/, which will eventually try all resolution methods setup in smb.conf - only resolution backend at the moment is bcast, which does a parallel broadcast to all configured network interfaces, and takes the first reply that comes in (this nicely demonstrates how to do parallel requests using the async APIs) - converted all the existing code to use the new resolve_name() api - removed all the old nmb code (yay!) (This used to be commit 239c310f255e43dd2d1c2433f666c9faaacbdce3) --- source4/libcli/raw/libcliraw.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 4047a5d369..d7414a237e 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -21,6 +21,7 @@ */ #include "request.h" +#include "librpc/gen_ndr/ndr_nbt.h" struct smbcli_tree; /* forward declare */ struct smbcli_request; /* forward declare */ @@ -151,7 +152,7 @@ struct smbcli_transport { /* remember the called name - some sub-protocols require us to know the server name */ - struct nmb_name called; + struct nbt_name called; /* a buffer for partially received SMB packets. */ struct { -- cgit From d13e788f20743989ff0d76b13262793027dc66bd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 16 Jun 2005 23:19:03 +0000 Subject: r7654: - add a timeout to all smb requests (default 60 seconds) - add a request destructor, to make it safe to destroy a pending request with talloc_free() (This used to be commit 72c6988767249caa585f37fec4c0afbf41557ec2) --- source4/libcli/raw/libcliraw.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index d7414a237e..2794a22da2 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -28,6 +28,9 @@ struct smbcli_request; /* forward declare */ struct smbcli_session; /* forward declare */ struct smbcli_transport; /* forward declare */ +/* default timeout for all smb requests */ +#define SMB_REQUEST_TIMEOUT 60 + /* context that will be and has been negotiated between the client and server */ struct smbcli_negotiate { /* @@ -88,6 +91,7 @@ struct smbcli_options { uint_t use_spnego:1; uint32_t max_xmit; uint16_t max_mux; + int request_timeout; }; /* this is the context for the client transport layer */ -- cgit From e0d521ca79314b7c27512565262f614f67e20e64 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 4 Jul 2005 01:23:38 +0000 Subject: r8104: - added support for our client library to not negotiate nt status codes, controlled with 'nt status support' option. - make nt_errstr() display nice strings for dos status codes encoded using NT_STATUS_DOS() - no longer map between dos and nt status codes in the client library, instead return using NT_STATUS_DOS() - fixed the RAW-CONTEXT test to look for NT_STATUS_DOS(ERRSRV, ERRbaduid) instead of NT_STATUS_INVALID_HANDLE (This used to be commit ff5549e87ffae9f062394f30d8fd1ae95b614735) --- source4/libcli/raw/libcliraw.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 2794a22da2..bb13210e74 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -124,12 +124,8 @@ struct smbcli_transport { /* the error fields from the last message */ struct { - enum {ETYPE_NONE, ETYPE_DOS, ETYPE_NT, ETYPE_SOCKET, ETYPE_NBT} etype; + enum {ETYPE_NONE, ETYPE_SMB, ETYPE_SOCKET, ETYPE_NBT} etype; union { - struct { - uint8_t eclass; - uint16_t ecode; - } dos; NTSTATUS nt_status; enum {SOCKET_READ_TIMEOUT, SOCKET_READ_EOF, -- cgit From 1c07c25322802eef7b57dda3975baca6c9114c83 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 9 Nov 2005 08:13:41 +0000 Subject: r11596: switched the libcli/raw/ code over to using the lib/stream/ generic packet parsing code. This simplifies the logic in the raw client library a fair bit (This used to be commit f8d43f1f67876360e1295d85a3c3702d1d60ed7b) --- source4/libcli/raw/libcliraw.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index bb13210e74..a853bd177c 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -154,13 +154,8 @@ struct smbcli_transport { know the server name */ struct nbt_name called; - /* a buffer for partially received SMB packets. */ - struct { - uint8_t header[NBT_HDR_SIZE]; - size_t req_size; - size_t received; - uint8_t *buffer; - } recv_buffer; + /* context of the stream -> packet parser */ + struct packet_context *packet; }; /* this is the context for the user */ -- cgit From 3b42d207efccbb31f94626f8fd98379e4a32cc35 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 10 Nov 2005 16:09:44 +0000 Subject: r11649: - add support for ntcancel replies (they only happen in error cases, e.g when you supply an invalid TID or VUID) - as we don't yet understand how to check the smb_signing of this replies, we just ignore the whole packet abartlet,jra,tridge: can someone try to find out how to create and verify the signatures for this replies. what I noticed is that still use the increment by one for the request, and later requests are still generated fine, only the generating and verifying of the ntcancel replies make problems metze (This used to be commit e6eb0fd2c2f45d6f612d74c6b527c7b17094c907) --- source4/libcli/raw/libcliraw.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index a853bd177c..dfc4dc37b5 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -231,6 +231,9 @@ struct smbcli_request { /* the sequence number of this packet - used for signing */ uint_t seq_num; + /* list of ntcancel request for this requests */ + struct smbcli_request *ntcancel; + /* set if this is a one-way request, meaning we are not expecting a reply from the server. */ uint_t one_way_request:1; -- cgit From b18ed75a75c111f23701295f31ecf3a117488e00 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 11 Nov 2005 01:38:39 +0000 Subject: r11660: - the libcli/raw/ lib no longer uses the SMBCLI_REQUEST_SEND state, or the associated send queue - fixed negnowait to not watch for the SMBCLI_REQUEST_SEND state (This used to be commit d19235ede5d352d0b0373d204f4357dddde5946f) --- source4/libcli/raw/libcliraw.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index dfc4dc37b5..decee83eb7 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -144,9 +144,6 @@ struct smbcli_transport { void *private; } oplock; - /* a list of async requests that are pending for send on this connection */ - struct smbcli_request *pending_send; - /* a list of async requests that are pending for receive on this connection */ struct smbcli_request *pending_recv; @@ -199,7 +196,6 @@ struct smbcli_tree { a client request moves between the following 4 states. */ enum smbcli_request_state {SMBCLI_REQUEST_INIT, /* we are creating the request */ - SMBCLI_REQUEST_SEND, /* the request is in the outgoing socket Q */ SMBCLI_REQUEST_RECV, /* we are waiting for a matching reply */ SMBCLI_REQUEST_DONE, /* the request is finished */ SMBCLI_REQUEST_ERROR}; /* a packet or transport level error has occurred */ -- cgit From 2cd5ca7d25f12aa9198bf8c2deb6aea282f573ee Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 28 Dec 2005 15:38:36 +0000 Subject: r12542: Move some more prototypes out to seperate headers (This used to be commit 0aca5fd5130d980d07398f3291d294202aefe3c2) --- source4/libcli/raw/libcliraw.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index decee83eb7..b09361b5ff 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -269,3 +269,5 @@ struct smbcli_request { req->status = NT_STATUS_INVALID_PARAMETER; \ goto failed; \ } + +#include "libcli/raw/raw_proto.h" -- cgit From 78c50015bb8bd5a1d831a6e7ec796b3367c73145 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 3 Jan 2006 15:40:05 +0000 Subject: r12694: Move some headers to the directory of the subsystem they belong to. (This used to be commit c722f665c90103f3ed57621c460e32ad33e7a8a3) --- source4/libcli/raw/libcliraw.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index b09361b5ff..7eb0694bd2 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -21,6 +21,7 @@ */ #include "request.h" +#include "smb.h" #include "librpc/gen_ndr/ndr_nbt.h" struct smbcli_tree; /* forward declare */ -- cgit From 5c8447773f306e302c7182611e4fc03978c340b6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 9 Jan 2006 21:44:30 +0000 Subject: r12801: Some more include/ cleanups (remove unused macros + move files to specific dirs) (This used to be commit 243cf760b077e155f5ac508aeebf819f7708a84e) --- source4/libcli/raw/libcliraw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 7eb0694bd2..96a06b9bec 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -20,7 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "request.h" +#include "libcli/raw/request.h" #include "smb.h" #include "librpc/gen_ndr/ndr_nbt.h" -- cgit From 8528016978b084213ef53d66e1b6e831b1a01acc Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 16 Mar 2006 00:23:11 +0000 Subject: r14464: Don't include ndr_BASENAME.h files unless strictly required, instead try to include just the BASENAME.h files (containing only structs) (This used to be commit 3dd477ca5147f28a962b8437e2611a8222d706bd) --- source4/libcli/raw/libcliraw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 96a06b9bec..f115a18d23 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -22,7 +22,7 @@ #include "libcli/raw/request.h" #include "smb.h" -#include "librpc/gen_ndr/ndr_nbt.h" +#include "librpc/gen_ndr/nbt.h" struct smbcli_tree; /* forward declare */ struct smbcli_request; /* forward declare */ -- cgit From 5b0051e0325aea7e46715aa61bba0a1dc025132c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 17 Mar 2006 13:55:10 +0000 Subject: r14511: Install more headers (This used to be commit e1f896948fad8cf5a1aec300865c250c5721ee7d) --- source4/libcli/raw/libcliraw.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index f115a18d23..21d0b0dcdb 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -20,8 +20,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef __LIBCLI_RAW_H__ +#define __LIBCLI_RAW_H__ + #include "libcli/raw/request.h" -#include "smb.h" #include "librpc/gen_ndr/nbt.h" struct smbcli_tree; /* forward declare */ @@ -271,4 +273,7 @@ struct smbcli_request { goto failed; \ } +#include "libcli/raw/interfaces.h" #include "libcli/raw/raw_proto.h" + +#endif /* __LIBCLI_RAW__H__ */ -- cgit From 35349a58df5b69446607fbd742a05f57f3515319 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 18 Mar 2006 15:42:57 +0000 Subject: r14542: Remove librpc, libndr and libnbt from includes.h (This used to be commit 51b4270513752d2eafbe77f9de598de16ef84a1f) --- source4/libcli/raw/libcliraw.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 21d0b0dcdb..2b856aa52b 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -31,6 +31,8 @@ struct smbcli_request; /* forward declare */ struct smbcli_session; /* forward declare */ struct smbcli_transport; /* forward declare */ +struct cli_credentials; + /* default timeout for all smb requests */ #define SMB_REQUEST_TIMEOUT 60 -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/libcli/raw/libcliraw.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 2b856aa52b..645ac46356 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -16,8 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #ifndef __LIBCLI_RAW_H__ -- cgit From 61ffa08f4c95e29d301de9fbabd6e71c2dbc1056 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 27 Aug 2007 18:10:19 +0000 Subject: r24712: No longer expose the 'BOOL' data type in any interfaces. (This used to be commit 1ce32673d960c8b05b6c1b1b99e1976a402417ae) --- source4/libcli/raw/libcliraw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 645ac46356..a11a9c9e58 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -142,7 +142,7 @@ struct smbcli_transport { struct { /* a oplock break request handler */ - BOOL (*handler)(struct smbcli_transport *transport, + bool (*handler)(struct smbcli_transport *transport, uint16_t tid, uint16_t fnum, uint8_t level, void *private); /* private data passed to the oplock handler */ void *private; -- cgit From 5f4842cf65ce64bfdf577cd549565da20ca818cf Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 10 Dec 2007 18:41:19 +0100 Subject: r26376: Add context for libcli_resolve. (This used to be commit 459e1466a411d6f83b7372e248566e6e71c745fc) --- source4/libcli/raw/libcliraw.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index a11a9c9e58..6c97e61f04 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -30,6 +30,7 @@ struct smbcli_request; /* forward declare */ struct smbcli_session; /* forward declare */ struct smbcli_transport; /* forward declare */ +struct resolve_context; struct cli_credentials; /* default timeout for all smb requests */ -- cgit From 425732f688865ebe2bfe568c8278edec50cbdedf Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 3 Jan 2008 17:21:58 -0600 Subject: r26651: libsmb: Allow specifying signing policy from higher up. The number of arguments is getting a bit excessive now, so it probably makes sense to pass in the smbcli_options struct rather than all members individually and add a convenience function for obtaining a smbcli_options struct from a loadparm context. (This used to be commit 9f64213463b5bf3bcbf36913139e9a5042e967a2) --- source4/libcli/raw/libcliraw.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 6c97e61f04..dd6904dec2 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -97,6 +97,7 @@ struct smbcli_options { uint32_t max_xmit; uint16_t max_mux; int request_timeout; + enum smb_signing_state signing; }; /* this is the context for the client transport layer */ -- cgit From dcc282590b34537fc1ead61c3300172528273b44 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 3 Jan 2008 17:22:12 -0600 Subject: r26654: libcli/smb_composite: Rather than specifying each of the gazillion options for SMB individually, just specify the smbcli_options struct. (This used to be commit 8a97886e24a4b969aa91409c06f423b71a45f6eb) --- source4/libcli/raw/libcliraw.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index dd6904dec2..0032eb4e94 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -94,6 +94,9 @@ struct smbcli_options { uint_t use_oplocks:1; uint_t use_level2_oplocks:1; uint_t use_spnego:1; + uint_t unicode:1; + uint_t ntstatus_support:1; + int max_protocol; uint32_t max_xmit; uint16_t max_mux; int request_timeout; -- cgit From e870cfec9f3512b0f1bd3110d7b975652525e28a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 14 Feb 2008 10:12:33 +1100 Subject: Convert SMB and SMB2 code to use a common buffer handling structure This converts our SMB and SMB2 code to use a common structure "struct request_bufinfo" for information on the buffer bounds of a packet, alignment information and string handling. This allows us to use a common backend for SMB and SMB2 code, while still using all the same string and blob handling functions. Up to now we had been passing a NULL req handle into these common routines from the SMB2 side of the server, which meant that we failed any operation which did a bounds checked string extraction (such as a RenameInformation setinfo call, which is what Vista uses for renaming files) There is still some more work to be done on this - for example we can now remove many of the SMB2 specific buffer handling functions that we had, and use the SMB ones. (This used to be commit ca6d9be6cb6a403a81b18fa6e9a6a0518d7f0f68) --- source4/libcli/raw/libcliraw.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 0032eb4e94..7111649fc1 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -250,8 +250,8 @@ struct smbcli_request { /* the mid of this packet - used to match replies */ uint16_t mid; - struct request_buffer in; - struct request_buffer out; + struct smb_request_buffer in; + struct smb_request_buffer out; /* information on what to do with a reply when it is received asyncronously. If this is not setup when a reply is received then -- cgit From 299265d47b5b2faac39fbf908c738f336ea21e67 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 21 Feb 2008 18:09:47 +0100 Subject: Remove yet more global_loadparm instances. (This used to be commit 5de88728ac5c567d3711d1ac6862bbdaced84b75) --- source4/libcli/raw/libcliraw.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 7111649fc1..0ea8f9dec2 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -186,6 +186,11 @@ struct smbcli_session { /* the spnego context if we use extented security */ struct gensec_security *gensec; + + struct smbcli_session_options { + uint_t lanman_auth; + uint_t ntlmv2_auth; + } options; }; /* -- cgit From 3c20b3eebafe46127a7b69cca573c6a128f8de89 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 21 Feb 2008 18:11:44 +0100 Subject: Fix the build. (This used to be commit f4b31ad76771d674ec85cd155b023eed377e6eb4) --- source4/libcli/raw/libcliraw.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 0ea8f9dec2..0578a9eab1 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -188,8 +188,9 @@ struct smbcli_session { struct gensec_security *gensec; struct smbcli_session_options { - uint_t lanman_auth; - uint_t ntlmv2_auth; + uint_t lanman_auth:1; + uint_t ntlmv2_auth:1; + uint_t plaintext_auth:1; } options; }; -- cgit From afe3e8172ddaa5e4aa811faceecda4f943d6e2ef Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 2 Apr 2008 04:53:27 +0200 Subject: Install public header files again and include required prototypes. (This used to be commit 47ffbbf67435904754469544390b67d34c958343) --- source4/libcli/raw/libcliraw.h | 76 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 0578a9eab1..16a98ad66e 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -286,6 +286,80 @@ struct smbcli_request { } #include "libcli/raw/interfaces.h" -#include "libcli/raw/raw_proto.h" + +NTSTATUS smb_raw_read_recv(struct smbcli_request *req, union smb_read *parms); +struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_read *parms); +NTSTATUS smb_raw_trans_recv(struct smbcli_request *req, + TALLOC_CTX *mem_ctx, + struct smb_trans2 *parms); +size_t smb_raw_max_trans_data(struct smbcli_tree *tree, size_t param_size); +struct smbcli_request *smb_raw_trans_send(struct smbcli_tree *tree, struct smb_trans2 *parms); +NTSTATUS smbcli_request_destroy(struct smbcli_request *req); +struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_write *parms); +struct smbcli_request *smb_raw_close_send(struct smbcli_tree *tree, union smb_close *parms); +NTSTATUS smb_raw_open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, union smb_open *parms); +struct smbcli_request *smb_raw_open_send(struct smbcli_tree *tree, union smb_open *parms); + +bool smbcli_transport_process(struct smbcli_transport *transport); +const char *smbcli_errstr(struct smbcli_tree *tree); +NTSTATUS smb_raw_fsinfo(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_fsinfo *fsinfo); +NTSTATUS smb_raw_pathinfo(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_fileinfo *parms); +NTSTATUS smb_raw_shadow_data(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, struct smb_shadow_copy *info); +NTSTATUS smb_raw_fileinfo(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_fileinfo *parms); +struct smbcli_tree *smbcli_tree_init(struct smbcli_session *session, TALLOC_CTX *parent_ctx, bool primary); +NTSTATUS smb_raw_tcon(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_tcon *parms); +void smbcli_oplock_handler(struct smbcli_transport *transport, + bool (*handler)(struct smbcli_transport *, uint16_t, uint16_t, uint8_t, void *), + void *private); +void smbcli_transport_idle_handler(struct smbcli_transport *transport, + void (*idle_func)(struct smbcli_transport *, void *), + uint64_t period, + void *private); +NTSTATUS smbcli_request_simple_recv(struct smbcli_request *req); +bool smbcli_oplock_ack(struct smbcli_tree *tree, uint16_t fnum, uint16_t ack_level); +NTSTATUS smb_raw_open(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_open *parms); +NTSTATUS smb_raw_close(struct smbcli_tree *tree, union smb_close *parms); +NTSTATUS smb_raw_unlink(struct smbcli_tree *tree, union smb_unlink *parms); +NTSTATUS smb_raw_chkpath(struct smbcli_tree *tree, union smb_chkpath *parms); +NTSTATUS smb_raw_mkdir(struct smbcli_tree *tree, union smb_mkdir *parms); +NTSTATUS smb_raw_rmdir(struct smbcli_tree *tree, struct smb_rmdir *parms); +NTSTATUS smb_raw_rename(struct smbcli_tree *tree, union smb_rename *parms); +NTSTATUS smb_raw_seek(struct smbcli_tree *tree, union smb_seek *parms); +NTSTATUS smb_raw_read(struct smbcli_tree *tree, union smb_read *parms); +NTSTATUS smb_raw_write(struct smbcli_tree *tree, union smb_write *parms); +NTSTATUS smb_raw_lock(struct smbcli_tree *tree, union smb_lock *parms); +NTSTATUS smb_raw_setpathinfo(struct smbcli_tree *tree, union smb_setfileinfo *parms); +NTSTATUS smb_raw_setfileinfo(struct smbcli_tree *tree, union smb_setfileinfo *parms); + +struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, union smb_notify *parms); +NTSTATUS smb_raw_changenotify_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, union smb_notify *parms); + +NTSTATUS smb_tree_disconnect(struct smbcli_tree *tree); +NTSTATUS smbcli_nt_error(struct smbcli_tree *tree); +NTSTATUS smb_raw_exit(struct smbcli_session *session); +NTSTATUS smb_raw_pathinfo_recv(struct smbcli_request *req, + TALLOC_CTX *mem_ctx, + union smb_fileinfo *parms); +struct smbcli_request *smb_raw_pathinfo_send(struct smbcli_tree *tree, + union smb_fileinfo *parms); +struct smbcli_request *smb_raw_setpathinfo_send(struct smbcli_tree *tree, + union smb_setfileinfo *parms); +struct smbcli_request *smb_raw_echo_send(struct smbcli_transport *transport, + struct smb_echo *p); +NTSTATUS smb_raw_search_first(struct smbcli_tree *tree, + TALLOC_CTX *mem_ctx, + union smb_search_first *io, void *private, + smbcli_search_callback callback); +NTSTATUS smb_raw_flush(struct smbcli_tree *tree, union smb_flush *parms); + +NTSTATUS smb_raw_trans(struct smbcli_tree *tree, + TALLOC_CTX *mem_ctx, + struct smb_trans2 *parms); + +struct smbcli_socket *smbcli_sock_connect_byname(const char *host, const char **ports, + TALLOC_CTX *mem_ctx, + struct resolve_context *resolve_ctx, + struct event_context *event_ctx); +void smbcli_sock_dead(struct smbcli_socket *sock); #endif /* __LIBCLI_RAW__H__ */ -- cgit From 7718a89222549d3d38f58193374d7b5d6b0e79fa Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 4 Jul 2008 19:52:23 +0200 Subject: libcli/raw: add a recv_helper hook infrastructure The recv helper will be called when a response comes and the recv helper can decide to let the request on the SMBCLI_REQUEST_RECV when more reponse packets are expected. It's up to the helper function to keep a reference to the in buffers, each incoming response overwrites req->in. metze (This used to be commit 6d84af89ba96627abe142ba7080c24ae2421ed6c) --- source4/libcli/raw/libcliraw.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/libcli/raw/libcliraw.h') diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 16a98ad66e..d55b4cc42c 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -231,6 +231,14 @@ struct smbcli_request { struct smbcli_session *session; struct smbcli_tree *tree; + /* a receive helper, smbcli_transport_finish_recv will not call + req->async.fn callback handler unless the recv_helper returns + a value > SMBCLI_REQUEST_RECV. */ + struct { + enum smbcli_request_state (*fn)(struct smbcli_request *); + void *private_data; + } recv_helper; + /* the flags2 from the SMB request, in raw form (host byte order). Used to parse strings */ uint16_t flags2; -- cgit