Navigation


Changeset 658:f198d16fa7f4 in freeDiameter for include/freeDiameter/libfdcore.h


Ignore:
Timestamp:
Jan 14, 2011, 3:15:23 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Initial commit for 1.1.0:

  • Restructuring:
    • libfreeDiameter:
      • renamed folder & binary into libfdproto
      • renamed libfD.h into fdproto-internal.h
      • removed signals management (replaced by triggers in libfdcore)
  • freeDiameter split into:
    • libfdcore (most contents)
      • renamed fD.h into fdcore-internal.h
      • added core.c for framework init/shutdown.
      • new triggers mechanism in events.c.
  • freeDiameterd (main, command line parsing, signals management)
  • tests:
    • now in top-level directory tests.
  • other changes:
    • fd_dict_new now returns 0 on duplicate identical entries.
    • fixes in dict_legacy_xml
    • fixes in some dictionaries
    • moved FD_DEFAULT_CONF_FILENAME definition to freeDiameter-host.h
File:
1 moved

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/libfdcore.h

    r648 r658  
    3434*********************************************************************************************************/
    3535
    36 #ifndef _FREEDIAMETER_H
    37 #define _FREEDIAMETER_H
    38 
    39 
    40 #include <freeDiameter/libfreeDiameter.h>
     36#ifndef _LIBFDCORE_H
     37#define _LIBFDCORE_H
     38
     39
     40#include <freeDiameter/libfdproto.h>
    4141#include <gnutls/gnutls.h>
    4242#include <gnutls/x509.h>
     
    6868        (__call__);                                                     \
    6969}
     70
     71
     72/*============================================================*/
     73/*                      INITIALIZATION                        */
     74/*============================================================*/
     75
     76
     77/* Initialize the libfdcore internals. This also initializes libfdproto */
     78int fd_core_initialize(void);
     79
     80/* Return a string describing the version of the library */
     81const char *fd_core_version(void);
     82
     83/* Parse the freeDiameter.conf configuration file, load the extensions */
     84int fd_core_parseconf(char * conffile);
     85
     86/* Start the server & client threads */
     87int fd_core_start(void);
     88
     89/* Block until the framework has completed its initialization -- useful for extensions */
     90int fd_core_waitstartcomplete(void);
     91
     92/* Initialize shutdown of the framework */
     93int fd_core_shutdown(void);
     94
     95/* Wait for the shutdown to be complete -- this should always be called after fd_core_shutdown */
     96int fd_core_wait_shutdown_complete(void);
     97
     98
     99/*============================================================*/
     100/*                          CONFIG                            */
     101/*============================================================*/
    70102
    71103/* Structure to hold the configuration of the freeDiameter daemon */
     
    129161
    130162
    131 /***************************************/
    132 /*   Peers information                 */
    133 /***************************************/
     163
     164/*============================================================*/
     165/*                         PEERS                              */
     166/*============================================================*/
    134167
    135168/* States of a peer */
     
    366399 */
    367400
    368 /***************************************/
    369 /*   Sending a message on the network  */
    370 /***************************************/
     401
     402
     403/*============================================================*/
     404/*                         MESSAGES                           */
     405/*============================================================*/
    371406
    372407/*
     
    444479
    445480
    446 /***************************************/
    447 /*   Dispatch module, daemon's part    */
    448 /***************************************/
     481
     482
     483/*============================================================*/
     484/*                         DISPATCH                           */
     485/*============================================================*/
    449486
    450487/*
     
    471508
    472509
    473 /***************************************/
    474 /*          Routing module             */
    475 /***************************************/
     510/*============================================================*/
     511/*                         ROUTING                            */
     512/*============================================================*/
    476513
    477514/* This file contains the definitions of types and functions involved in the routing decisions in freeDiameter,
     
    661698
    662699
    663 /***************************************/
    664 /*   Events helpers                    */
    665 /***************************************/
     700/*============================================================*/
     701/*                         EVENTS                             */
     702/*============================================================*/
    666703
    667704struct fd_event {
     
    671708};
    672709
    673 /* Daemon's codespace: 1000->1999 (1500->1999 defined in fD.h) */
     710/* Daemon's codespace: 1000->1999 (1500->1999 defined in fdcore-internal.h) */
    674711enum {
    675712         FDEV_TERMINATE = 1000  /* request to terminate */
     
    680717        ,FDEV_DUMP_CONFIG       /* Dump the configuration */
    681718        ,FDEV_DUMP_PEERS        /* Dump the list of peers */
     719        ,FDEV_TRIGGER           /* Trigger available for extensions. size is sizeof(int), data is int * */
    682720};
    683721
     
    688726const char * fd_ev_str(int event);
    689727
    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 */
     729int fd_event_trig_regcb(int trigger_val, const char * module, void (*cb)(void));
     730void fd_event_trig_dump();
     731
     732
     733/*============================================================*/
     734/*                         ENDPOINTS                          */
     735/*============================================================*/
    705736
    706737struct fd_endpoint {
     
    737768void fd_ep_dump( int indent, struct fd_list * eps );
    738769
    739 /***************************************/
    740 /*   Applications lists helpers        */
    741 /***************************************/
     770
     771/*============================================================*/
     772/*                         APPLICATIONS IDs                   */
     773/*============================================================*/
    742774
    743775struct fd_app {
     
    756788int fd_app_empty(struct fd_list * list);
    757789
    758 #endif /* _FREEDIAMETER_H */
     790#endif /* _LIBFDCORE_H */
Note: See TracChangeset for help on using the changeset viewer.