summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb_server.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-10-28 21:48:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:57 -0500
commit019719595778e0bd0a00781b33407554d1943985 (patch)
treedd54db0a15f72d5fe4a63a5104d120bcae735fba /source4/smb_server/smb_server.h
parent94c0b939c4735866945aea8b7a0377be4d814125 (diff)
downloadsamba-019719595778e0bd0a00781b33407554d1943985.tar.gz
samba-019719595778e0bd0a00781b33407554d1943985.tar.bz2
samba-019719595778e0bd0a00781b33407554d1943985.zip
r3336: use a struct ntvfs_async_state to be able to do async chaning of ntvfs modules
the idea is that a passthru module can use ntvfs_async_state_push() before calling ntvfs_next_*() and in the _send function it calls ntvfs_async_state_pop() and then call the upper layer send_fn itself - ntvfs_nbench is now fully async - the ntvfs_map_*() functions and the trans(2) mapping functions are not converted yet metze (This used to be commit fde64c0dc142b53d128c8ba09af048dc58d8ef3a)
Diffstat (limited to 'source4/smb_server/smb_server.h')
-rw-r--r--source4/smb_server/smb_server.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/source4/smb_server/smb_server.h b/source4/smb_server/smb_server.h
index 4de2aac907..065c01d6f5 100644
--- a/source4/smb_server/smb_server.h
+++ b/source4/smb_server/smb_server.h
@@ -71,6 +71,9 @@ struct smbsrv_tcon {
char *dev_type;
};
+/* a set of flags to control handling of request structures */
+#define REQ_CONTROL_LARGE (1<<1) /* allow replies larger than max_xmit */
+
/* the context for a single SMB request. This is passed to any request-context
functions */
struct smbsrv_request {
@@ -86,6 +89,9 @@ struct smbsrv_request {
/* the session context is derived from the vuid */
struct smbsrv_session *session;
+ /* the mid of this packet - used to match replies */
+ uint16_t mid;
+
/* a set of flags to control usage of the request. See REQ_CONTROL_* */
unsigned control_flags;
@@ -108,26 +114,8 @@ struct smbsrv_request {
/* the sequence number for signing */
uint64_t seq_num;
- /* the async structure allows backend functions to delay
- replying to requests. To use this, the front end must set
- async.send_fn to a function to be called by the backend
- when the reply is finally ready to be sent. The backend
- must set async.status to the status it wants in the
- reply. The backend must set the REQ_CONTROL_ASYNC
- control_flag on the request to indicate that it wishes to
- delay the reply
-
- If REQ_CONTROL_MAY_ASYNC is not set then the backend cannot
- ask for a delayed reply for this request
-
- note that the async.private pointer is private to the front
- end not the backend. The backend must not change it.
- */
- struct {
- void (*send_fn)(struct smbsrv_request *);
- void *private;
- NTSTATUS status;
- } async;
+ /* ntvfs per request async states */
+ struct ntvfs_async_state *async_states;
struct request_buffer in;
struct request_buffer out;