diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-07-04 19:52:23 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-07-07 13:43:13 +0200 |
commit | 7718a89222549d3d38f58193374d7b5d6b0e79fa (patch) | |
tree | 6d5e00572b608e51831fedb657f9b09d6c30f69d /source4/libcli/raw/libcliraw.h | |
parent | 70ccb7e7ce0154c98b3bb26c4a85b52b4929ecf1 (diff) | |
download | samba-7718a89222549d3d38f58193374d7b5d6b0e79fa.tar.gz samba-7718a89222549d3d38f58193374d7b5d6b0e79fa.tar.bz2 samba-7718a89222549d3d38f58193374d7b5d6b0e79fa.zip |
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)
Diffstat (limited to 'source4/libcli/raw/libcliraw.h')
-rw-r--r-- | source4/libcli/raw/libcliraw.h | 8 |
1 files changed, 8 insertions, 0 deletions
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; |