From 975a7a3d1b075bcaca820b2431c04734a139062f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 16 Feb 2010 11:23:58 +0100 Subject: tstream: Added a typedef for the function prototype. --- libcli/util/tstream.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'libcli/util/tstream.h') diff --git a/libcli/util/tstream.h b/libcli/util/tstream.h index a9452879855..36ae65d9e5b 100644 --- a/libcli/util/tstream.h +++ b/libcli/util/tstream.h @@ -20,6 +20,22 @@ #ifndef _LIBCLI_UTIL_TSTREAM_H_ #define _LIBCLI_UTIL_TSTREAM_H_ +/** + * @brief The function which will report the size of the full pdu. + * + * @param[in] private_data Some private data which could be used. + * + * @param[in] blob The received blob to get the size from. + * + * @param[out] packet_size The pointer to store the size of the full pdu. + * + * @return NT_STATUS_OK on success, STATUS_MORE_ENTRIES if there + * are more entries. + */ +typedef NTSTATUS tstream_read_pdu_blob_full_fn_t(void *private_data, + DATA_BLOB blob, + size_t *packet_size); + /** * @brief A helper function to read a full PDU from a stream * @@ -54,9 +70,7 @@ struct tevent_req *tstream_read_pdu_blob_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct tstream_context *stream, size_t inital_read_size, - NTSTATUS (*full_fn)(void *private_data, - DATA_BLOB blob, - size_t *packet_size), + tstream_read_pdu_blob_full_fn_t *full_fn, void *full_private); /** * @brief Receive the result of the tstream_read_pdu_blob_send() call. -- cgit