Navigation


Changeset 1102:1d7b3ebda27f in freeDiameter for include


Ignore:
Timestamp:
May 9, 2013, 5:40:02 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Children:
1103:d8591b1c56cd, 1105:6b4a417d2845
Phase:
public
Message:

Implemented the calls to HOOK_DATA_RECEIVED hook

Location:
include/freeDiameter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/libfdcore.h

    r1101 r1102  
    916916                 - {msg} is NULL.
    917917                 - {peer} is NULL.
    918                  - {other} is a pointer to a structure { size_t len; uint8_t * buf; } containing the received buffer.
     918                 - {other} is a pointer to a struct fd_cnx_rcvdata containing the received buffer.
    919919                 - {permsgdata} points to either a new empty structure allocated for this message (cf. fd_hook_data_hdl), or NULL if no hdl is registered.
    920920                 */
     
    10251025struct fd_hook_data_hdl;
    10261026
     1027/* The following structure is what is passed to the HOOK_DATA_RECEIVED hook */
     1028struct fd_cnx_rcvdata {
     1029        size_t  length;
     1030        uint8_t * buffer; /* internal note: the buffer is padded with a struct fd_msg_pmdl, not accounted for in length */
     1031};
     1032
    10271033/* Function to register a new fd_hook_data_hdl. Should be called by your extension init function.
    10281034 * 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.
  • include/freeDiameter/libfdproto.h

    r1101 r1102  
    25532553        pthread_mutex_t lock;
    25542554};
    2555 #define FD_MSG_PMDL_INITIALIZER(pmdl_ptr)        { FD_LIST_INITIALIZER(  (pmdl_ptr)->sentinel       ), PTHREAD_MUTEX_INITIALIZER }
    25562555struct fd_msg_pmdl * fd_msg_pmdl_get(struct msg * msg);
     2556
    25572557
    25582558/***************************************/
Note: See TracChangeset for help on using the changeset viewer.