Changeset 1085:7d7266115a34 in freeDiameter for include/freeDiameter/libfdcore.h
- Timestamp:
- May 3, 2013, 8:20:56 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/libfdcore.h
r1077 r1085 58 58 59 59 /* Check the return value of a GNUTLS function, log and propagate */ 60 #define CHECK_GNUTLS_DO( __call__, __fallback__ ) { \ 61 int __ret__; \ 62 TRACE_DEBUG(GNUTLS_DBG_LEVEL, "GNUTLS call: %s", #__call__ ); \ 63 __ret__ = (__call__); \ 64 if (__ret__ < 0) { \ 65 TRACE_DEBUG(INFO, "Error in '%s':\t%s", #__call__ , gnutls_strerror(__ret__)); \ 66 __fallback__; \ 67 } \ 60 #define CHECK_GNUTLS_GEN( faillevel, __call__, __fallback__ ) { \ 61 CHECK_PRELUDE(__call__); \ 62 if (__ret__ < 0) { \ 63 __ret__ = errno; \ 64 LOG(faillevel, "ERROR: in '%s' :\t%s", #__call__ , gnutls_strerror(__ret__)); \ 65 __fallback__; \ 66 } \ 68 67 } 69 68 70 /* For GNUTLS routines that do not return a value*/69 /* we use this macro to help debugging gnutls usage issues -- just change the content to display what you need */ 71 70 #define GNUTLS_TRACE( __call__) { \ 72 TRACE_ DEBUG(GNUTLS_DBG_LEVEL, "GNUTLS call: " #__call__ );\71 TRACE_CALL("Check: %s", #__call__ ); \ 73 72 (__call__); \ 74 73 } 74 75 76 #ifndef EXCLUDE_DEPRECATED 77 /* Macro for transition, replace with CHECK_GNUTLS_GEN */ 78 #define CHECK_GNUTLS_DO( __call__, __fallback__ ) { \ 79 CHECK_PRELUDE(__call__); \ 80 if (__ret__ < 0) { \ 81 __ret__ = errno; \ 82 TRACE_ERROR("ERROR: in '%s' :\t%s", #__call__ , gnutls_strerror(__ret__)); \ 83 __fallback__; \ 84 } \ 85 } 86 87 #endif /* EXCLUDE_DEPRECATED */ 75 88 76 89 … … 778 791 enum { 779 792 FDEV_TERMINATE = 1000 /* request to terminate */ 780 ,FDEV_DUMP_DICT /* Dump the content of the dictionary */781 ,FDEV_DUMP_EXT /* Dump state of extensions */782 ,FDEV_DUMP_SERV /* Dump the server socket status */783 ,FDEV_DUMP_QUEUES /* Dump the message queues */784 ,FDEV_DUMP_CONFIG /* Dump the configuration */785 ,FDEV_DUMP_PEERS /* Dump the list of peers */786 793 ,FDEV_TRIGGER /* Trigger available for extensions. size is sizeof(int), data is int * */ 787 794 }; … … 795 802 /* for extensions */ 796 803 int fd_event_trig_regcb(int trigger_val, const char * module, void (*cb)(void)); 797 void fd_event_trig_dump(); 798 804 805 DECLARE_FD_DUMP_PROTOTYPE(fd_event_trig_dump); 806 807 /* The "old" FD_EV_DUMP_* events are replaced with direct calls to the following dump functions */ 808 DECLARE_FD_DUMP_PROTOTYPE(fd_conf_dump); 809 DECLARE_FD_DUMP_PROTOTYPE(fd_ext_dump); 810 DECLARE_FD_DUMP_PROTOTYPE(fd_peer_dump_list, int details); 811 DECLARE_FD_DUMP_PROTOTYPE(fd_peer_dump, struct peer_hdr * p, int details); 812 DECLARE_FD_DUMP_PROTOTYPE(fd_servers_dump); 799 813 800 814 /*============================================================*/ … … 832 846 int fd_ep_filter_list( struct fd_list * list, struct fd_list * exclude_list ); 833 847 int fd_ep_clearflags( struct fd_list * list, uint32_t flags ); 834 void fd_ep_dump_one( char * prefix, struct fd_endpoint * ep );835 void fd_ep_dump( int indent, struct fd_list * eps);848 DECLARE_FD_DUMP_PROTOTYPE(fd_ep_dump_one, struct fd_endpoint * ep ); 849 DECLARE_FD_DUMP_PROTOTYPE(fd_ep_dump, int indent, struct fd_list * eps ); 836 850 837 851
Note: See TracChangeset
for help on using the changeset viewer.