Navigation


Changeset 1333:cbe1da7a32f1 in freeDiameter


Ignore:
Timestamp:
Apr 9, 2019, 10:11:32 PM (5 years ago)
Author:
Thomas Klausner <tk@giga.or.at>
Branch:
default
Phase:
public
Message:

Add dict_json extension.

This extension allows loading diameter dictionares from a JSON file.

Example files are provided by contrib/dict_json.

Files:
11 added
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/CMakeLists.txt

    r1278 r1333  
    1313ENDMACRO(FD_ADD_EXTENSION)
    1414
    15 # Use the macro FD_EXTENSION_SUBDIR(extmacroname subdir descr default) to 
     15# Use the macro FD_EXTENSION_SUBDIR(extmacroname subdir descr default) to
    1616# add a new extension subdirectory.
    1717MACRO(FD_EXTENSION_SUBDIR EXTSUBDIR EXTDESCR EXTDEFAULT)
     
    4040FD_EXTENSION_SUBDIR(dict_eap    "Diameter EAP (RFC4072) Dictionary definitions" ON)
    4141
    42 FD_EXTENSION_SUBDIR(dict_dcca   "Diameter CC (RFC4006) Dictionary definitions [incomplete]" ON)
    43 FD_EXTENSION_SUBDIR(dict_dcca_3gpp   "Diameter CC 3GPP Dictionary definitions [incomplete]" ON)
    44 FD_EXTENSION_SUBDIR(dict_dcca_starent   "Diameter CC Starent Dictionary definitions" ON)
     42FD_EXTENSION_SUBDIR(dict_dcca         "Diameter CC (RFC4006) Dictionary definitions [incomplete]" ON)
     43FD_EXTENSION_SUBDIR(dict_dcca_3gpp    "Diameter CC 3GPP Dictionary definitions [incomplete]" ON)
     44FD_EXTENSION_SUBDIR(dict_dcca_starent "Diameter CC Starent Dictionary definitions" ON)
    4545
    4646FD_EXTENSION_SUBDIR(dict_sip    "Diameter SIP (RFC4740) Dictionary definitions" ON)
     
    5151FD_EXTENSION_SUBDIR(dict_rfc5777   "Classification and QoS (RFC 5777) Dictionary definitions" ON)
    5252
     53FD_EXTENSION_SUBDIR(dict_json       "Load Diameter dictionary definitions from JSON files."   OFF)
    5354FD_EXTENSION_SUBDIR(dict_legacy_xml "Load Diameter dictionary definitions from XML files."    OFF)
    5455
     
    6869# Routing extensions
    6970
    70 FD_EXTENSION_SUBDIR(rt_busypeers "Handling of Diameter TOO_BUSY messages and relay timeouts"    ON)
    71 FD_EXTENSION_SUBDIR(rt_default   "Configurable routing rules for freeDiameter"                  ON)
    72 FD_EXTENSION_SUBDIR(rt_ereg      "Configurable routing based on regexp matching of AVP values" OFF)
    73 FD_EXTENSION_SUBDIR(rt_ignore_dh "Stow Destination-Host in Proxy-Info, restore to Origin-Host for answers"      ON)
     71FD_EXTENSION_SUBDIR(rt_busypeers    "Handling of Diameter TOO_BUSY messages and relay timeouts" ON)
     72FD_EXTENSION_SUBDIR(rt_default      "Configurable routing rules for freeDiameter"                       ON)
     73FD_EXTENSION_SUBDIR(rt_ereg         "Configurable routing based on regexp matching of AVP values" OFF)
     74FD_EXTENSION_SUBDIR(rt_ignore_dh    "Stow Destination-Host in Proxy-Info, restore to Origin-Host for answers"   ON)
    7475FD_EXTENSION_SUBDIR(rt_load_balance "Balance load over multiple equal hosts, based on outstanding requests"     ON)
    75 FD_EXTENSION_SUBDIR(rt_randomize "Randomly choose one of the highest scored hosts and increase its score by one"        ON)
    76 FD_EXTENSION_SUBDIR(rt_redirect  "Handling of Diameter Redirect messages"                       ON)
     76FD_EXTENSION_SUBDIR(rt_randomize    "Randomly choose one of the highest scored hosts and increase its score by one"     ON)
     77FD_EXTENSION_SUBDIR(rt_redirect     "Handling of Diameter Redirect messages"                    ON)
    7778
    7879
     
    8687# Debug & test extensions
    8788
    88 FD_EXTENSION_SUBDIR(dbg_monitor "Outputs periodical status information"              ON)
     89FD_EXTENSION_SUBDIR(dbg_monitor     "Outputs periodical status information"              ON)
    8990FD_EXTENSION_SUBDIR(dbg_msg_timings "Show some timing information for messages"      ON)
    90 FD_EXTENSION_SUBDIR(dbg_msg_dumps "Show human-readable content of the received & sent messages"      ON)
    91 FD_EXTENSION_SUBDIR(dbg_rt      "Routing extension for debugging the routing module" ON)
    92 FD_EXTENSION_SUBDIR(test_app    "Testing application to send dummy message to another peer, like a Diameter 'ping'" OFF)
    93 FD_EXTENSION_SUBDIR(test_sip    "Testing application to simulate Diameter-SIP client (RFC4740)" OFF)
     91FD_EXTENSION_SUBDIR(dbg_msg_dumps   "Show human-readable content of the received & sent messages"      ON)
     92FD_EXTENSION_SUBDIR(dbg_rt          "Routing extension for debugging the routing module" ON)
     93FD_EXTENSION_SUBDIR(test_app        "Testing application to send dummy message to another peer, like a Diameter 'ping'" OFF)
     94FD_EXTENSION_SUBDIR(test_sip        "Testing application to simulate Diameter-SIP client (RFC4740)" OFF)
    9495FD_EXTENSION_SUBDIR(dbg_interactive "Python-interpreter based module"                OFF)
    95 FD_EXTENSION_SUBDIR(test_netemul "Simple Diameter network emulator proxy extension (latency, PDV, duplicates)" OFF)
     96FD_EXTENSION_SUBDIR(test_netemul    "Simple Diameter network emulator proxy extension (latency, PDV, duplicates)" OFF)
    9697
    9798
  • include/freeDiameter/CMakeLists.txt

    r1295 r1333  
    1818# In DEBUG mode, each log can contain pid, calling function and file for easy debug. Set to ON to display this information.
    1919OPTION(DEBUG_WITH_META "Show calling location in logs?" OFF)
    20        
     20
    2121# Create the absolute path for searching extensions
    2222SET(DEFAULT_EXTENSIONS_PATH ${CMAKE_INSTALL_PREFIX}/${INSTALL_EXTENSIONS_SUFFIX})
     
    3232OPTION(DISABLE_PEER_EXPIRY "Disable RFC3539 Peers Connections Expiration after inactivity?" OFF)
    3333
    34 # The following workaround increases compatibility with some implementations without breaking anything in freeDiameter, 
    35 # so it can be enabled without risk. We keep it disabled by default anyway for those people who use freeDiameter to check the 
     34# The following workaround increases compatibility with some implementations without breaking anything in freeDiameter,
     35# so it can be enabled without risk. We keep it disabled by default anyway for those people who use freeDiameter to check the
    3636# compliancy of their implementation with the Diameter RFC...
    3737OPTION(WORKAROUND_ACCEPT_INVALID_VSAI "Do not reject a CER/CEA with a Vendor-Specific-Application-Id AVP containing both Auth- and Acct- application AVPs?" OFF)
     
    4545INCLUDE (CheckFunctionExists)
    4646INCLUDE (CheckIncludeFiles)
    47 INCLUDE (CheckSymbolExists) 
     47INCLUDE (CheckSymbolExists)
    4848INCLUDE (CheckCSourceCompiles)
    4949INCLUDE (TestBigEndian)
     
    134134
    135135# IDNA process: we use libidn from GNU (unless the function & header files are included in libc)
    136 IF(NOT DIAMID_IDNA_IGNORE  AND NOT DIAMID_IDNA_REJECT)
     136IF(NOT DIAMID_IDNA_IGNORE AND NOT DIAMID_IDNA_REJECT)
    137137        FIND_PACKAGE(IDNA)
    138138        SET(CHECK_IDNA_SOURCE_CODE "
     
    160160SET(GNUTLS_LIBRARIES ${GNUTLS_LIBRARIES} PARENT_SCOPE)
    161161
    162 find_path(GCRYPT_INCLUDE_DIR NAMES gcrypt.h)
    163 If ( NOT GCRYPT_INCLUDE_DIR )
     162FIND_PATH(GCRYPT_INCLUDE_DIR NAMES gcrypt.h)
     163IF(NOT GCRYPT_INCLUDE_DIR)
    164164        MESSAGE(SEND_ERROR "Unable to find gcrypt.h, please install libgcrypt-dev or equivalent")
    165 Endif ( NOT GCRYPT_INCLUDE_DIR )
     165ENDIF(NOT GCRYPT_INCLUDE_DIR)
    166166MARK_AS_ADVANCED(GCRYPT_INCLUDE_DIR)
    167167SET(GCRYPT_INCLUDE_DIR ${GCRYPT_INCLUDE_DIR} PARENT_SCOPE)
    168168
    169169# Also we need libgcrypt to... display its version :(
    170 find_library(GCRYPT_LIBRARY
     170FIND_LIBRARY(GCRYPT_LIBRARY
    171171  NAMES gcrypt
    172172)
    173 If ( NOT GCRYPT_LIBRARY )
     173IF(NOT GCRYPT_LIBRARY)
    174174        MESSAGE(SEND_ERROR "Unable to find libgcrypt, please install libgcrypt or equivalent")
    175 Endif ( NOT GCRYPT_LIBRARY )
     175ENDIF(NOT GCRYPT_LIBRARY)
    176176SET(GCRYPT_LIBRARY ${GCRYPT_LIBRARY} PARENT_SCOPE)
    177177
     
    229229SET(LFDCORE_INCLUDES ${SCTP_INCLUDE_DIR} ${GNUTLS_INCLUDE_DIR} ${GCRYPT_INCLUDE_DIR} PARENT_SCOPE)
    230230# And dependencies
    231 SET(LFDCORE_LINK_INTERFACES "" PARENT_SCOPE) 
     231SET(LFDCORE_LINK_INTERFACES "" PARENT_SCOPE)
    232232                # We don't force other libraries, the programs will link with what it needs
    233233                # (such as libgnutls if it uses GNUTLS_DEBUG() macro
Note: See TracChangeset for help on using the changeset viewer.