X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilc%2Fclientconfig.h;h=e5651a705d0e9a6a2fa9181cd6d087913cadb264;hb=a818c5b5411bbc4436d1c5f011236985c96bb787;hp=f2c7a4afa97119a6b846ed12bf22c990eba32a3f;hpb=62f89b2886bbe9df82d9b2fdabfe707509d9e0fc;p=silc.git diff --git a/apps/silc/clientconfig.h b/apps/silc/clientconfig.h index f2c7a4af..e5651a70 100644 --- a/apps/silc/clientconfig.h +++ b/apps/silc/clientconfig.h @@ -25,8 +25,8 @@ typedef struct SilcClientConfigSectionAlgStruct { char *alg_name; char *sim_name; - unsigned int block_len; - unsigned int key_len; + SilcUInt32 block_len; + SilcUInt32 key_len; struct SilcClientConfigSectionAlgStruct *next; struct SilcClientConfigSectionAlgStruct *prev; #define SILC_CLIENT_CONFIG_MODNAME "builtin" @@ -37,7 +37,7 @@ typedef struct SilcClientConfigSectionConnectionStruct { char *host; int auth_meth; char *auth_data; - unsigned short port; + SilcUInt16 port; struct SilcClientConfigSectionConnectionStruct *next; struct SilcClientConfigSectionConnectionStruct *prev; #define SILC_CLIENT_CONFIG_AUTH_METH_PASSWD "passwd" @@ -69,6 +69,7 @@ typedef struct { SilcClientConfigSectionAlg *cipher; SilcClientConfigSectionAlg *pkcs; SilcClientConfigSectionAlg *hash_func; + SilcClientConfigSectionAlg *hmac; SilcClientConfigSectionConnection *conns; SilcClientConfigSectionCommand *commands; } SilcClientConfigObject; @@ -81,6 +82,7 @@ typedef enum { SILC_CLIENT_CONFIG_SECTION_TYPE_CIPHER, SILC_CLIENT_CONFIG_SECTION_TYPE_PKCS, SILC_CLIENT_CONFIG_SECTION_TYPE_HASH_FUNCTION, + SILC_CLIENT_CONFIG_SECTION_TYPE_HMAC, SILC_CLIENT_CONFIG_SECTION_TYPE_CONNECTION, SILC_CLIENT_CONFIG_SECTION_TYPE_COMMAND = 253, /* Special section */ } SilcClientConfigSectionType; @@ -89,7 +91,7 @@ typedef enum { typedef struct { const char *section; SilcClientConfigSectionType type; - unsigned int maxfields; + int maxfields; } SilcClientConfigSection; /* List of all possible config sections in SILC client */ @@ -99,7 +101,7 @@ extern SilcClientConfigSection silc_client_config_sections[]; from a file to this structure before parsing it further. */ typedef struct SilcClientConfigParseStruct { SilcBuffer line; - unsigned int linenum; + int linenum; SilcClientConfigSection *section; struct SilcClientConfigParseStruct *next; struct SilcClientConfigParseStruct *prev; @@ -112,11 +114,12 @@ int silc_client_config_parse(SilcClientConfig config, SilcBuffer buffer, SilcClientConfigParse *return_config); int silc_client_config_parse_lines(SilcClientConfig config, SilcClientConfigParse parse_config); -int silc_client_config_check_sections(unsigned int checkmask); +int silc_client_config_check_sections(SilcUInt32 checkmask); void silc_client_config_setlogfiles(SilcClientConfig config); -void silc_client_config_register_ciphers(SilcClientConfig config); -void silc_client_config_register_pkcs(SilcClientConfig config); -void silc_client_config_register_hashfuncs(SilcClientConfig config); +bool silc_client_config_register_ciphers(SilcClientConfig config); +bool silc_client_config_register_pkcs(SilcClientConfig config); +bool silc_client_config_register_hashfuncs(SilcClientConfig config); +bool silc_client_config_register_hmacs(SilcClientConfig config); SilcClientConfigSectionConnection * silc_client_config_find_connection(SilcClientConfig config, char *host, int port);