Changeset 658:f198d16fa7f4 in freeDiameter for include/freeDiameter/libfdcore.h
- Timestamp:
- Jan 14, 2011, 3:15:23 PM (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/libfdcore.h
r648 r658 34 34 *********************************************************************************************************/ 35 35 36 #ifndef _ FREEDIAMETER_H37 #define _ FREEDIAMETER_H38 39 40 #include <freeDiameter/libf reeDiameter.h>36 #ifndef _LIBFDCORE_H 37 #define _LIBFDCORE_H 38 39 40 #include <freeDiameter/libfdproto.h> 41 41 #include <gnutls/gnutls.h> 42 42 #include <gnutls/x509.h> … … 68 68 (__call__); \ 69 69 } 70 71 72 /*============================================================*/ 73 /* INITIALIZATION */ 74 /*============================================================*/ 75 76 77 /* Initialize the libfdcore internals. This also initializes libfdproto */ 78 int fd_core_initialize(void); 79 80 /* Return a string describing the version of the library */ 81 const char *fd_core_version(void); 82 83 /* Parse the freeDiameter.conf configuration file, load the extensions */ 84 int fd_core_parseconf(char * conffile); 85 86 /* Start the server & client threads */ 87 int fd_core_start(void); 88 89 /* Block until the framework has completed its initialization -- useful for extensions */ 90 int fd_core_waitstartcomplete(void); 91 92 /* Initialize shutdown of the framework */ 93 int fd_core_shutdown(void); 94 95 /* Wait for the shutdown to be complete -- this should always be called after fd_core_shutdown */ 96 int fd_core_wait_shutdown_complete(void); 97 98 99 /*============================================================*/ 100 /* CONFIG */ 101 /*============================================================*/ 70 102 71 103 /* Structure to hold the configuration of the freeDiameter daemon */ … … 129 161 130 162 131 /***************************************/ 132 /* Peers information */ 133 /***************************************/ 163 164 /*============================================================*/ 165 /* PEERS */ 166 /*============================================================*/ 134 167 135 168 /* States of a peer */ … … 366 399 */ 367 400 368 /***************************************/ 369 /* Sending a message on the network */ 370 /***************************************/ 401 402 403 /*============================================================*/ 404 /* MESSAGES */ 405 /*============================================================*/ 371 406 372 407 /* … … 444 479 445 480 446 /***************************************/ 447 /* Dispatch module, daemon's part */ 448 /***************************************/ 481 482 483 /*============================================================*/ 484 /* DISPATCH */ 485 /*============================================================*/ 449 486 450 487 /* … … 471 508 472 509 473 /* **************************************/474 /* Routing module*/475 /* **************************************/510 /*============================================================*/ 511 /* ROUTING */ 512 /*============================================================*/ 476 513 477 514 /* This file contains the definitions of types and functions involved in the routing decisions in freeDiameter, … … 661 698 662 699 663 /* **************************************/664 /* Events helpers*/665 /* **************************************/700 /*============================================================*/ 701 /* EVENTS */ 702 /*============================================================*/ 666 703 667 704 struct fd_event { … … 671 708 }; 672 709 673 /* Daemon's codespace: 1000->1999 (1500->1999 defined in f D.h) */710 /* Daemon's codespace: 1000->1999 (1500->1999 defined in fdcore-internal.h) */ 674 711 enum { 675 712 FDEV_TERMINATE = 1000 /* request to terminate */ … … 680 717 ,FDEV_DUMP_CONFIG /* Dump the configuration */ 681 718 ,FDEV_DUMP_PEERS /* Dump the list of peers */ 719 ,FDEV_TRIGGER /* Trigger available for extensions. size is sizeof(int), data is int * */ 682 720 }; 683 721 … … 688 726 const char * fd_ev_str(int event); 689 727 690 691 /* The following function does not really use events, but it may be used 692 by extensions that need to start an action when the framework is fully initialized. 693 This function will block until all initializations are performed in the daemon. 694 It is meant to be used as follow by extensions: 695 - in initialization callback, create a new thread. 696 - this new thread calls this function. 697 - when the function returns, the thread can start working and using all framework features. 698 */ 699 int fd_wait_initialization_complete(void); 700 701 702 /***************************************/ 703 /* Endpoints lists helpers */ 704 /***************************************/ 728 /* for extensions */ 729 int fd_event_trig_regcb(int trigger_val, const char * module, void (*cb)(void)); 730 void fd_event_trig_dump(); 731 732 733 /*============================================================*/ 734 /* ENDPOINTS */ 735 /*============================================================*/ 705 736 706 737 struct fd_endpoint { … … 737 768 void fd_ep_dump( int indent, struct fd_list * eps ); 738 769 739 /***************************************/ 740 /* Applications lists helpers */ 741 /***************************************/ 770 771 /*============================================================*/ 772 /* APPLICATIONS IDs */ 773 /*============================================================*/ 742 774 743 775 struct fd_app { … … 756 788 int fd_app_empty(struct fd_list * list); 757 789 758 #endif /* _ FREEDIAMETER_H */790 #endif /* _LIBFDCORE_H */
Note: See TracChangeset
for help on using the changeset viewer.