Mercurial > hg > freeDiameter
diff include/freeDiameter/libfdproto.h @ 1098:f38d77f9cfd3
Initial implementation of the hook mechanism
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Thu, 09 May 2013 11:59:34 +0800 |
parents | 4d2dcb54d9a6 |
children | 40b48a3997a2 |
line wrap: on
line diff
--- a/include/freeDiameter/libfdproto.h Mon May 06 18:49:59 2013 +0800 +++ b/include/freeDiameter/libfdproto.h Thu May 09 11:59:34 2013 +0800 @@ -2549,6 +2549,14 @@ int fd_msg_sess_set(struct msg * msg, struct session * session); +/* Helper for the hooks mechanism, for use from libfdcore */ +struct fd_msg_pmdl { + struct fd_list sentinel; /* if the sentinel.o field is NULL, the structure is not initialized. Otherwise it points to the cleanup function in libfdcore. */ + pthread_mutex_t lock; +}; +#define FD_MSG_PMDL_INITIALIZER(pmdl_ptr) { FD_LIST_INITIALIZER( (pmdl_ptr)->sentinel ), PTHREAD_MUTEX_INITIALIZER } +struct fd_msg_pmdl * fd_msg_pmdl_get(struct msg * msg); + /***************************************/ /* Manage AVP values */ /***************************************/