Navigation


Changeset 1088:1d1a20a0779d in freeDiameter for include


Ignore:
Timestamp:
May 5, 2013, 4:25:27 AM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Second part of changeset 1083, now the code compiles again. Still missing some functions implementation, though

Location:
include/freeDiameter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/libfdcore.h

    r1085 r1088  
    803803int fd_event_trig_regcb(int trigger_val, const char * module, void (*cb)(void));
    804804
     805#ifndef SWIG
    805806DECLARE_FD_DUMP_PROTOTYPE(fd_event_trig_dump);
    806807
     
    808809DECLARE_FD_DUMP_PROTOTYPE(fd_conf_dump);
    809810DECLARE_FD_DUMP_PROTOTYPE(fd_ext_dump);
     811DECLARE_FD_DUMP_PROTOTYPE(fd_servers_dump);
     812#endif /* SWIG */
    810813DECLARE_FD_DUMP_PROTOTYPE(fd_peer_dump_list, int details);
    811814DECLARE_FD_DUMP_PROTOTYPE(fd_peer_dump, struct peer_hdr * p, int details);
    812 DECLARE_FD_DUMP_PROTOTYPE(fd_servers_dump);
    813815
    814816/*============================================================*/
  • include/freeDiameter/libfdproto.h

    r1087 r1088  
    222222
    223223
    224 /* Helper function for the *dump functions that add into a buffer */
     224/* Helper functions for the *dump functions that add into a buffer */
    225225char * fd_dump_extend(char ** buf, size_t *len, size_t *offset, const char * format, ... ) _ATTRIBUTE_PRINTFLIKE_(4,5);
     226char * fd_dump_extend_hexdump(char ** buf, size_t *len, size_t *offset, uint8_t *data, size_t datalen, size_t trunc, size_t wrap );
    226227
    227228/* All dump functions follow the same prototype:
     
    18171818
    18181819/* The state information that a module associate with a session -- each module defines its own data format */
    1819 typedef void session_state;
    1820 
    1821 typedef DECLARE_FD_DUMP_PROTOTYPE(session_state_dump, session_state * st);
     1820struct sess_state; /* declare this in your own extension */
     1821
     1822typedef DECLARE_FD_DUMP_PROTOTYPE((*session_state_dump), struct sess_state * st);
    18221823
    18231824/* The following function must be called to activate the session expiry mechanism */
     
    18431844 *  ENOMEM      : Not enough memory to complete the operation
    18441845 */
    1845 int fd_sess_handler_create_internal ( struct session_handler ** handler, void (*cleanup)(session_state * state, os0_t sid, void * opaque), session_state_dump dumper, void * opaque );
    1846 /* Macro to avoid casting everywhere */
    1847 #define fd_sess_handler_create( _handler, _cleanup, _dumper, _opaque ) \
    1848         fd_sess_handler_create_internal( (_handler), (void (*)(session_state *, os0_t, void *))(_cleanup), _dumper, (void *)(_opaque) )
     1846int fd_sess_handler_create ( struct session_handler ** handler, void (*cleanup)(struct sess_state * state, os0_t sid, void * opaque), session_state_dump dumper, void * opaque );
    18491847
    18501848       
     
    20182016 *  ENOMEM      : Not enough memory to complete the operation
    20192017 */
    2020 int fd_sess_state_store_internal ( struct session_handler * handler, struct session * session, session_state ** state );
    2021 #define fd_sess_state_store( _handler, _session, _state ) \
    2022         fd_sess_state_store_internal( (_handler), (_session), (void *)(_state) )
     2018int fd_sess_state_store ( struct session_handler * handler, struct session * session, struct sess_state ** state );
    20232019
    20242020/*
     
    20402036 *  EINVAL      : A parameter is invalid.
    20412037 */
    2042 int fd_sess_state_retrieve_internal ( struct session_handler * handler, struct session * session, session_state ** state );
    2043 #define fd_sess_state_retrieve( _handler, _session, _state ) \
    2044         fd_sess_state_retrieve_internal( (_handler), (_session), (void *)(_state) )
     2038int fd_sess_state_retrieve ( struct session_handler * handler, struct session * session, struct sess_state ** state );
    20452039
    20462040
Note: See TracChangeset for help on using the changeset viewer.