Metaswitch/freeDiameter — pull request #13 by AlexHockey (2014-11-13 11:01:50+00:00)
Title: [Reviewer: Matt] SAS logging from freeDiameter

Matt, please can you review my changes to allow us to SAS log diameter messages (along with the local and remote IP addresses and ports) from within the diameter stack.

This PR covers the freeDiameter changes. FD has a hooks interface that allows the application to register callback at different points in a message lifecycle. The hooks also allow for "per-message data" (PMD) that carries application-specific information.

I have extended freeDiameter as follows:

* Allow applications to access PMD outside of hooks.
* Provide an interface to get the local/remote IP/port combos for a given peer.
* Changed the definitions of the `HOOK_MESSAGE_RECEIVED` and `HOOK_MESSAGE_SENT` hooks to pass the bufferized message.