Changeset 1169:11724ff78638 in freeDiameter
- Timestamp:
- Jun 1, 2013, 3:23:55 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/dbg_interactive.py.sample
r1078 r1169 30 30 31 31 # The remaining of this file gives some examples of how to use the python interpreter. 32 # Note that the support is not yet totally usable. You'll probably have to extend some classes 33 # or write some typemaps in the source code of the extension to do what you want. 32 # Note that at the moment not 100% of the framework is usable. 33 # You may have to extend some classes or write some typemaps in the source code 34 # of the extension to do what you want. 34 35 35 36 … … 43 44 44 45 # Change the global debug level of the framework (cvar contains all global variables) 45 cvar.fd_g_debug_lvl = FULL46 cvar.fd_g_debug_lvl = 1 46 47 47 48 … … 53 54 # Note: the python version does not support printf-like argument list. The formating should be done in python. 54 55 # See SWIG documentation about varargs functions for more information. 55 fd_log _debug_fstr(None, "3 + 4 = %d" % (7))56 fd_log(FD_LOG_NOTICE, "3 + 4 = %d" % (7)) 56 57 57 58 58 59 # Display some framework state information 59 r = fd_event_send(cvar.fd_g_config.cnf_main_ev, FDEV_DUMP_PEERS, 0, None) 60 r = fd_event_send(cvar.fd_g_config.cnf_main_ev, FDEV_DUMP_SERV, 0, None) 61 r = fd_event_send(cvar.fd_g_config.cnf_main_ev, FDEV_DUMP_EXT, 0, None) 60 conf = fd_conf_dump(); 61 print conf; 62 63 fd_peer_dump_list(0) 64 fd_servers_dump(0) 65 fd_ext_dump(0) 62 66 63 67 … … 659 663 660 664 665 ############# HOOKS ############ 666 667 # TODO 661 668 662 669 ############# PEERS ############ -
extensions/dbg_interactive/dbg_interactive.c
r1127 r1169 80 80 /* Upon exit, issue the order of terminating to fD, if the interpreter was started without a file */ 81 81 if (!arg) { 82 CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_TERMINATE, 0, NULL),);82 (void)fd_core_shutdown(); 83 83 } 84 84 -
extensions/dbg_interactive/dbg_interactive.i
r1127 r1169 122 122 } 123 123 124 /* Case of the fd_*_dump functions */ 125 %typemap(in,noblock=1,numinputs=0) (char ** buf, size_t *len, size_t *offset) ($*1_ltype temp = NULL, $*2_ltype tempn) { 126 $1 = &temp; $2 = &tempn; $3 = NULL; 127 } 128 %typemap(freearg,match="in") (char ** buf, size_t *len, size_t *offset) ""; 129 %typemap(argout,noblock=1,fragment="SWIG_FromCharPtr")(char ** buf, size_t *len, size_t *offset) { 130 if (*$1) { 131 %append_output(SWIG_FromCharPtr(*$1)); 132 free(*$1); 133 } 134 } 135 124 136 /* Typemap to return a boolean value as output parameter */ 125 137 %typemap(in, numinputs=0,noblock=1) int * BOOL_OUT (int temp) { -
include/freeDiameter/libfdcore.h
r1164 r1169 808 808 /* The "old" FD_EV_DUMP_* events are replaced with direct calls to the following dump functions */ 809 809 DECLARE_FD_DUMP_PROTOTYPE(fd_conf_dump); 810 #else /* SWIG */ 811 DECLARE_FD_DUMP_PROTOTYPE_simple(fd_event_trig_dump); 812 DECLARE_FD_DUMP_PROTOTYPE_simple(fd_conf_dump); 813 #endif /* SWIG */ 810 814 DECLARE_FD_DUMP_PROTOTYPE(fd_ext_dump, int indent_next); 811 815 DECLARE_FD_DUMP_PROTOTYPE(fd_servers_dump, int details); 812 #endif /* SWIG */813 816 DECLARE_FD_DUMP_PROTOTYPE(fd_peer_dump_list, int details); 814 817 DECLARE_FD_DUMP_PROTOTYPE(fd_peer_dump, struct peer_hdr * p, int details); -
include/freeDiameter/libfdproto.h
r1167 r1169 239 239 #define DECLARE_FD_DUMP_PROTOTYPE( function_name, args... ) \ 240 240 char * function_name(char ** buf, size_t *len, size_t *offset, ##args) 241 242 #ifdef SWIG 243 #define DECLARE_FD_DUMP_PROTOTYPE_simple( function_name ) \ 244 char * function_name(char ** buf, size_t *len, size_t *offset) 245 #endif /* SWIG */ 241 246 242 247
Note: See TracChangeset
for help on using the changeset viewer.