Changeset 1088:1d1a20a0779d in freeDiameter for include/freeDiameter/libfdproto.h
- Timestamp:
- May 5, 2013, 4:25:27 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/libfdproto.h
r1087 r1088 222 222 223 223 224 /* Helper function for the *dump functions that add into a buffer */224 /* Helper functions for the *dump functions that add into a buffer */ 225 225 char * fd_dump_extend(char ** buf, size_t *len, size_t *offset, const char * format, ... ) _ATTRIBUTE_PRINTFLIKE_(4,5); 226 char * fd_dump_extend_hexdump(char ** buf, size_t *len, size_t *offset, uint8_t *data, size_t datalen, size_t trunc, size_t wrap ); 226 227 227 228 /* All dump functions follow the same prototype: … … 1817 1818 1818 1819 /* 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);1820 struct sess_state; /* declare this in your own extension */ 1821 1822 typedef DECLARE_FD_DUMP_PROTOTYPE((*session_state_dump), struct sess_state * st); 1822 1823 1823 1824 /* The following function must be called to activate the session expiry mechanism */ … … 1843 1844 * ENOMEM : Not enough memory to complete the operation 1844 1845 */ 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) ) 1846 int 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 ); 1849 1847 1850 1848 … … 2018 2016 * ENOMEM : Not enough memory to complete the operation 2019 2017 */ 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) ) 2018 int fd_sess_state_store ( struct session_handler * handler, struct session * session, struct sess_state ** state ); 2023 2019 2024 2020 /* … … 2040 2036 * EINVAL : A parameter is invalid. 2041 2037 */ 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) ) 2038 int fd_sess_state_retrieve ( struct session_handler * handler, struct session * session, struct sess_state ** state ); 2045 2039 2046 2040
Note: See TracChangeset
for help on using the changeset viewer.