-*/
-typedef struct {
- /* Pointer back to the server */
- void *server;
-
- /* Filename of the configuration file */
- char *filename;
-
- /* Configuration sections */
- SilcConfigServerSectionAlg *cipher;
- SilcConfigServerSectionAlg *pkcs;
- SilcConfigServerSectionAlg *hash_func;
- SilcConfigServerSectionServerInfo *server_info;
- SilcConfigServerSectionAdminInfo *admin_info;
- SilcConfigServerSectionListenPort *listen_port;
- SilcConfigServerSectionLogging *logging;
- SilcConfigServerSectionConnectionClass *conn_class;
- SilcConfigServerSectionClientConnection *clients;
- SilcConfigServerSectionServerConnection *servers;
- SilcConfigServerSectionServerConnection *routers;
- SilcConfigServerSectionAdminConnection *admins;
- SilcConfigServerSectionDenyConnection *denied;
- SilcConfigServerSectionRedirectClient *redirect;
-} SilcConfigServerObject;
-
-typedef SilcConfigServerObject *SilcConfigServer;
-
-/* Configuration section type enumerations. */
-typedef enum {
- SILC_CONFIG_SERVER_SECTION_TYPE_NONE = 0,
- SILC_CONFIG_SERVER_SECTION_TYPE_CIPHER,
- SILC_CONFIG_SERVER_SECTION_TYPE_PKCS,
- SILC_CONFIG_SERVER_SECTION_TYPE_HASH_FUNCTION,
- SILC_CONFIG_SERVER_SECTION_TYPE_SERVER_INFO,
- SILC_CONFIG_SERVER_SECTION_TYPE_ADMIN_INFO,
- SILC_CONFIG_SERVER_SECTION_TYPE_LISTEN_PORT,
- SILC_CONFIG_SERVER_SECTION_TYPE_LOGGING,
- SILC_CONFIG_SERVER_SECTION_TYPE_CONNECTION_CLASS,
- SILC_CONFIG_SERVER_SECTION_TYPE_CLIENT_CONNECTION,
- SILC_CONFIG_SERVER_SECTION_TYPE_SERVER_CONNECTION,
- SILC_CONFIG_SERVER_SECTION_TYPE_ROUTER_CONNECTION,
- SILC_CONFIG_SERVER_SECTION_TYPE_ADMIN_CONNECTION,
- SILC_CONFIG_SERVER_SECTION_TYPE_DENY_CONNECTION,
- SILC_CONFIG_SERVER_SECTION_TYPE_REDIRECT_CLIENT,
-} SilcConfigServerSectionType;
-
-/* SILC Configuration Section structure. */
+/* Holds all configured router connections from config file */
+typedef struct SilcServerConfigSectionRouterStruct {
+ char *host;
+ SilcAuthMethod auth_meth;
+ void *auth_data;
+ uint32 auth_data_len;
+ uint16 port;
+ char *version;
+ uint32 class;
+ bool initiator;
+ bool backup_router;
+ char *backup_replace_ip;
+ uint16 backup_replace_port;
+ bool backup_local;
+ struct SilcServerConfigSectionRouterStruct *next;
+} SilcServerConfigSectionRouter;
+
+/* define the SilcServerConfig object */