Mercurial > hg > freeDiameter
diff include/freeDiameter/libfdcore.h @ 1299:035f489b845b
Added a new hook HOOK_MESSAGE_SENDING
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Sat, 04 Jul 2015 23:06:37 +0800 |
parents | cec3e9b579e1 |
children | 50fb308e84f7 |
line wrap: on
line diff
--- a/include/freeDiameter/libfdcore.h Tue Jun 23 12:12:10 2015 +0800 +++ b/include/freeDiameter/libfdcore.h Sat Jul 04 23:06:37 2015 +0800 @@ -964,6 +964,16 @@ - {permsgdata} points to a new empty structure allocated for this request (cf. fd_hook_data_hdl) */ + HOOK_MESSAGE_SENDING, + /* Hook called when a message is about to be sent to a peer. The message pointer cannot be modified here, but the content of the message + could still be changed (for example add or remove some AVP. This is the last chance. + - {msg} points to the message. Some objects may not have been dictionary resolved. If you + try to call fd_msg_parse_dict, it will slow down the operation of the instance. + - {peer} is the one the message is being sent to. + - {other} is NULL. + - {permsgdata} points to existing structure if any, or a new structure otherwise. + */ + HOOK_MESSAGE_SENT, /* Hook called when a message has been sent to a peer. The message might be freed as soon as the hook function returns, so it is not safe to store the pointer for asynchronous processing.