summaryrefslogtreecommitdiff
path: root/source4/libcli/smb2/smb2.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-06-08 16:24:27 +0200
committerStefan Metzmacher <metze@samba.org>2009-06-09 16:49:29 +0200
commitd777879aaa3d86cd31fe5d1e0bbd15b9ee02e5cb (patch)
treee7361027e7752e9b29bbba6c8d10cc585cbedc67 /source4/libcli/smb2/smb2.h
parent81275c84d31b9939bd2e8e6c56cf2c0498468a31 (diff)
downloadsamba-d777879aaa3d86cd31fe5d1e0bbd15b9ee02e5cb.tar.gz
samba-d777879aaa3d86cd31fe5d1e0bbd15b9ee02e5cb.tar.bz2
samba-d777879aaa3d86cd31fe5d1e0bbd15b9ee02e5cb.zip
s4:libcli/smb2: add support sending compounded requests
metze
Diffstat (limited to 'source4/libcli/smb2/smb2.h')
-rw-r--r--source4/libcli/smb2/smb2.h65
1 files changed, 36 insertions, 29 deletions
diff --git a/source4/libcli/smb2/smb2.h b/source4/libcli/smb2/smb2.h
index f1c83215c7..39d6aaacba 100644
--- a/source4/libcli/smb2/smb2.h
+++ b/source4/libcli/smb2/smb2.h
@@ -40,6 +40,35 @@ struct smb2_negotiate {
uint16_t dialect_revision;
};
+struct smb2_request_buffer {
+ /* the raw SMB2 buffer, including the 4 byte length header */
+ uint8_t *buffer;
+
+ /* the size of the raw buffer, including 4 byte header */
+ size_t size;
+
+ /* how much has been allocated - on reply the buffer is over-allocated to
+ prevent too many realloc() calls
+ */
+ size_t allocated;
+
+ /* the start of the SMB2 header - this is always buffer+4 */
+ uint8_t *hdr;
+
+ /* the packet body */
+ uint8_t *body;
+ size_t body_fixed;
+ size_t body_size;
+
+ /* this point to the next dynamic byte that can be used
+ * this will be moved when some dynamic data is pushed
+ */
+ uint8_t *dynamic;
+
+ /* this is used to range check and align strings and buffers */
+ struct request_bufinfo bufinfo;
+};
+
/* this is the context for the smb2 transport layer */
struct smb2_transport {
/* socket level info */
@@ -50,6 +79,13 @@ struct smb2_transport {
/* next seqnum to allocate */
uint64_t seqnum;
+ /* the details for coumpounded requests */
+ struct {
+ uint32_t missing;
+ bool related;
+ struct smb2_request_buffer buffer;
+ } compound;
+
/* a list of requests that are pending for receive on this
connection */
struct smb2_request *pending_recv;
@@ -110,35 +146,6 @@ struct smb2_session {
};
-struct smb2_request_buffer {
- /* the raw SMB2 buffer, including the 4 byte length header */
- uint8_t *buffer;
-
- /* the size of the raw buffer, including 4 byte header */
- size_t size;
-
- /* how much has been allocated - on reply the buffer is over-allocated to
- prevent too many realloc() calls
- */
- size_t allocated;
-
- /* the start of the SMB2 header - this is always buffer+4 */
- uint8_t *hdr;
-
- /* the packet body */
- uint8_t *body;
- size_t body_fixed;
- size_t body_size;
-
- /* this point to the next dynamic byte that can be used
- * this will be moved when some dynamic data is pushed
- */
- uint8_t *dynamic;
-
- /* this is used to range check and align strings and buffers */
- struct request_bufinfo bufinfo;
-};
-
/*
a client request moves between the following 4 states.