diff include/freeDiameter/libfdcore.h @ 1396:188c82b6690b

Add ProcessingPeersPattern and ProcessingPeersMinimum parameters. If this is configured, the process will accept all connections from peers matching ProcessingPeersPattern, but will NOT accept connections from other peers until ProcessingPeersMinimum peers of the first type are connected. This allows relays to only go online if there are enough worker peers connected behind them.
author Thomas Klausner <tk@giga.or.at>
date Fri, 15 Nov 2019 11:38:30 +0100
parents 175f2eb883a0
children 239ba25870d8
line wrap: on
line diff
--- a/include/freeDiameter/libfdcore.h	Fri Nov 15 11:33:48 2019 +0100
+++ b/include/freeDiameter/libfdcore.h	Fri Nov 15 11:38:30 2019 +0100
@@ -44,6 +44,7 @@
 #include <freeDiameter/libfdproto.h>
 #include <gnutls/gnutls.h>
 #include <gnutls/x509.h>
+#include <regex.h>
 
 /* GNUTLS version */
 #ifndef GNUTLS_VERSION
@@ -132,6 +133,8 @@
 	uint16_t	 cnf_sctp_str;	/* default max number of streams for SCTP associations (def: 30) */
 	struct fd_list	 cnf_endpoints;	/* the local endpoints to bind the server to. list of struct fd_endpoint. default is empty (bind all). After servers are started, this is the actual list of endpoints including port information. */
 	int		 cnf_thr_srv;	/* Number of threads per servers handling the connection state machines */
+	int		 cnf_processing_peers_minimum;	/* Number of processing peers that must be connected before other peers may connect */
+	regex_t		 cnf_processing_peers_pattern_regex;	/* Regex pattern for identifying processing peers */
 	struct fd_list	 cnf_apps;	/* Applications locally supported (except relay, see flags). Use fd_disp_app_support to add one. list of struct fd_app. */
 	uint16_t	 cnf_dispthr;	/* Number of dispatch threads to create */
 	uint16_t	 cnf_rr_in_answers;	/* include Route-Record AVP in answers */
"Welcome to our mercurial repository"