Navigation


Changeset 618:1dbc4c5397d6 in freeDiameter


Ignore:
Timestamp:
Dec 3, 2010, 6:29:51 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Attempting to improve python wrapper usability (work in progress)

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/dbg_interactive/CMakeLists.txt

    r609 r618  
    1313SET(CMAKE_SWIG_FLAGS "")
    1414
    15 # We create the module even if we don't use it, so that intermediate values are defined
     15# Add the dependencies for re-swig-ing the file
     16SET(SWIG_MODULE_diwrap_EXTRA_DEPS
     17        ${CMAKE_BINARY_DIR}/include/freeDiameter/freeDiameter-host.h
     18        ${CMAKE_SOURCE_DIR}/include/freeDiameter/libfreeDiameter.h
     19        ${CMAKE_SOURCE_DIR}/include/freeDiameter/freeDiameter.h)
     20
     21# We create the module even if we don't use it, so that intermediate values are defined (OK, this is stupid...)
    1622SWIG_ADD_MODULE(diwrap python diwrap.i)
    1723
  • extensions/dbg_interactive/dbg_interactive.c

    r609 r618  
    4444static void * myinterp (void * arg)
    4545{
    46         char * dum[2] = { arg, NULL };
     46        char * dum[3] = { "<dbg_interactive>", arg, NULL };
    4747        TRACE_ENTRY("%p", arg);
     48       
     49        fd_log_threadname ( "[dbg_interactive python interpreter]" );
    4850       
    4951        sleep(1);
    5052        fd_log_debug("\nStarting python interpreter [experimental].\n");
    5153        fd_log_debug("Example syntax:\n>>> print fd_config_cnf_diamid_get(cvar.fd_g_config)\n\n");
    52         Py_Main(arg ? 1 : 0, dum);
     54        Py_Main(arg ? 2 : 1, dum);
    5355       
    5456        /* Upon exit, issue the order of terminating to fD */
  • extensions/dbg_interactive/diwrap.i

    r609 r618  
    3434*********************************************************************************************************/
    3535
     36/* This interface file is processed by SWIG to create a python wrapper interface to freeDiameter framework. */
    3637%module diwrap
     38
     39/* Include standard types used in freeDiameter headers */
     40%include <stdint.i>
     41 
     42/* Allow modification of the wrapper for OUTPUT vars */
     43%include "typemaps.i"
     44
    3745%{
    38 /* include the header in the wrapper code */
     46/* Define types etc. */
    3947#include <freeDiameter/extension.h>
    4048%}
    4149
    42 /* Parse the header to generate the wrappers */
     50/* Retrieve the compile-time definitions of freeDiameter */
    4351%include "freeDiameter/freeDiameter-host.h"
    4452%include "freeDiameter/libfreeDiameter.h"
  • include/freeDiameter/freeDiameter.h

    r578 r618  
    4747#endif /* GNUTLS_VERSION */
    4848
     49#ifndef SWIG
    4950/* GNUTLS calls debug level */
    5051#ifndef GNUTLS_DBG_LEVEL
     
    6869        (__call__);                                                     \
    6970}
    70 
     71#endif /* !SWIG */
    7172
    7273/* Structure to hold the configuration of the freeDiameter daemon */
     
    127128        struct fifo       *cnf_main_ev; /* events for the daemon's main (struct fd_event items) */
    128129};
     130#ifdef SWIG
     131%immutable;
     132#endif /* SWIG */
    129133extern struct fd_config *fd_g_config; /* The pointer to access the global configuration, initalized in main */
     134#ifdef SWIG
     135%mutable;
     136#endif /* SWIG */
    130137
    131138
     
    175182        , "STATE_ZOMBIE"                \
    176183        };
     184#ifndef SWIG
    177185extern const char *peer_state_str[];
     186#else /* SWIG */
     187%immutable;
     188extern const char **peer_state_str;
     189%mutable;
     190#endif /* !SWIG */
    178191#define STATE_STR(state) \
    179192        (((unsigned)(state)) <= STATE_MAX ? peer_state_str[((unsigned)(state)) ] : "<Invalid>")
     
    314327 * !0   : An error occurred.
    315328 */
    316 int fd_peer_getbyid( char * diamid, struct peer_hdr ** peer );
     329int fd_peer_getbyid( char * diamid, struct peer_hdr ** S_OUT(peer) );
    317330
    318331/*
     
    537550 *  ENOMEM      : Not enough memory to complete the operation
    538551 */
    539 int fd_rt_fwd_register ( int (*rt_fwd_cb)(void * cbdata, struct msg ** msg), void * cbdata, enum fd_rt_fwd_dir dir, struct fd_rt_fwd_hdl ** handler );
     552int fd_rt_fwd_register ( int (*rt_fwd_cb)(void * cbdata, struct msg ** msg), void * cbdata, enum fd_rt_fwd_dir dir, struct fd_rt_fwd_hdl ** S_OUT(handler) );
    540553/*
    541554 * CALLBACK:    rt_fwd_cb
     
    611624 *  ENOMEM      : Not enough memory to complete the operation
    612625 */
    613 int fd_rt_out_register ( int (*rt_out_cb)(void * cbdata, struct msg * msg, struct fd_list * candidates), void * cbdata, int priority, struct fd_rt_out_hdl ** handler );
     626int fd_rt_out_register ( int (*rt_out_cb)(void * cbdata, struct msg * msg, struct fd_list * candidates), void * cbdata, int priority, struct fd_rt_out_hdl ** S_OUT(handler) );
    614627/*
    615628 * CALLBACK:    rt_out_cb
     
    671684
    672685int fd_event_send(struct fifo *queue, int code, size_t datasz, void * data);
    673 int fd_event_get(struct fifo *queue, int *code, size_t *datasz, void ** data);
    674 int fd_event_timedget(struct fifo *queue, struct timespec * timeout, int timeoutcode, int *code, size_t *datasz, void ** data);
     686int fd_event_get(struct fifo *queue, int * S_OUT(code), size_t * S_OUT(datasz), void ** S_OUT(data));
     687int fd_event_timedget(struct fifo *queue, struct timespec * timeout, int timeoutcode, int * S_OUT(code), size_t * S_OUT(datasz), void ** S_OUT(data));
    675688void fd_event_destroy(struct fifo **queue, void (*free_cb)(void * data));
    676689const char * fd_ev_str(int event);
     
    684697        struct fd_list  chain;  /* link in cnf_endpoints list */
    685698       
     699#ifndef SWIG
    686700        union {
    687701                sSS             ss;     /* the socket information. List is always ordered by ss value (memcmp) -- see fd_ep_add_merge */
     
    690704                sSA             sa;
    691705        };
     706#else /* !SWIG */
     707        /* SWIG does not support unions inside struct, we only define sa in this case */
     708        sSA             sa;
     709#endif /* !SWIG */
    692710       
    693711#define EP_FL_CONF      (1 << 0)        /* This endpoint is statically configured in a configuration file */
     
    726744int fd_app_merge(struct fd_list * list, application_id_t aid, vendor_id_t vid, int auth, int acct);
    727745int fd_app_check(struct fd_list * list, application_id_t aid, struct fd_app **detail);
    728 int fd_app_check_common(struct fd_list * list1, struct fd_list * list2, int * common_found);
     746int fd_app_check_common(struct fd_list * list1, struct fd_list * list2, int * S_OUT(common_found));
    729747int fd_app_empty(struct fd_list * list);
    730748
  • include/freeDiameter/libfreeDiameter.h

    r609 r618  
    3030* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS    *
    3131* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
    32 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF   *
     32* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY S_OUT OF THE USE OF THIS SOFTWARE, EVEN IF   *
    3333* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                                                             *
    3434*********************************************************************************************************/
     
    7878#endif /* DEBUG */
    7979
     80#ifdef SWIG
     81#define S_INOUT(_p_) INOUT
     82#define S_OUT(_p_) OUTPUT
     83#else /* SWIG */
     84#define S_INOUT(_p_) _p_
     85#define S_OUT(_p_) _p_
     86#endif /* SWIG */
    8087
    8188/*============================================================*/
    8289/*                          INIT                              */
    8390/*============================================================*/
     91#ifndef SWIG  /* This section is not included in wrapper */
     92
    8493
    8594/* This function must be called first, before any call to another library function */
     
    92101
    93102
    94 
    95 
     103#endif /* !SWIG */
    96104/*============================================================*/
    97105/*                          DEBUG                             */
    98106/*============================================================*/
     107
    99108
    100109/*
     
    117126 */
    118127void fd_log_debug ( char * format, ... );
     128#ifndef SWIG
    119129extern pthread_mutex_t  fd_log_lock;
     130#endif /* !SWIG */
    120131extern char * fd_debug_one_function;
    121132extern char * fd_debug_one_file;
     
    136147 *  None.
    137148 */
     149#ifndef SWIG
    138150void fd_log_threadname ( char * name );
    139151extern pthread_key_t    fd_log_thname;
     152#endif /* !SWIG */
    140153
    141154/*
     
    160173/*============================================================*/
    161174
     175#ifndef SWIG
    162176#ifndef ASSERT
    163177#define ASSERT(x) assert(x)
    164178#endif /* ASSERT */
     179#endif /* !SWIG */
    165180
    166181/* levels definitions */
     
    173188
    174189/* Default level is INFO */
     190#ifndef SWIG
    175191#ifndef TRACE_LEVEL
    176192#define TRACE_LEVEL INFO
    177193#endif /* TRACE_LEVEL */
     194#endif /* !SWIG */
    178195
    179196/* The level of the file being compiled. */
     197#ifndef SWIG
    180198static int local_debug_level = TRACE_LEVEL;
     199#endif /* !SWIG */
    181200
    182201/* A global level, changed by configuration or cmd line for example. default is 0. */
     
    184203
    185204/* Some portability code to get nice function name in __PRETTY_FUNCTION__ */
     205#ifndef SWIG
    186206#if __STDC_VERSION__ < 199901L
    187207# if __GNUC__ >= 2
     
    194214#define __PRETTY_FUNCTION__ __func__
    195215#endif /* __PRETTY_FUNCTION__ */
     216#endif /* !SWIG */
    196217
    197218/* A version of __FILE__ without the full path */
     219#ifndef SWIG
    198220static char * file_bname = NULL;
    199221#define __STRIPPED_FILE__       (file_bname ?: (file_bname = basename(__FILE__)))
     222#endif /* !SWIG */
    200223
    201224
    202225/* Boolean for tracing at a certain level */
     226#ifndef SWIG
    203227#ifdef DEBUG
    204228#define TRACE_BOOL(_level_) ( ((_level_) <= local_debug_level + fd_g_debug_lvl)                                         \
     
    208232#define TRACE_BOOL(_level_) ((_level_) <= local_debug_level + fd_g_debug_lvl)
    209233#endif /* DEBUG */
     234#endif /* !SWIG */
    210235
    211236
     
    213238 The general debug macro, each call results in two lines of debug messages (change the macro for more compact output)
    214239 *************/
     240#ifndef SWIG
    215241#ifdef DEBUG
    216242/* In DEBUG mode, we add (a lot of) meta-information along each trace. This makes multi-threading problems easier to debug. */
     
    242268}
    243269#endif /* DEBUG */
     270#endif /* !SWIG */
    244271
    245272/*************
    246273 Derivatives from this macro
    247274 ************/
     275#ifndef SWIG
    248276/* Helper for function entry -- for very detailed trace of the execution */
    249277#define TRACE_ENTRY(_format,_args... ) \
     
    377405#endif /* STRIP_DEBUG_CODE */
    378406
     407#endif /* !SWIG */
    379408
    380409/*============================================================*/
     
    385414 * These macro should be used only when errors are improbable, not for expected errors.
    386415 */
     416#ifndef SWIG
    387417
    388418/* Check the return value of a system function and execute fallback in case of error */
     
    478508}
    479509
     510#endif /* !SWIG */
     511
    480512
    481513/*============================================================*/
    482514/*                  OTHER MACROS                              */
    483515/*============================================================*/
     516
     517#ifndef SWIG
    484518
    485519/* helper macros (pre-processor hacks to allow macro arguments) */
     
    565599#endif /* BUFSIZ */
    566600
     601#endif /* !SWIG */
    567602
    568603
     
    570605/*                          THREADS                           */
    571606/*============================================================*/
    572 #ifndef SWIG
     607#ifndef SWIG 
    573608
    574609/* Terminate a thread */
     
    633668        }
    634669}
    635 
    636 #endif /* SWIG */
     670#endif /* !SWIG */
    637671
    638672/*============================================================*/
     
    643677/* EALREADY will be returned if there is already a callback registered on this signal */
    644678/* NOTE: the signal handler will be called from a new detached thread */
     679#ifndef SWIG
    645680int fd_sig_register(int signal, char * modname, void (*callback)(int signal));
     681#endif /* !SWIG */
    646682
    647683/* Remove the handler for a given signal */
     
    672708#define FD_LIST_INITIALIZER_O( _list_name, _obj ) \
    673709        { .next = & _list_name, .prev = & _list_name, .head = & _list_name, .o = _obj }
    674 void fd_list_init ( struct fd_list * list, void *obj );
     710#ifdef SWIG
     711%apply struct fd_list * OUTPUT { struct fd_list * list };
     712void fd_list_init ( struct fd_list * list, void * obj );
     713%clear struct fd_list * list;
     714#else
     715void fd_list_init ( struct fd_list * list, void * obj );
     716#endif
    675717
    676718/* Return boolean, true if the list is empty */
     
    704746/*                        DICTIONARY                          */
    705747/*============================================================*/
     748
    706749/* Structure that contains the complete dictionary definitions */
    707750struct dictionary;
     
    750793 *    ENOMEM    : Memory allocation for the new object element failed.)
    751794 */
    752 int fd_dict_new ( struct dictionary * dict, enum dict_object_type type, void * data, struct dict_object * parent, struct dict_object **ref );
     795int fd_dict_new ( struct dictionary * dict, enum dict_object_type type, void * data, struct dict_object * parent, struct dict_object ** S_OUT(ref) );
    753796
    754797/*
     
    775818 *  ENOENT      : No matching object has been found, and result was NULL.
    776819 */
    777 int fd_dict_search ( struct dictionary * dict, enum dict_object_type type, int criteria, void * what, struct dict_object **result, int retval );
     820int fd_dict_search ( struct dictionary * dict, enum dict_object_type type, int criteria, void * what, struct dict_object ** S_OUT(result), int retval );
    778821
    779822/* Special case: get the generic error command object */
    780 int fd_dict_get_error_cmd(struct dictionary * dict, struct dict_object **obj);
     823int fd_dict_get_error_cmd(struct dictionary * dict, struct dict_object ** S_OUT(obj));
    781824
    782825/*
     
    796839 *  EINVAL      : A parameter is invalid.
    797840 */
    798 int fd_dict_getval ( struct dict_object * object, void * val);
    799 int fd_dict_gettype ( struct dict_object * object, enum dict_object_type * type);
    800 int fd_dict_getdict ( struct dict_object * object, struct dictionary ** dict);
     841int fd_dict_getval ( struct dict_object * object, void * S_INOUT(val));
     842int fd_dict_gettype ( struct dict_object * object, enum dict_object_type * S_OUT(type));
     843int fd_dict_getdict ( struct dict_object * object, struct dictionary ** S_OUT(dict));
    801844
    802845/* Debug functions */
     
    15531596
    15541597/* The following function must be called to activate the session expiry mechanism */
     1598#ifndef SWIG
    15551599int fd_sess_start(void);
     1600#endif /* !SWIG */
    15561601
    15571602/*
     
    15721617 *  ENOMEM      : Not enough memory to complete the operation
    15731618 */
    1574 int fd_sess_handler_create_internal ( struct session_handler ** handler, void (*cleanup)(session_state * state, char * sid) );
     1619int fd_sess_handler_create_internal ( struct session_handler ** S_OUT(handler), void (*cleanup)(session_state * state, char * sid) );
    15751620/* Macro to avoid casting everywhere */
    15761621#define fd_sess_handler_create( _handler, _cleanup ) \
     
    16201665 *  ENOMEM      : Not enough memory to complete the operation
    16211666 */
    1622 int fd_sess_new ( struct session ** session, char * diamId, char * opt, size_t optlen );
     1667int fd_sess_new ( struct session ** S_OUT(session), char * diamId, char * opt, size_t optlen );
    16231668
    16241669/*
     
    16401685 *  ENOMEM      : Not enough memory to complete the operation
    16411686 */
    1642 int fd_sess_fromsid ( char * sid, size_t len, struct session ** session, int * new);
     1687int fd_sess_fromsid ( char * sid, size_t len, struct session ** S_OUT(session), int * S_OUT(new));
    16431688
    16441689/*
     
    16591704 *  EINVAL      : A parameter is invalid.
    16601705 */
    1661 int fd_sess_getsid ( struct session * session, char ** sid );
     1706int fd_sess_getsid ( struct session * session, char ** S_OUT(sid) );
    16621707
    16631708/*
     
    17601805 *  EINVAL      : A parameter is invalid.
    17611806 */
    1762 int fd_sess_state_retrieve_internal ( struct session_handler * handler, struct session * session, session_state ** state );
     1807int fd_sess_state_retrieve_internal ( struct session_handler * handler, struct session * session, session_state ** S_OUT(state) );
    17631808#define fd_sess_state_retrieve( _handler, _session, _state ) \
    17641809        fd_sess_state_retrieve_internal( (_handler), (_session), (void *)(_state) )
     
    17691814void fd_sess_dump_hdl(int level, struct session_handler * handler);
    17701815
    1771 
    17721816/*============================================================*/
    17731817/*                         ROUTING                            */
     
    17811825
    17821826/* Following functions are helpers to create the routing data of a message */
    1783 int  fd_rtd_init(struct rt_data ** rtd);
     1827int  fd_rtd_init(struct rt_data ** S_OUT(rtd));
    17841828void fd_rtd_free(struct rt_data ** rtd);
    17851829
     
    17911835
    17921836/* Extract the list of valid candidates, and initialize their scores to 0 */
    1793 void fd_rtd_candidate_extract(struct rt_data * rtd, struct fd_list ** candidates, int ini_score);
     1837void fd_rtd_candidate_extract(struct rt_data * rtd, struct fd_list ** S_OUT(candidates), int ini_score);
    17941838
    17951839/* If a peer returned a protocol error for this message, save it so that we don't try to send it there again */
     
    19051949 *    ENOMEM    : Memory allocation for the new avp failed.)
    19061950 */
    1907 int fd_msg_avp_new ( struct dict_object * model, int flags, struct avp ** avp );
     1951int fd_msg_avp_new ( struct dict_object * model, int flags, struct avp ** S_OUT(avp) );
    19081952
    19091953/*
     
    19241968 *    ENOMEM    : Memory allocation for the new message failed.)
    19251969 */
    1926 int fd_msg_new ( struct dict_object * model, int flags, struct msg ** msg );
     1970int fd_msg_new ( struct dict_object * model, int flags, struct msg ** S_OUT(msg) );
    19271971
    19281972/*
     
    19451989 *  !0          : an error occurred.
    19461990 */
    1947 int fd_msg_new_answer_from_req ( struct dictionary * dict, struct msg ** msg, int flag );
     1991int fd_msg_new_answer_from_req ( struct dictionary * dict, struct msg ** S_INOUT(msg), int flag );
    19481992
    19491993/*
     
    19692013 *  ENOENT      : No element has been found where requested, and "found" was NULL (otherwise, *found is set to NULL and 0 is returned).
    19702014 */
    1971 int fd_msg_browse_internal ( msg_or_avp * reference, enum msg_brw_dir dir, msg_or_avp ** found, int * depth );
     2015int fd_msg_browse_internal ( msg_or_avp * reference, enum msg_brw_dir dir, msg_or_avp ** S_OUT(found), int * S_INOUT(depth) );
    19722016/* Macro to avoid having to cast the third parameter everywhere */
    19732017#define fd_msg_browse( ref, dir, found, depth ) \
     
    20132057 *  ENOENT      : No AVP has been found, and "avp" was NULL (otherwise, *avp is set to NULL and 0 returned).
    20142058 */
    2015 int fd_msg_search_avp ( struct msg * msg, struct dict_object * what, struct avp ** avp );
     2059int fd_msg_search_avp ( struct msg * msg, struct dict_object * what, struct avp ** S_OUT(avp) );
    20162060
    20172061/*
     
    20702114 *  EINVAL      : A parameter is invalid.
    20712115 */
    2072 int fd_msg_model ( msg_or_avp * reference, struct dict_object ** model );
     2116int fd_msg_model ( msg_or_avp * reference, struct dict_object ** S_OUT(model) );
    20732117
    20742118/*
     
    20862130 *  EINVAL      : A parameter is invalid.
    20872131 */
    2088 int fd_msg_hdr ( struct msg *msg, struct msg_hdr **pdata );
     2132int fd_msg_hdr ( struct msg *msg, struct msg_hdr ** S_OUT(pdata) );
    20892133
    20902134/*
     
    21022146 *  EINVAL      : A parameter is invalid.
    21032147 */
    2104 int fd_msg_avp_hdr ( struct avp *avp, struct avp_hdr **pdata );
     2148int fd_msg_avp_hdr ( struct avp *avp, struct avp_hdr ** S_OUT(pdata) );
    21052149
    21062150/*
     
    21232167 */
    21242168int fd_msg_answ_associate( struct msg * answer, struct msg * query );
    2125 int fd_msg_answ_getq     ( struct msg * answer, struct msg ** query );
     2169int fd_msg_answ_getq     ( struct msg * answer, struct msg ** S_OUT(query) );
    21262170int fd_msg_answ_detach   ( struct msg * answer );
    21272171
     
    21422186 *  EINVAL: a parameter is invalid
    21432187 */
     2188#ifndef SWIG
    21442189int fd_msg_anscb_associate( struct msg * msg, void ( *anscb)(void *, struct msg **), void  * data );
    21452190int fd_msg_anscb_get      ( struct msg * msg, void (**anscb)(void *, struct msg **), void ** data );
     2191#endif /* !SWIG */
    21462192
    21472193/*
     
    21602206 *  EINVAL: a parameter is invalid
    21612207 */
     2208#ifndef SWIG
    21622209int fd_msg_rt_associate( struct msg * msg, struct rt_data ** rtd );
    2163 int fd_msg_rt_get      ( struct msg * msg, struct rt_data ** rtd );
     2210#endif /* !SWIG */
     2211int fd_msg_rt_get      ( struct msg * msg, struct rt_data ** S_OUT(rtd) );
    21642212
    21652213/*
     
    21982246 *  !0          : an error occurred.
    21992247 */
     2248#ifndef SWIG
    22002249int fd_msg_source_set( struct msg * msg, char * diamid, int add_rr, struct dictionary * dict );
    2201 int fd_msg_source_get( struct msg * msg, char ** diamid );
     2250#endif /* !SWIG */
     2251int fd_msg_source_get( struct msg * msg, char ** S_OUT(diamid) );
    22022252
    22032253/*
     
    22342284 * !0 : standard error code.
    22352285 */
    2236 int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** session, int * new);
     2286int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** S_OUT(session), int * S_OUT(new));
    22372287
    22382288/***************************************/
     
    22742324 *  ENOTSUP     : There is no appropriate callback registered with this AVP's type.
    22752325 */
     2326#ifndef SWIG
    22762327int fd_msg_avp_value_encode ( void *data, struct avp *avp );
    2277 
     2328#endif /* !SWIG */
    22782329/*
    22792330 * FUNCTION:    fd_msg_avp_value_interpret
     
    22932344 *  ENOTSUP     : There is no appropriate callback registered with this AVP's type.
    22942345 */
     2346#ifndef SWIG
    22952347int fd_msg_avp_value_interpret ( struct avp *avp, void *data );
     2348#endif /* !SWIG */
    22962349
    22972350
     
    23172370 *  ENOMEM      : Unable to allocate enough memory to create the buffer object.
    23182371 */
    2319 int fd_msg_bufferize ( struct msg * msg, unsigned char ** buffer, size_t * len );
     2372int fd_msg_bufferize ( struct msg * msg, unsigned char ** S_OUT(buffer), size_t * S_OUT(len) );
    23202373
    23212374/*
     
    23392392 *  EINVAL      : A parameter is invalid.
    23402393 */
    2341 int fd_msg_parse_buffer ( unsigned char ** buffer, size_t buflen, struct msg ** msg );
     2394int fd_msg_parse_buffer ( unsigned char ** buffer, size_t buflen, struct msg ** S_OUT(msg) );
    23422395
    23432396/* Parsing Error Information structure */
     
    23732426 *  ENOTSUP     : No dictionary definition for the command or one of the mandatory AVP was found.
    23742427 */
    2375 int fd_msg_parse_dict ( msg_or_avp * object, struct dictionary * dict, struct fd_pei *error_info );
     2428int fd_msg_parse_dict ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * S_OUT(error_info) );
    23762429
    23772430/*
     
    23922445 *  ENOMEM      : Unable to allocate enough memory to complete the operation.
    23932446 */
    2394 int fd_msg_parse_rules ( msg_or_avp * object, struct dictionary * dict, struct fd_pei *error_info);
     2447int fd_msg_parse_rules ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * S_OUT(error_info));
    23952448
    23962449
     
    25712624 */
    25722625int fd_disp_register ( int (*cb)( struct msg **, struct avp *, struct session *, enum disp_action *),
    2573                         enum disp_how how, struct disp_when * when, struct disp_hdl ** handle );
     2626                        enum disp_how how, struct disp_when * when, struct disp_hdl ** S_OUT(handle) );
    25742627
    25752628/*
     
    26372690 *  ENOMEM      : Not enough memory to complete the creation. 
    26382691 */
    2639 int fd_fifo_new ( struct fifo ** queue );
     2692int fd_fifo_new ( struct fifo ** S_OUT(queue) );
    26402693
    26412694/*
     
    27582811 *  EINVAL      : A parameter is invalid.
    27592812 */
    2760 int fd_fifo_get_int ( struct fifo * queue, void ** item );
     2813int fd_fifo_get_int ( struct fifo * queue, void ** S_OUT(item) );
    27612814#define fd_fifo_get(queue, item) \
    27622815        fd_fifo_get_int((queue), (void *)(item))
     
    27782831 *  EWOULDBLOCK : The queue was empty.
    27792832 */
    2780 int fd_fifo_tryget_int ( struct fifo * queue, void ** item );
     2833int fd_fifo_tryget_int ( struct fifo * queue, void ** S_OUT(item) );
    27812834#define fd_fifo_tryget(queue, item) \
    27822835        fd_fifo_tryget_int((queue), (void *)(item))
     
    28002853 *  ETIMEDOUT   : The time out has passed and no item has been received.
    28012854 */
    2802 int fd_fifo_timedget_int ( struct fifo * queue, void ** item, const struct timespec *abstime );
     2855int fd_fifo_timedget_int ( struct fifo * queue, void ** S_OUT(item), const struct timespec *abstime );
    28032856#define fd_fifo_timedget(queue, item, abstime) \
    28042857        fd_fifo_timedget_int((queue), (void *)(item), (abstime))
Note: See TracChangeset for help on using the changeset viewer.