X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilcutil.h;h=ca34315a7ea53e4ad44ed9d7b01f390f356fdcee;hp=2e92330cf3ea70d406f0a9c36df51f6b2415e262;hb=a818c5b5411bbc4436d1c5f011236985c96bb787;hpb=0d805c373cb74658990551a5a2725f0d07b2d6c7 diff --git a/lib/silcutil/silcutil.h b/lib/silcutil/silcutil.h index 2e92330c..ca34315a 100644 --- a/lib/silcutil/silcutil.h +++ b/lib/silcutil/silcutil.h @@ -1,16 +1,15 @@ /* - silcutil.h + silcutil.h - Author: Pekka Riikonen + Author: Pekka Riikonen - Copyright (C) 1997 - 2000 Pekka Riikonen + Copyright (C) 1997 - 2002 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - + the Free Software Foundation; version 2 of the License. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -22,39 +21,42 @@ #define SILCUTIL_H /* Prototypes */ -char *silc_file_read(const char *filename, uint32 *return_len); -int silc_file_write(const char *filename, const char *buffer, uint32 len); -int silc_file_write_mode(const char *filename, const char *buffer, - uint32 len, int mode); int silc_gets(char *dest, int destlen, const char *src, int srclen, int begin); int silc_check_line(char *buf); char *silc_get_time(); char *silc_to_upper(char *string); -char *silc_encode_pem(unsigned char *data, uint32 len); -char *silc_encode_pem_file(unsigned char *data, uint32 data_len); -unsigned char *silc_decode_pem(unsigned char *pem, uint32 pem_len, - uint32 *ret_len); -int silc_parse_nickname(char *string, char **nickname, char **server, - uint32 *num); +char *silc_encode_pem(unsigned char *data, SilcUInt32 len); +char *silc_encode_pem_file(unsigned char *data, SilcUInt32 data_len); +unsigned char *silc_decode_pem(unsigned char *pem, SilcUInt32 pem_len, + SilcUInt32 *ret_len); +bool silc_parse_userfqdn(const char *string, char **left, char **right); void silc_parse_command_line(unsigned char *buffer, unsigned char ***parsed, - uint32 **parsed_lens, - uint32 **parsed_types, - uint32 *parsed_num, - uint32 max_args); + SilcUInt32 **parsed_lens, + SilcUInt32 **parsed_types, + SilcUInt32 *parsed_num, + SilcUInt32 max_args); char *silc_format(char *fmt, ...); -char *silc_id_render(void *id, uint16 type); +char *silc_id_render(void *id, SilcUInt16 type); int silc_string_compare(char *string1, char *string2); char *silc_string_regexify(const char *string); int silc_string_regex_match(const char *regex, const char *string); int silc_string_match(const char *string1, const char *string2); char *silc_get_username(); char *silc_get_real_name(); -uint32 silc_hash_string(void *key); -uint32 silc_hash_uint(void *key); -uint32 silc_hash_ptr(void *key); -uint32 silc_hash_server_id(void *key); -uint32 silc_hash_client_id(void *key); -uint32 silc_hash_channel_id(void *key); +SilcUInt32 silc_hash_string(void *key, void *user_context); +SilcUInt32 silc_hash_uint(void *key, void *user_context); +SilcUInt32 silc_hash_ptr(void *key, void *user_context); +SilcUInt32 silc_hash_id(void *key, void *user_context); +SilcUInt32 silc_hash_data(void *key, void *user_context); +bool silc_hash_string_compare(void *key1, void *key2, void *user_context); +bool silc_hash_id_compare(void *key1, void *key2, void *user_context); +bool silc_hash_client_id_compare(void *key1, void *key2, void *user_context); +bool silc_hash_data_compare(void *key1, void *key2, void *user_context); +char *silc_client_chmode(SilcUInt32 mode, const char *cipher, const char *hmac); +char *silc_client_chumode(SilcUInt32 mode); +char *silc_client_chumode_char(SilcUInt32 mode); +int silc_gettimeofday(struct timeval *p); +char *silc_fingerprint(const unsigned char *data, SilcUInt32 data_len); #endif