diff include/freeDiameter/libfdcore.h @ 1102:1d7b3ebda27f

Implemented the calls to HOOK_DATA_RECEIVED hook
author Sebastien Decugis <sdecugis@freediameter.net>
date Thu, 09 May 2013 16:40:02 +0800
parents 40b48a3997a2
children d8591b1c56cd
line wrap: on
line diff
--- a/include/freeDiameter/libfdcore.h	Thu May 09 12:06:03 2013 +0800
+++ b/include/freeDiameter/libfdcore.h	Thu May 09 16:40:02 2013 +0800
@@ -915,7 +915,7 @@
 		/* Hook called as soon as a message has been received from the network, after TLS & boundary processing.
 		 - {msg} is NULL.
 		 - {peer} is NULL.
-		 - {other} is a pointer to a structure { size_t len; uint8_t * buf; } containing the received buffer.
+		 - {other} is a pointer to a struct fd_cnx_rcvdata containing the received buffer.
 		 - {permsgdata} points to either a new empty structure allocated for this message (cf. fd_hook_data_hdl), or NULL if no hdl is registered.
 		 */
 		 
@@ -1024,6 +1024,12 @@
 /* A handle that will be associated with the extension, and with the permsgdata structures. */
 struct fd_hook_data_hdl;
 
+/* The following structure is what is passed to the HOOK_DATA_RECEIVED hook */
+struct fd_cnx_rcvdata {
+	size_t  length;
+	uint8_t * buffer; /* internal note: the buffer is padded with a struct fd_msg_pmdl, not accounted for in length */
+};
+
 /* Function to register a new fd_hook_data_hdl. Should be called by your extension init function.
  * The arguments are the functions called to initialize a new fd_hook_permsgdata and to free this structure when the corresponding message is being freed.
  */
"Welcome to our mercurial repository"