changeset 1077:b36c81e52e9a

Add empty code for hooks so that dbg_interactive extension can load
author Sebastien Decugis <sdecugis@freediameter.net>
date Thu, 02 May 2013 16:02:06 +0800
parents fcdcb562fea8
children b380c9f3be1e
files include/freeDiameter/libfdcore.h libfdcore/CMakeLists.txt libfdcore/hooks.c
diffstat 3 files changed, 67 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/include/freeDiameter/libfdcore.h	Thu May 02 15:46:17 2013 +0800
+++ b/include/freeDiameter/libfdcore.h	Thu May 02 16:02:06 2013 +0800
@@ -860,8 +860,8 @@
 /*                         MONITORING                         */
 /*============================================================*/
 
-/* These functions allows an extension to collect state information about the
- * framework state, as well as hooks at some key checkpoints in the processing
+/* These functions allow an extension to collect state information about the
+ * framework, as well as being hooked at some key checkpoints in the processing
  * for logging / statistics purpose.
  */
  
--- a/libfdcore/CMakeLists.txt	Thu May 02 15:46:17 2013 +0800
+++ b/libfdcore/CMakeLists.txt	Thu May 02 16:02:06 2013 +0800
@@ -18,6 +18,7 @@
 	events.c
 	extensions.c
 	fifo_stats.c
+	hooks.c
 	dict_base_proto.c
 	messages.c
 	queues.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libfdcore/hooks.c	Thu May 02 16:02:06 2013 +0800
@@ -0,0 +1,64 @@
+/*********************************************************************************************************
+* Software License Agreement (BSD License)                                                               *
+* Author: Sebastien Decugis <sdecugis@freediameter.net>							 *
+*													 *
+* Copyright (c) 2013, WIDE Project and NICT								 *
+* All rights reserved.											 *
+* 													 *
+* Redistribution and use of this software in source and binary forms, with or without modification, are  *
+* permitted provided that the following conditions are met:						 *
+* 													 *
+* * Redistributions of source code must retain the above 						 *
+*   copyright notice, this list of conditions and the 							 *
+*   following disclaimer.										 *
+*    													 *
+* * Redistributions in binary form must reproduce the above 						 *
+*   copyright notice, this list of conditions and the 							 *
+*   following disclaimer in the documentation and/or other						 *
+*   materials provided with the distribution.								 *
+* 													 *
+* * Neither the name of the WIDE Project or NICT nor the 						 *
+*   names of its contributors may be used to endorse or 						 *
+*   promote products derived from this software without 						 *
+*   specific prior written permission of WIDE Project and 						 *
+*   NICT.												 *
+* 													 *
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
+* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
+* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
+* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 	 *
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 	 *
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
+* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF   *
+* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.								 *
+*********************************************************************************************************/
+
+#include "fdcore-internal.h"
+
+struct fd_hook_hdl; 
+struct fd_hook_data_hdl;
+
+int fd_hook_data_register(
+	struct fd_hook_permsgdata * (*permsgdata_new_cb)     (void),
+        void (*permsgdata_destroy_cb) (struct fd_hook_permsgdata *),
+        struct fd_hook_data_hdl **    new_handle
+)
+{
+	return ENOTSUP;
+}
+
+int fd_hook_register (  enum fd_hook_type type, 
+			void (*fd_hook_cb)(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, void * regdata), 
+			void * regdata, 
+			struct fd_hook_data_hdl *data_hdl,
+			struct fd_hook_hdl ** handler )
+{
+	return ENOTSUP;
+}
+
+
+int fd_hook_unregister( struct fd_hook_hdl * handler )
+{
+	return ENOTSUP;
+}
+
"Welcome to our mercurial repository"