Changeset 618:1dbc4c5397d6 in freeDiameter
- Timestamp:
- Dec 3, 2010, 6:29:51 PM (13 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/dbg_interactive/CMakeLists.txt
r609 r618 13 13 SET(CMAKE_SWIG_FLAGS "") 14 14 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 16 SET(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...) 16 22 SWIG_ADD_MODULE(diwrap python diwrap.i) 17 23 -
extensions/dbg_interactive/dbg_interactive.c
r609 r618 44 44 static void * myinterp (void * arg) 45 45 { 46 char * dum[ 2] = {arg, NULL };46 char * dum[3] = { "<dbg_interactive>", arg, NULL }; 47 47 TRACE_ENTRY("%p", arg); 48 49 fd_log_threadname ( "[dbg_interactive python interpreter]" ); 48 50 49 51 sleep(1); 50 52 fd_log_debug("\nStarting python interpreter [experimental].\n"); 51 53 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); 53 55 54 56 /* Upon exit, issue the order of terminating to fD */ -
extensions/dbg_interactive/diwrap.i
r609 r618 34 34 *********************************************************************************************************/ 35 35 36 /* This interface file is processed by SWIG to create a python wrapper interface to freeDiameter framework. */ 36 37 %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 37 45 %{ 38 /* include the header in the wrapper code*/46 /* Define types etc. */ 39 47 #include <freeDiameter/extension.h> 40 48 %} 41 49 42 /* Parse the header to generate the wrappers*/50 /* Retrieve the compile-time definitions of freeDiameter */ 43 51 %include "freeDiameter/freeDiameter-host.h" 44 52 %include "freeDiameter/libfreeDiameter.h" -
include/freeDiameter/freeDiameter.h
r578 r618 47 47 #endif /* GNUTLS_VERSION */ 48 48 49 #ifndef SWIG 49 50 /* GNUTLS calls debug level */ 50 51 #ifndef GNUTLS_DBG_LEVEL … … 68 69 (__call__); \ 69 70 } 70 71 #endif /* !SWIG */ 71 72 72 73 /* Structure to hold the configuration of the freeDiameter daemon */ … … 127 128 struct fifo *cnf_main_ev; /* events for the daemon's main (struct fd_event items) */ 128 129 }; 130 #ifdef SWIG 131 %immutable; 132 #endif /* SWIG */ 129 133 extern struct fd_config *fd_g_config; /* The pointer to access the global configuration, initalized in main */ 134 #ifdef SWIG 135 %mutable; 136 #endif /* SWIG */ 130 137 131 138 … … 175 182 , "STATE_ZOMBIE" \ 176 183 }; 184 #ifndef SWIG 177 185 extern const char *peer_state_str[]; 186 #else /* SWIG */ 187 %immutable; 188 extern const char **peer_state_str; 189 %mutable; 190 #endif /* !SWIG */ 178 191 #define STATE_STR(state) \ 179 192 (((unsigned)(state)) <= STATE_MAX ? peer_state_str[((unsigned)(state)) ] : "<Invalid>") … … 314 327 * !0 : An error occurred. 315 328 */ 316 int fd_peer_getbyid( char * diamid, struct peer_hdr ** peer);329 int fd_peer_getbyid( char * diamid, struct peer_hdr ** S_OUT(peer) ); 317 330 318 331 /* … … 537 550 * ENOMEM : Not enough memory to complete the operation 538 551 */ 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);552 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 ** S_OUT(handler) ); 540 553 /* 541 554 * CALLBACK: rt_fwd_cb … … 611 624 * ENOMEM : Not enough memory to complete the operation 612 625 */ 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);626 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 ** S_OUT(handler) ); 614 627 /* 615 628 * CALLBACK: rt_out_cb … … 671 684 672 685 int 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);686 int fd_event_get(struct fifo *queue, int * S_OUT(code), size_t * S_OUT(datasz), void ** S_OUT(data)); 687 int fd_event_timedget(struct fifo *queue, struct timespec * timeout, int timeoutcode, int * S_OUT(code), size_t * S_OUT(datasz), void ** S_OUT(data)); 675 688 void fd_event_destroy(struct fifo **queue, void (*free_cb)(void * data)); 676 689 const char * fd_ev_str(int event); … … 684 697 struct fd_list chain; /* link in cnf_endpoints list */ 685 698 699 #ifndef SWIG 686 700 union { 687 701 sSS ss; /* the socket information. List is always ordered by ss value (memcmp) -- see fd_ep_add_merge */ … … 690 704 sSA sa; 691 705 }; 706 #else /* !SWIG */ 707 /* SWIG does not support unions inside struct, we only define sa in this case */ 708 sSA sa; 709 #endif /* !SWIG */ 692 710 693 711 #define EP_FL_CONF (1 << 0) /* This endpoint is statically configured in a configuration file */ … … 726 744 int fd_app_merge(struct fd_list * list, application_id_t aid, vendor_id_t vid, int auth, int acct); 727 745 int 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);746 int fd_app_check_common(struct fd_list * list1, struct fd_list * list2, int * S_OUT(common_found)); 729 747 int fd_app_empty(struct fd_list * list); 730 748 -
include/freeDiameter/libfreeDiameter.h
r609 r618 30 30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * 31 31 * 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 * 33 33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 34 34 *********************************************************************************************************/ … … 78 78 #endif /* DEBUG */ 79 79 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 */ 80 87 81 88 /*============================================================*/ 82 89 /* INIT */ 83 90 /*============================================================*/ 91 #ifndef SWIG /* This section is not included in wrapper */ 92 84 93 85 94 /* This function must be called first, before any call to another library function */ … … 92 101 93 102 94 95 103 #endif /* !SWIG */ 96 104 /*============================================================*/ 97 105 /* DEBUG */ 98 106 /*============================================================*/ 107 99 108 100 109 /* … … 117 126 */ 118 127 void fd_log_debug ( char * format, ... ); 128 #ifndef SWIG 119 129 extern pthread_mutex_t fd_log_lock; 130 #endif /* !SWIG */ 120 131 extern char * fd_debug_one_function; 121 132 extern char * fd_debug_one_file; … … 136 147 * None. 137 148 */ 149 #ifndef SWIG 138 150 void fd_log_threadname ( char * name ); 139 151 extern pthread_key_t fd_log_thname; 152 #endif /* !SWIG */ 140 153 141 154 /* … … 160 173 /*============================================================*/ 161 174 175 #ifndef SWIG 162 176 #ifndef ASSERT 163 177 #define ASSERT(x) assert(x) 164 178 #endif /* ASSERT */ 179 #endif /* !SWIG */ 165 180 166 181 /* levels definitions */ … … 173 188 174 189 /* Default level is INFO */ 190 #ifndef SWIG 175 191 #ifndef TRACE_LEVEL 176 192 #define TRACE_LEVEL INFO 177 193 #endif /* TRACE_LEVEL */ 194 #endif /* !SWIG */ 178 195 179 196 /* The level of the file being compiled. */ 197 #ifndef SWIG 180 198 static int local_debug_level = TRACE_LEVEL; 199 #endif /* !SWIG */ 181 200 182 201 /* A global level, changed by configuration or cmd line for example. default is 0. */ … … 184 203 185 204 /* Some portability code to get nice function name in __PRETTY_FUNCTION__ */ 205 #ifndef SWIG 186 206 #if __STDC_VERSION__ < 199901L 187 207 # if __GNUC__ >= 2 … … 194 214 #define __PRETTY_FUNCTION__ __func__ 195 215 #endif /* __PRETTY_FUNCTION__ */ 216 #endif /* !SWIG */ 196 217 197 218 /* A version of __FILE__ without the full path */ 219 #ifndef SWIG 198 220 static char * file_bname = NULL; 199 221 #define __STRIPPED_FILE__ (file_bname ?: (file_bname = basename(__FILE__))) 222 #endif /* !SWIG */ 200 223 201 224 202 225 /* Boolean for tracing at a certain level */ 226 #ifndef SWIG 203 227 #ifdef DEBUG 204 228 #define TRACE_BOOL(_level_) ( ((_level_) <= local_debug_level + fd_g_debug_lvl) \ … … 208 232 #define TRACE_BOOL(_level_) ((_level_) <= local_debug_level + fd_g_debug_lvl) 209 233 #endif /* DEBUG */ 234 #endif /* !SWIG */ 210 235 211 236 … … 213 238 The general debug macro, each call results in two lines of debug messages (change the macro for more compact output) 214 239 *************/ 240 #ifndef SWIG 215 241 #ifdef DEBUG 216 242 /* In DEBUG mode, we add (a lot of) meta-information along each trace. This makes multi-threading problems easier to debug. */ … … 242 268 } 243 269 #endif /* DEBUG */ 270 #endif /* !SWIG */ 244 271 245 272 /************* 246 273 Derivatives from this macro 247 274 ************/ 275 #ifndef SWIG 248 276 /* Helper for function entry -- for very detailed trace of the execution */ 249 277 #define TRACE_ENTRY(_format,_args... ) \ … … 377 405 #endif /* STRIP_DEBUG_CODE */ 378 406 407 #endif /* !SWIG */ 379 408 380 409 /*============================================================*/ … … 385 414 * These macro should be used only when errors are improbable, not for expected errors. 386 415 */ 416 #ifndef SWIG 387 417 388 418 /* Check the return value of a system function and execute fallback in case of error */ … … 478 508 } 479 509 510 #endif /* !SWIG */ 511 480 512 481 513 /*============================================================*/ 482 514 /* OTHER MACROS */ 483 515 /*============================================================*/ 516 517 #ifndef SWIG 484 518 485 519 /* helper macros (pre-processor hacks to allow macro arguments) */ … … 565 599 #endif /* BUFSIZ */ 566 600 601 #endif /* !SWIG */ 567 602 568 603 … … 570 605 /* THREADS */ 571 606 /*============================================================*/ 572 #ifndef SWIG 607 #ifndef SWIG 573 608 574 609 /* Terminate a thread */ … … 633 668 } 634 669 } 635 636 #endif /* SWIG */ 670 #endif /* !SWIG */ 637 671 638 672 /*============================================================*/ … … 643 677 /* EALREADY will be returned if there is already a callback registered on this signal */ 644 678 /* NOTE: the signal handler will be called from a new detached thread */ 679 #ifndef SWIG 645 680 int fd_sig_register(int signal, char * modname, void (*callback)(int signal)); 681 #endif /* !SWIG */ 646 682 647 683 /* Remove the handler for a given signal */ … … 672 708 #define FD_LIST_INITIALIZER_O( _list_name, _obj ) \ 673 709 { .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 }; 712 void fd_list_init ( struct fd_list * list, void * obj ); 713 %clear struct fd_list * list; 714 #else 715 void fd_list_init ( struct fd_list * list, void * obj ); 716 #endif 675 717 676 718 /* Return boolean, true if the list is empty */ … … 704 746 /* DICTIONARY */ 705 747 /*============================================================*/ 748 706 749 /* Structure that contains the complete dictionary definitions */ 707 750 struct dictionary; … … 750 793 * ENOMEM : Memory allocation for the new object element failed.) 751 794 */ 752 int fd_dict_new ( struct dictionary * dict, enum dict_object_type type, void * data, struct dict_object * parent, struct dict_object ** ref);795 int fd_dict_new ( struct dictionary * dict, enum dict_object_type type, void * data, struct dict_object * parent, struct dict_object ** S_OUT(ref) ); 753 796 754 797 /* … … 775 818 * ENOENT : No matching object has been found, and result was NULL. 776 819 */ 777 int fd_dict_search ( struct dictionary * dict, enum dict_object_type type, int criteria, void * what, struct dict_object ** result, int retval );820 int fd_dict_search ( struct dictionary * dict, enum dict_object_type type, int criteria, void * what, struct dict_object ** S_OUT(result), int retval ); 778 821 779 822 /* Special case: get the generic error command object */ 780 int fd_dict_get_error_cmd(struct dictionary * dict, struct dict_object ** obj);823 int fd_dict_get_error_cmd(struct dictionary * dict, struct dict_object ** S_OUT(obj)); 781 824 782 825 /* … … 796 839 * EINVAL : A parameter is invalid. 797 840 */ 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);841 int fd_dict_getval ( struct dict_object * object, void * S_INOUT(val)); 842 int fd_dict_gettype ( struct dict_object * object, enum dict_object_type * S_OUT(type)); 843 int fd_dict_getdict ( struct dict_object * object, struct dictionary ** S_OUT(dict)); 801 844 802 845 /* Debug functions */ … … 1553 1596 1554 1597 /* The following function must be called to activate the session expiry mechanism */ 1598 #ifndef SWIG 1555 1599 int fd_sess_start(void); 1600 #endif /* !SWIG */ 1556 1601 1557 1602 /* … … 1572 1617 * ENOMEM : Not enough memory to complete the operation 1573 1618 */ 1574 int fd_sess_handler_create_internal ( struct session_handler ** handler, void (*cleanup)(session_state * state, char * sid) );1619 int fd_sess_handler_create_internal ( struct session_handler ** S_OUT(handler), void (*cleanup)(session_state * state, char * sid) ); 1575 1620 /* Macro to avoid casting everywhere */ 1576 1621 #define fd_sess_handler_create( _handler, _cleanup ) \ … … 1620 1665 * ENOMEM : Not enough memory to complete the operation 1621 1666 */ 1622 int fd_sess_new ( struct session ** session, char * diamId, char * opt, size_t optlen );1667 int fd_sess_new ( struct session ** S_OUT(session), char * diamId, char * opt, size_t optlen ); 1623 1668 1624 1669 /* … … 1640 1685 * ENOMEM : Not enough memory to complete the operation 1641 1686 */ 1642 int fd_sess_fromsid ( char * sid, size_t len, struct session ** session, int * new);1687 int fd_sess_fromsid ( char * sid, size_t len, struct session ** S_OUT(session), int * S_OUT(new)); 1643 1688 1644 1689 /* … … 1659 1704 * EINVAL : A parameter is invalid. 1660 1705 */ 1661 int fd_sess_getsid ( struct session * session, char ** sid);1706 int fd_sess_getsid ( struct session * session, char ** S_OUT(sid) ); 1662 1707 1663 1708 /* … … 1760 1805 * EINVAL : A parameter is invalid. 1761 1806 */ 1762 int fd_sess_state_retrieve_internal ( struct session_handler * handler, struct session * session, session_state ** state);1807 int fd_sess_state_retrieve_internal ( struct session_handler * handler, struct session * session, session_state ** S_OUT(state) ); 1763 1808 #define fd_sess_state_retrieve( _handler, _session, _state ) \ 1764 1809 fd_sess_state_retrieve_internal( (_handler), (_session), (void *)(_state) ) … … 1769 1814 void fd_sess_dump_hdl(int level, struct session_handler * handler); 1770 1815 1771 1772 1816 /*============================================================*/ 1773 1817 /* ROUTING */ … … 1781 1825 1782 1826 /* Following functions are helpers to create the routing data of a message */ 1783 int fd_rtd_init(struct rt_data ** rtd);1827 int fd_rtd_init(struct rt_data ** S_OUT(rtd)); 1784 1828 void fd_rtd_free(struct rt_data ** rtd); 1785 1829 … … 1791 1835 1792 1836 /* 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);1837 void fd_rtd_candidate_extract(struct rt_data * rtd, struct fd_list ** S_OUT(candidates), int ini_score); 1794 1838 1795 1839 /* If a peer returned a protocol error for this message, save it so that we don't try to send it there again */ … … 1905 1949 * ENOMEM : Memory allocation for the new avp failed.) 1906 1950 */ 1907 int fd_msg_avp_new ( struct dict_object * model, int flags, struct avp ** avp);1951 int fd_msg_avp_new ( struct dict_object * model, int flags, struct avp ** S_OUT(avp) ); 1908 1952 1909 1953 /* … … 1924 1968 * ENOMEM : Memory allocation for the new message failed.) 1925 1969 */ 1926 int fd_msg_new ( struct dict_object * model, int flags, struct msg ** msg);1970 int fd_msg_new ( struct dict_object * model, int flags, struct msg ** S_OUT(msg) ); 1927 1971 1928 1972 /* … … 1945 1989 * !0 : an error occurred. 1946 1990 */ 1947 int fd_msg_new_answer_from_req ( struct dictionary * dict, struct msg ** msg, int flag );1991 int fd_msg_new_answer_from_req ( struct dictionary * dict, struct msg ** S_INOUT(msg), int flag ); 1948 1992 1949 1993 /* … … 1969 2013 * ENOENT : No element has been found where requested, and "found" was NULL (otherwise, *found is set to NULL and 0 is returned). 1970 2014 */ 1971 int fd_msg_browse_internal ( msg_or_avp * reference, enum msg_brw_dir dir, msg_or_avp ** found, int * depth);2015 int fd_msg_browse_internal ( msg_or_avp * reference, enum msg_brw_dir dir, msg_or_avp ** S_OUT(found), int * S_INOUT(depth) ); 1972 2016 /* Macro to avoid having to cast the third parameter everywhere */ 1973 2017 #define fd_msg_browse( ref, dir, found, depth ) \ … … 2013 2057 * ENOENT : No AVP has been found, and "avp" was NULL (otherwise, *avp is set to NULL and 0 returned). 2014 2058 */ 2015 int fd_msg_search_avp ( struct msg * msg, struct dict_object * what, struct avp ** avp);2059 int fd_msg_search_avp ( struct msg * msg, struct dict_object * what, struct avp ** S_OUT(avp) ); 2016 2060 2017 2061 /* … … 2070 2114 * EINVAL : A parameter is invalid. 2071 2115 */ 2072 int fd_msg_model ( msg_or_avp * reference, struct dict_object ** model);2116 int fd_msg_model ( msg_or_avp * reference, struct dict_object ** S_OUT(model) ); 2073 2117 2074 2118 /* … … 2086 2130 * EINVAL : A parameter is invalid. 2087 2131 */ 2088 int fd_msg_hdr ( struct msg *msg, struct msg_hdr ** pdata);2132 int fd_msg_hdr ( struct msg *msg, struct msg_hdr ** S_OUT(pdata) ); 2089 2133 2090 2134 /* … … 2102 2146 * EINVAL : A parameter is invalid. 2103 2147 */ 2104 int fd_msg_avp_hdr ( struct avp *avp, struct avp_hdr ** pdata);2148 int fd_msg_avp_hdr ( struct avp *avp, struct avp_hdr ** S_OUT(pdata) ); 2105 2149 2106 2150 /* … … 2123 2167 */ 2124 2168 int fd_msg_answ_associate( struct msg * answer, struct msg * query ); 2125 int fd_msg_answ_getq ( struct msg * answer, struct msg ** query);2169 int fd_msg_answ_getq ( struct msg * answer, struct msg ** S_OUT(query) ); 2126 2170 int fd_msg_answ_detach ( struct msg * answer ); 2127 2171 … … 2142 2186 * EINVAL: a parameter is invalid 2143 2187 */ 2188 #ifndef SWIG 2144 2189 int fd_msg_anscb_associate( struct msg * msg, void ( *anscb)(void *, struct msg **), void * data ); 2145 2190 int fd_msg_anscb_get ( struct msg * msg, void (**anscb)(void *, struct msg **), void ** data ); 2191 #endif /* !SWIG */ 2146 2192 2147 2193 /* … … 2160 2206 * EINVAL: a parameter is invalid 2161 2207 */ 2208 #ifndef SWIG 2162 2209 int 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 */ 2211 int fd_msg_rt_get ( struct msg * msg, struct rt_data ** S_OUT(rtd) ); 2164 2212 2165 2213 /* … … 2198 2246 * !0 : an error occurred. 2199 2247 */ 2248 #ifndef SWIG 2200 2249 int 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 */ 2251 int fd_msg_source_get( struct msg * msg, char ** S_OUT(diamid) ); 2202 2252 2203 2253 /* … … 2234 2284 * !0 : standard error code. 2235 2285 */ 2236 int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** session, int * new);2286 int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** S_OUT(session), int * S_OUT(new)); 2237 2287 2238 2288 /***************************************/ … … 2274 2324 * ENOTSUP : There is no appropriate callback registered with this AVP's type. 2275 2325 */ 2326 #ifndef SWIG 2276 2327 int fd_msg_avp_value_encode ( void *data, struct avp *avp ); 2277 2328 #endif /* !SWIG */ 2278 2329 /* 2279 2330 * FUNCTION: fd_msg_avp_value_interpret … … 2293 2344 * ENOTSUP : There is no appropriate callback registered with this AVP's type. 2294 2345 */ 2346 #ifndef SWIG 2295 2347 int fd_msg_avp_value_interpret ( struct avp *avp, void *data ); 2348 #endif /* !SWIG */ 2296 2349 2297 2350 … … 2317 2370 * ENOMEM : Unable to allocate enough memory to create the buffer object. 2318 2371 */ 2319 int fd_msg_bufferize ( struct msg * msg, unsigned char ** buffer, size_t * len);2372 int fd_msg_bufferize ( struct msg * msg, unsigned char ** S_OUT(buffer), size_t * S_OUT(len) ); 2320 2373 2321 2374 /* … … 2339 2392 * EINVAL : A parameter is invalid. 2340 2393 */ 2341 int fd_msg_parse_buffer ( unsigned char ** buffer, size_t buflen, struct msg ** msg);2394 int fd_msg_parse_buffer ( unsigned char ** buffer, size_t buflen, struct msg ** S_OUT(msg) ); 2342 2395 2343 2396 /* Parsing Error Information structure */ … … 2373 2426 * ENOTSUP : No dictionary definition for the command or one of the mandatory AVP was found. 2374 2427 */ 2375 int fd_msg_parse_dict ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * error_info);2428 int fd_msg_parse_dict ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * S_OUT(error_info) ); 2376 2429 2377 2430 /* … … 2392 2445 * ENOMEM : Unable to allocate enough memory to complete the operation. 2393 2446 */ 2394 int fd_msg_parse_rules ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * error_info);2447 int fd_msg_parse_rules ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * S_OUT(error_info)); 2395 2448 2396 2449 … … 2571 2624 */ 2572 2625 int 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) ); 2574 2627 2575 2628 /* … … 2637 2690 * ENOMEM : Not enough memory to complete the creation. 2638 2691 */ 2639 int fd_fifo_new ( struct fifo ** queue);2692 int fd_fifo_new ( struct fifo ** S_OUT(queue) ); 2640 2693 2641 2694 /* … … 2758 2811 * EINVAL : A parameter is invalid. 2759 2812 */ 2760 int fd_fifo_get_int ( struct fifo * queue, void ** item);2813 int fd_fifo_get_int ( struct fifo * queue, void ** S_OUT(item) ); 2761 2814 #define fd_fifo_get(queue, item) \ 2762 2815 fd_fifo_get_int((queue), (void *)(item)) … … 2778 2831 * EWOULDBLOCK : The queue was empty. 2779 2832 */ 2780 int fd_fifo_tryget_int ( struct fifo * queue, void ** item);2833 int fd_fifo_tryget_int ( struct fifo * queue, void ** S_OUT(item) ); 2781 2834 #define fd_fifo_tryget(queue, item) \ 2782 2835 fd_fifo_tryget_int((queue), (void *)(item)) … … 2800 2853 * ETIMEDOUT : The time out has passed and no item has been received. 2801 2854 */ 2802 int fd_fifo_timedget_int ( struct fifo * queue, void ** item, const struct timespec *abstime );2855 int fd_fifo_timedget_int ( struct fifo * queue, void ** S_OUT(item), const struct timespec *abstime ); 2803 2856 #define fd_fifo_timedget(queue, item, abstime) \ 2804 2857 fd_fifo_timedget_int((queue), (void *)(item), (abstime))
Note: See TracChangeset
for help on using the changeset viewer.