Mercurial > hg > freeDiameter
annotate extensions/CMakeLists.txt @ 1367:76968748fb33
Add & enable loadtest_cc. Enable test_cc.
author | Thomas Klausner <tk@giga.or.at> |
---|---|
date | Sun, 09 Jun 2019 15:44:52 +0200 |
parents | 2adac053aac4 |
children | e99e8f20b346 |
rev | line source |
---|---|
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
1 PROJECT("freeDiameter extensions" C) |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
2 |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
3 # We want all resulting objects in the same folder |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
4 SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
5 |
9
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
6 # Use the macro FD_ADD_EXTENSION(name files...) to create an extension |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
7 # It is equivalent to add_library with the appropriate parameters |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
8 # and naming conventions (.fdx : FreeDiameter eXtension) |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
9 MACRO(FD_ADD_EXTENSION EXTNAME) |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
10 ADD_LIBRARY(${EXTNAME} MODULE ${ARGN}) |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
11 SET_TARGET_PROPERTIES(${EXTNAME} PROPERTIES PREFIX "" ) |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
12 SET_TARGET_PROPERTIES(${EXTNAME} PROPERTIES SUFFIX ".fdx" ) |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
13 ENDMACRO(FD_ADD_EXTENSION) |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
14 |
1333 | 15 # Use the macro FD_EXTENSION_SUBDIR(extmacroname subdir descr default) to |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
16 # add a new extension subdirectory. |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
17 MACRO(FD_EXTENSION_SUBDIR EXTSUBDIR EXTDESCR EXTDEFAULT) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
18 STRING(TOUPPER ${EXTSUBDIR} EXTMACRONAME) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
19 IF (NOT ALL_EXTENSIONS) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
20 OPTION(BUILD_${EXTMACRONAME} "Build ${EXTSUBDIR}.fdx? (${EXTDESCR})" ${EXTDEFAULT}) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
21 ENDIF (NOT ALL_EXTENSIONS) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
22 IF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
23 SUBDIRS(${EXTSUBDIR}) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
24 ENDIF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
25 ENDMACRO(FD_EXTENSION_SUBDIR) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
26 |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
27 OPTION(ALL_EXTENSIONS "Build ALL available extensions? (disable to select individual components)" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
28 |
238
62eaf631eb61
Fix compilation issue when gnutls is not in standard directory
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
167
diff
changeset
|
29 # The extensions include the headers of freeDiameter that contains gnutls objects |
667
1f7c7ce85db3
More cleanups in the CMakeLists files
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
651
diff
changeset
|
30 INCLUDE_DIRECTORIES(${LFDCORE_INCLUDES}) |
238
62eaf631eb61
Fix compilation issue when gnutls is not in standard directory
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
167
diff
changeset
|
31 |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
32 |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
33 ########################### |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
34 # Extensions section |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
35 |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
36 #### |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
37 # Diameter applications dictionaries |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
38 |
596
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
39 FD_EXTENSION_SUBDIR(dict_nasreq "NASREQ (RFC4005) Dictionary definitions" ON) |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
40 FD_EXTENSION_SUBDIR(dict_eap "Diameter EAP (RFC4072) Dictionary definitions" ON) |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
41 |
1333 | 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) | |
739
a47f7b36a309
Added initial incomplete dictionary for rfc4006, contributed by Konstantin Chekushin <koch@lmt.lv>
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
722
diff
changeset
|
45 |
596
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
46 FD_EXTENSION_SUBDIR(dict_sip "Diameter SIP (RFC4740) Dictionary definitions" ON) |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
47 |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
48 FD_EXTENSION_SUBDIR(dict_mip6a "Diameter Mobile IPv6 Auth Dictionary definitions" ON) |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
49 FD_EXTENSION_SUBDIR(dict_mip6i "Diameter Mobile IPv6 IKE Dictionary definitions" ON) |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
50 FD_EXTENSION_SUBDIR(dict_nas_mipv6 "Diameter NAS-to-HAAA Interaction Dictionary definitions" ON) |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
51 FD_EXTENSION_SUBDIR(dict_rfc5777 "Classification and QoS (RFC 5777) Dictionary definitions" ON) |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
52 |
1333 | 53 FD_EXTENSION_SUBDIR(dict_json "Load Diameter dictionary definitions from JSON files." OFF) |
600
e9c0bdedf2eb
Initial draft version of dict_legacy_xml, parses XML file but no conversion to fD yet.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
596
diff
changeset
|
54 FD_EXTENSION_SUBDIR(dict_legacy_xml "Load Diameter dictionary definitions from XML files." OFF) |
e9c0bdedf2eb
Initial draft version of dict_legacy_xml, parses XML file but no conversion to fD yet.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
596
diff
changeset
|
55 |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
56 |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
57 #### |
254
a857024cb48b
Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
238
diff
changeset
|
58 # Diameter applications |
a857024cb48b
Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
238
diff
changeset
|
59 |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
60 FD_EXTENSION_SUBDIR(app_acct "Simple accounting application that stores accounting records in flat database" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
61 FD_EXTENSION_SUBDIR(app_diameap "Diameter EAP Application server (RFC 4072)" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
62 FD_EXTENSION_SUBDIR(app_radgw "RADIUS/Diameter gateway translation - RADIUS client to Diameter server" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
63 FD_EXTENSION_SUBDIR(app_sip "Diameter SIP Authentication and Authorization server (RFC 4740)" OFF) |
283
f433bc04eb6a
Renamed module to align with distribution shiped file
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
279
diff
changeset
|
64 |
722
6a7323cd78b3
New app_redirect.fdx code (UNTESTED)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
717
diff
changeset
|
65 FD_EXTENSION_SUBDIR(app_redirect "Diameter Redirect server: send configurable Redirect indications to other peers" OFF) |
6a7323cd78b3
New app_redirect.fdx code (UNTESTED)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
717
diff
changeset
|
66 |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
67 |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
68 #### |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
69 # Routing extensions |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
70 |
1333 | 71 FD_EXTENSION_SUBDIR(rt_busypeers "Handling of Diameter TOO_BUSY messages and relay timeouts" ON) |
72 FD_EXTENSION_SUBDIR(rt_default "Configurable routing rules for freeDiameter" ON) | |
1340
daf61e573fee
rt_deny_by_size: new extension
Thomas Klausner <tk@giga.or.at>
parents:
1333
diff
changeset
|
73 FD_EXTENSION_SUBDIR(rt_deny_by_size "Deny messages that are larger than a configured size" ON) |
1333 | 74 FD_EXTENSION_SUBDIR(rt_ereg "Configurable routing based on regexp matching of AVP values" OFF) |
75 FD_EXTENSION_SUBDIR(rt_ignore_dh "Stow Destination-Host in Proxy-Info, restore to Origin-Host for answers" ON) | |
1040 | 76 FD_EXTENSION_SUBDIR(rt_load_balance "Balance load over multiple equal hosts, based on outstanding requests" ON) |
1333 | 77 FD_EXTENSION_SUBDIR(rt_randomize "Randomly choose one of the highest scored hosts and increase its score by one" ON) |
78 FD_EXTENSION_SUBDIR(rt_redirect "Handling of Diameter Redirect messages" ON) | |
1341 | 79 FD_EXTENSION_SUBDIR(rt_rewrite "Convert/remove AVP data in messages" ON) |
514
179ef7de53de
New extension: load-balancing based on numerical user-name AVP values
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
493
diff
changeset
|
80 |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
81 |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
82 #### |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
83 # Peers security extensions |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
84 |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
85 FD_EXTENSION_SUBDIR(acl_wl "White-list based authorization of incoming connections" ON) |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
86 |
254
a857024cb48b
Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
238
diff
changeset
|
87 |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
88 #### |
254
a857024cb48b
Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
238
diff
changeset
|
89 # Debug & test extensions |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
90 |
1348 | 91 FD_EXTENSION_SUBDIR(dbg_loglevel "Read loglevel from file -- allows runtime change" ON) |
1333 | 92 FD_EXTENSION_SUBDIR(dbg_monitor "Outputs periodical status information" ON) |
1126
d6e18ebca0c5
New extension dbg_msg_dumps for debug / learning.
Sebastien Decugis <sdecugis@freediameter.net>
parents:
1103
diff
changeset
|
93 FD_EXTENSION_SUBDIR(dbg_msg_timings "Show some timing information for messages" ON) |
1333 | 94 FD_EXTENSION_SUBDIR(dbg_msg_dumps "Show human-readable content of the received & sent messages" ON) |
95 FD_EXTENSION_SUBDIR(dbg_rt "Routing extension for debugging the routing module" ON) | |
1367
76968748fb33
Add & enable loadtest_cc. Enable test_cc.
Thomas Klausner <tk@giga.or.at>
parents:
1348
diff
changeset
|
96 FD_EXTENSION_SUBDIR(loadtest_cc "Generate Credit-Control-Requests and count replies" ON) |
1333 | 97 FD_EXTENSION_SUBDIR(test_app "Testing application to send dummy message to another peer, like a Diameter 'ping'" OFF) |
1348 | 98 FD_EXTENSION_SUBDIR(test_as "Receive Abort-Session-Requests and display the data" OFF) |
1367
76968748fb33
Add & enable loadtest_cc. Enable test_cc.
Thomas Klausner <tk@giga.or.at>
parents:
1348
diff
changeset
|
99 FD_EXTENSION_SUBDIR(test_cc "Receive Credit-Control-Requests and display the data" ON) |
1333 | 100 FD_EXTENSION_SUBDIR(test_sip "Testing application to simulate Diameter-SIP client (RFC4740)" OFF) |
609
2d15fd8ef5ba
Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
600
diff
changeset
|
101 FD_EXTENSION_SUBDIR(dbg_interactive "Python-interpreter based module" OFF) |
1333 | 102 FD_EXTENSION_SUBDIR(test_netemul "Simple Diameter network emulator proxy extension (latency, PDV, duplicates)" OFF) |
651
083317a4e947
Added new test_netemul extension (need testing)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
609
diff
changeset
|
103 |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
104 |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
105 |
304
ad3c46016584
Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
283
diff
changeset
|
106 # The following extension have very little use except for specific tests, so we disable them except in Debug configurations. |
ad3c46016584
Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
283
diff
changeset
|
107 IF (CMAKE_BUILD_TYPE MATCHES "Debug") |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
108 FD_EXTENSION_SUBDIR(_sample "Simple extension to demonstrate extension mechanism, for developpers" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
109 FD_EXTENSION_SUBDIR(test_acct "Receive Accounting-Requests and display the data, but no storage" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
110 FD_EXTENSION_SUBDIR(test_rt_any "Routing extension randomly sending message to any peer available, for testing purpose" OFF) |
304
ad3c46016584
Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
283
diff
changeset
|
111 ENDIF (CMAKE_BUILD_TYPE MATCHES "Debug") |
ad3c46016584
Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
283
diff
changeset
|
112 |