Integer type name change.
authorPekka Riikonen <priikone@silcnet.org>
Sun, 24 Feb 2002 11:14:41 +0000 (11:14 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 24 Feb 2002 11:14:41 +0000 (11:14 +0000)
165 files changed:
CHANGES
apps/irssi/src/silc/core/client_ops.c
apps/irssi/src/silc/core/client_ops.h
apps/irssi/src/silc/core/clientutil.c
apps/irssi/src/silc/core/silc-channels.c
apps/irssi/src/silc/core/silc-core.c
apps/irssi/src/silc/core/silc-core.h
apps/irssi/src/silc/core/silc-servers.c
apps/irssi/src/silc/core/silc-servers.h
apps/silc/client_ops.c
apps/silc/client_ops.h
apps/silc/clientconfig.h
apps/silc/clientutil.c
apps/silc/local_command.c
apps/silc/screen.h
apps/silc/silc.c
apps/silc/silc.h
apps/silcd/command.c
apps/silcd/command.h
apps/silcd/command_reply.c
apps/silcd/command_reply.h
apps/silcd/idlist.c
apps/silcd/idlist.h
apps/silcd/packet_receive.c
apps/silcd/packet_send.c
apps/silcd/packet_send.h
apps/silcd/protocol.c
apps/silcd/protocol.h
apps/silcd/route.c
apps/silcd/route.h
apps/silcd/server.c
apps/silcd/server.h
apps/silcd/server_backup.c
apps/silcd/server_backup.h
apps/silcd/server_internal.h
apps/silcd/server_util.c
apps/silcd/server_util.h
apps/silcd/serverconfig.c
apps/silcd/serverconfig.h
apps/silcd/serverid.c
apps/silcd/serverid.h
apps/silcd/silcd.c
apps/silcer/intl/dcigettext.c
apps/silcer/intl/gettext.h
apps/silcer/intl/gettextP.h
apps/silcer/intl/loadmsgcat.c
apps/silcer/src/SilcerMainDlg.cc
apps/silcer/src/silcerapp.cc
includes/bitmove.h
includes/silcincludes.h
lib/silcclient/client.c
lib/silcclient/client.h
lib/silcclient/client_channel.c
lib/silcclient/client_ftp.c
lib/silcclient/client_internal.h
lib/silcclient/client_keyagr.c
lib/silcclient/client_notify.c
lib/silcclient/client_ops_example.c
lib/silcclient/client_prvmsg.c
lib/silcclient/command.c
lib/silcclient/command.h
lib/silcclient/command_reply.c
lib/silcclient/command_reply.h
lib/silcclient/idlist.c
lib/silcclient/idlist.h
lib/silcclient/protocol.c
lib/silcclient/protocol.h
lib/silcclient/silcclient.h
lib/silccore/silcargument.c
lib/silccore/silcargument.h
lib/silccore/silcauth.c
lib/silccore/silcauth.h
lib/silccore/silcchannel.c
lib/silccore/silcchannel.h
lib/silccore/silccommand.c
lib/silccore/silccommand.h
lib/silccore/silcid.c
lib/silccore/silcid.h
lib/silccore/silcidcache.c
lib/silccore/silcidcache.h
lib/silccore/silcnotify.c
lib/silccore/silcnotify.h
lib/silccore/silcpacket.c
lib/silccore/silcpacket.h
lib/silccore/silcprivate.c
lib/silccore/silcprivate.h
lib/silccrypt/aes.c
lib/silccrypt/blowfish.c
lib/silccrypt/cast.c
lib/silccrypt/ciphers_def.h
lib/silccrypt/mars.c
lib/silccrypt/md5.c
lib/silccrypt/md5_internal.h
lib/silccrypt/pkcs1.c
lib/silccrypt/rc5.c
lib/silccrypt/rc5_internal.h
lib/silccrypt/rc6.c
lib/silccrypt/rsa.c
lib/silccrypt/rsa_internal.h
lib/silccrypt/sha1.c
lib/silccrypt/sha1_internal.h
lib/silccrypt/silccipher.c
lib/silccrypt/silccipher.h
lib/silccrypt/silcdh.h
lib/silccrypt/silchash.c
lib/silccrypt/silchash.h
lib/silccrypt/silchmac.c
lib/silccrypt/silchmac.h
lib/silccrypt/silcpkcs.c
lib/silccrypt/silcpkcs.h
lib/silccrypt/silcrng.c
lib/silccrypt/silcrng.h
lib/silccrypt/twofish.c
lib/silcmath/mp_gmp.c
lib/silcmath/mp_mpi.c
lib/silcmath/mpbin.c
lib/silcmath/silcmath.h
lib/silcmath/silcmp.h
lib/silcmath/silcprimegen.c
lib/silcsftp/sftp_client.c
lib/silcsftp/sftp_fs_memory.c
lib/silcsftp/sftp_server.c
lib/silcsftp/sftp_util.c
lib/silcsftp/sftp_util.h
lib/silcsftp/silcsftp.h
lib/silcsftp/silcsftp_fs.h
lib/silcsftp/tests/sftp_client.c
lib/silcske/payload.c
lib/silcske/silcske.c
lib/silcske/silcske.h
lib/silcske/silcske_payload.h
lib/silcutil/beos/silcbeossockconn.c
lib/silcutil/os2/silcos2net.c
lib/silcutil/os2/silcos2schedule.c
lib/silcutil/os2/silcos2sockconn.c
lib/silcutil/os2/silcos2util.c
lib/silcutil/silcbuffer.h
lib/silcutil/silcbuffmt.c
lib/silcutil/silcbuffmt.h
lib/silcutil/silcconfig.c
lib/silcutil/silcconfig.h
lib/silcutil/silcfileutil.c
lib/silcutil/silcfileutil.h
lib/silcutil/silchashtable.c
lib/silcutil/silchashtable.h
lib/silcutil/silclog.c
lib/silcutil/silclog.h
lib/silcutil/silcnet.c
lib/silcutil/silcnet.h
lib/silcutil/silcschedule.c
lib/silcutil/silcschedule.h
lib/silcutil/silcschedule_i.h
lib/silcutil/silcsockconn.c
lib/silcutil/silcsockconn.h
lib/silcutil/silcutil.c
lib/silcutil/silcutil.h
lib/silcutil/symbian/silcepocsockconn.cpp
lib/silcutil/unix/silcunixnet.c
lib/silcutil/unix/silcunixschedule.c
lib/silcutil/unix/silcunixsockconn.c
lib/silcutil/win32/silcwin32net.c
lib/silcutil/win32/silcwin32schedule.c
lib/silcutil/win32/silcwin32sockconn.c
lib/silcutil/win32/silcwin32util.c
win32/tests/testi2.cpp

diff --git a/CHANGES b/CHANGES
index 5ab197924c3c86d9491e6ef5c61beb19d14663ec..014ded546a64a203c7901dae1aa1786c4bed898e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,10 @@
+Sun Feb 24 12:53:25 EET 2002  Pekka Riikonen <priikone@silcnet.org>
+
+       * Changed all integer type names:
+         [u]int[8/16/32/64] -> Silc[UInt/Int][8/16/32/64].  This is
+         to avoid collisions with other libraries using same type names
+         as we did.
+
 Sat Feb 23 20:31:43 EET 2002  Pekka Riikonen <priikone@silcnet.org>
 
        * Added `prefer_ipv6' argument to the functions
index 7f968a6fb75d61e5792ab94a77d0277f319e93c4..6d8e905bb4ee7b5359bfe2af424f1e618fbff608 100644 (file)
@@ -41,7 +41,7 @@
 static void 
 silc_verify_public_key_internal(SilcClient client, SilcClientConnection conn,
                                const char *name, SilcSocketType conn_type, 
-                               unsigned char *pk, uint32 pk_len, 
+                               unsigned char *pk, SilcUInt32 pk_len, 
                                SilcSKEPKType pk_type,
                                SilcVerifyPublicKey completion, void *context);
 
@@ -160,7 +160,7 @@ void silc_notify(SilcClient client, SilcClientConnection conn,
   SilcServerEntry server_entry;
   SilcIdType idtype;
   void *entry;
-  uint32 mode;
+  SilcUInt32 mode;
   char userhost[512];
   char *name, *tmp;
   GSList *list1, *list_tmp;
@@ -351,7 +351,7 @@ void silc_notify(SilcClient client, SilcClientConnection conn,
 
     idtype = va_arg(va, int);
     entry = va_arg(va, void *);
-    mode = va_arg(va, uint32);
+    mode = va_arg(va, SilcUInt32);
     (void)va_arg(va, char *);
     (void)va_arg(va, char *);
     channel = va_arg(va, SilcChannelEntry);
@@ -394,7 +394,7 @@ void silc_notify(SilcClient client, SilcClientConnection conn,
     SILC_LOG_DEBUG(("Notify: CUMODE_CHANGE"));
 
     client_entry = va_arg(va, SilcClientEntry);
-    mode = va_arg(va, uint32);
+    mode = va_arg(va, SilcUInt32);
     client_entry2 = va_arg(va, SilcClientEntry);
     channel = va_arg(va, SilcChannelEntry);
     
@@ -516,13 +516,13 @@ void silc_notify(SilcClient client, SilcClientConnection conn,
        */
       int i;
       SilcClientEntry *clients;
-      uint32 clients_count;
+      SilcUInt32 clients_count;
 
       SILC_LOG_DEBUG(("Notify: SIGNOFF"));
       
       (void)va_arg(va, void *);
       clients = va_arg(va, SilcClientEntry *);
-      clients_count = va_arg(va, uint32);
+      clients_count = va_arg(va, SilcUInt32);
   
       for (i = 0; i < clients_count; i++) {
        memset(userhost, 0, sizeof(userhost));
@@ -642,7 +642,7 @@ void silc_command(SilcClient client, SilcClientConnection conn,
 static void silc_client_join_get_users(SilcClient client,
                                       SilcClientConnection conn,
                                       SilcClientEntry *clients,
-                                      uint32 clients_count,
+                                      SilcUInt32 clients_count,
                                       void *context)
 {
   SilcChannelEntry channel = (SilcChannelEntry)context;
@@ -758,7 +758,7 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
     {
       char buf[1024], *nickname, *username, *realname, *nick;
       unsigned char *fingerprint;
-      uint32 idle, mode;
+      SilcUInt32 idle, mode;
       SilcBuffer channels;
       SilcClientEntry client_entry;
       
@@ -774,7 +774,7 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
       } else if (status == SILC_STATUS_ERR_NO_SUCH_CLIENT_ID) {
        /* Try to find the entry for the unknown client ID, since we
           might have, and print the nickname of it for user. */
-       uint32 tmp_len;
+       SilcUInt32 tmp_len;
        unsigned char *tmp =
          silc_argument_get_arg_type(silc_command_get_args(cmd_payload),
                                     2, &tmp_len);
@@ -800,8 +800,8 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
       username = va_arg(vp, char *);
       realname = va_arg(vp, char *);
       channels = va_arg(vp, SilcBuffer);
-      mode = va_arg(vp, uint32);
-      idle = va_arg(vp, uint32);
+      mode = va_arg(vp, SilcUInt32);
+      idle = va_arg(vp, SilcUInt32);
       fingerprint = va_arg(vp, unsigned char *);
       
       silc_parse_userfqdn(nickname, &nick, NULL);
@@ -822,7 +822,7 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
          silc_dlist_start(list);
          while ((entry = silc_dlist_get(list)) != SILC_LIST_END) {
            char *m = silc_client_chumode_char(silc_channel_get_mode(entry));
-           uint32 name_len;
+           SilcUInt32 name_len;
            char *name = silc_channel_get_name(entry, &name_len);
            
            if (m)
@@ -890,7 +890,7 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
       } else if (status == SILC_STATUS_ERR_NO_SUCH_CLIENT_ID) {
        /* Try to find the entry for the unknown client ID, since we
           might have, and print the nickname of it for user. */
-       uint32 tmp_len;
+       SilcUInt32 tmp_len;
        unsigned char *tmp =
          silc_argument_get_arg_type(silc_command_get_args(cmd_payload),
                                     2, &tmp_len);
@@ -971,24 +971,24 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
   case SILC_COMMAND_JOIN: 
     {
       char *channel, *mode, *topic;
-      uint32 modei;
+      SilcUInt32 modei;
       SilcChannelEntry channel_entry;
       SilcBuffer client_id_list;
-      uint32 list_count;
+      SilcUInt32 list_count;
 
       if (!success)
        return;
 
       channel = va_arg(vp, char *);
       channel_entry = va_arg(vp, SilcChannelEntry);
-      modei = va_arg(vp, uint32);
-      (void)va_arg(vp, uint32);
+      modei = va_arg(vp, SilcUInt32);
+      (void)va_arg(vp, SilcUInt32);
       (void)va_arg(vp, unsigned char *);
       (void)va_arg(vp, unsigned char *);
       (void)va_arg(vp, unsigned char *);
       topic = va_arg(vp, char *);
       (void)va_arg(vp, unsigned char *);
-      list_count = va_arg(vp, uint32);
+      list_count = va_arg(vp, SilcUInt32);
       client_id_list = va_arg(vp, SilcBuffer);
 
       chanrec = silc_channel_find(server, channel);
@@ -1067,12 +1067,12 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
     
   case SILC_COMMAND_UMODE:
     {
-      uint32 mode;
+      SilcUInt32 mode;
       
       if (!success)
        return;
       
-      mode = va_arg(vp, uint32);
+      mode = va_arg(vp, SilcUInt32);
       
       if (mode & SILC_UMODE_SERVER_OPERATOR &&
          !(server->umode & SILC_UMODE_SERVER_OPERATOR))
@@ -1177,14 +1177,14 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
       void *entry;
       SilcPublicKey public_key;
       unsigned char *pk;
-      uint32 pk_len;
+      SilcUInt32 pk_len;
       GetkeyContext getkey;
       char *name;
       
       if (!success)
        return;
       
-      id_type = va_arg(vp, uint32);
+      id_type = va_arg(vp, SilcUInt32);
       entry = va_arg(vp, void *);
       public_key = va_arg(vp, SilcPublicKey);
 
@@ -1278,7 +1278,7 @@ typedef struct {
   char *entity;
   char *entity_name;
   unsigned char *pk;
-  uint32 pk_len;
+  SilcUInt32 pk_len;
   SilcSKEPKType pk_type;
   SilcVerifyPublicKey completion;
   void *context;
@@ -1322,7 +1322,7 @@ static void verify_public_key_completion(const char *line, void *context)
 static void 
 silc_verify_public_key_internal(SilcClient client, SilcClientConnection conn,
                                const char *name, SilcSocketType conn_type, 
-                               unsigned char *pk, uint32 pk_len, 
+                               unsigned char *pk, SilcUInt32 pk_len, 
                                SilcSKEPKType pk_type,
                                SilcVerifyPublicKey completion, void *context)
 {
@@ -1435,7 +1435,7 @@ silc_verify_public_key_internal(SilcClient client, SilcClientConnection conn,
     /* The key already exists, verify it. */
     SilcPublicKey public_key;
     unsigned char *encpk;
-    uint32 encpk_len;
+    SilcUInt32 encpk_len;
 
     /* Load the key file, try for both IP filename and hostname filename */
     if (!silc_pkcs_load_public_key(ipf, &public_key, 
@@ -1526,7 +1526,7 @@ silc_verify_public_key_internal(SilcClient client, SilcClientConnection conn,
 void 
 silc_verify_public_key(SilcClient client, SilcClientConnection conn,
                       SilcSocketType conn_type, unsigned char *pk, 
-                      uint32 pk_len, SilcSKEPKType pk_type,
+                      SilcUInt32 pk_len, SilcSKEPKType pk_type,
                       SilcVerifyPublicKey completion, void *context)
 {
   silc_verify_public_key_internal(client, conn, NULL, conn_type, pk,
@@ -1607,7 +1607,7 @@ static void silc_get_auth_method_callback(SilcClient client,
    is found and FALSE if not. `conn' may be NULL. */
 
 void silc_get_auth_method(SilcClient client, SilcClientConnection conn,
-                         char *hostname, uint16 port,
+                         char *hostname, SilcUInt16 port,
                          SilcGetAuthMeth completion, void *context)
 {
   InternalGetAuthMethod internal;
@@ -1674,7 +1674,7 @@ void silc_failure(SilcClient client, SilcClientConnection conn,
   }
 
   if (protocol->protocol->type == SILC_PROTOCOL_CLIENT_CONNECTION_AUTH) {
-    uint32 err = (uint32)failure;
+    SilcUInt32 err = (SilcUInt32)failure;
 
     if (err == SILC_AUTH_FAILED)
       printformat_module("fe-common/silc", NULL, NULL, MSGLEVEL_CRAP, 
@@ -1691,7 +1691,7 @@ void silc_failure(SilcClient client, SilcClientConnection conn,
 
 int silc_key_agreement(SilcClient client, SilcClientConnection conn,
                       SilcClientEntry client_entry, const char *hostname,
-                      uint16 port, SilcKeyAgreementCallback *completion,
+                      SilcUInt16 port, SilcKeyAgreementCallback *completion,
                       void **context)
 {
   char portstr[12];
@@ -1719,8 +1719,8 @@ int silc_key_agreement(SilcClient client, SilcClientConnection conn,
 }
 
 void silc_ftp(SilcClient client, SilcClientConnection conn,
-             SilcClientEntry client_entry, uint32 session_id,
-             const char *hostname, uint16 port)
+             SilcClientEntry client_entry, SilcUInt32 session_id,
+             const char *hostname, SilcUInt16 port)
 {
   SILC_SERVER_REC *server;
   char portstr[12];
index b7788ed7108728fed3b036aff451b244ffdf255d..69682f69b8157ace526dfff601ebfcc159d3a70c 100644 (file)
@@ -45,19 +45,19 @@ void silc_ask_passphrase(SilcClient client, SilcClientConnection conn,
                         SilcAskPassphrase completion, void *context);
 void silc_verify_public_key(SilcClient client, SilcClientConnection conn,
                            SilcSocketType conn_type, unsigned char *pk, 
-                           uint32 pk_len, SilcSKEPKType pk_type,
+                           SilcUInt32 pk_len, SilcSKEPKType pk_type,
                            SilcVerifyPublicKey completion, void *context);
 void silc_get_auth_method(SilcClient client, SilcClientConnection conn,
-                         char *hostname, uint16 port,
+                         char *hostname, SilcUInt16 port,
                          SilcGetAuthMeth completion, void *context);
 void silc_failure(SilcClient client, SilcClientConnection conn, 
                  SilcProtocol protocol, void *failure);
 int silc_key_agreement(SilcClient client, SilcClientConnection conn,
                       SilcClientEntry client_entry, const char *hostname,
-                      uint16 port, SilcKeyAgreementCallback *completion,
+                      SilcUInt16 port, SilcKeyAgreementCallback *completion,
                       void **context);
 void silc_ftp(SilcClient client, SilcClientConnection conn,
-             SilcClientEntry client_entry, uint32 session_id,
-             const char *hostname, uint16 port);
+             SilcClientEntry client_entry, SilcUInt32 session_id,
+             const char *hostname, SilcUInt16 port);
 
 #endif
index b6480e6abc3e9d1e871b749a96fb536e67cd2e85..93b575fe9a5fdc14a38da05166f101a169c7ce1d 100644 (file)
@@ -158,7 +158,7 @@ int silc_client_create_key_pair(char *pkcs_name, int bits,
   SilcPrivateKey prv_key;
   SilcRng rng;
   unsigned char *key;
-  uint32 key_len;
+  SilcUInt32 key_len;
   char line[256];
   char *pkfile = NULL, *prvfile = NULL;
 
@@ -553,7 +553,7 @@ int silc_client_show_key(char *keyfile)
   SilcPublicKeyIdentifier ident;
   char *fingerprint, *babbleprint;
   unsigned char *pk;
-  uint32 pk_len;
+  SilcUInt32 pk_len;
   SilcPKCS pkcs;
   int key_len = 0;
 
index 870c1f4343e1e862e36af5b9f2df353fa97dcf24..1952eb90acbcc9bd4bed1b888c62654d75fa45bc 100644 (file)
@@ -165,9 +165,9 @@ static void command_me(const char *data, SILC_SERVER_REC *server,
 {
   SILC_CHANNEL_REC *chanrec;
   char *tmpcmd = "ME", *tmp;
-  uint32 argc = 0;
+  SilcUInt32 argc = 0;
   unsigned char **argv;
-  uint32 *argv_lens, *argv_types;
+  SilcUInt32 *argv_lens, *argv_types;
   int i;
  
   if (!IS_SILC_SERVER(server) || !server->connected)
@@ -213,9 +213,9 @@ static void command_action(const char *data, SILC_SERVER_REC *server,
 {
   SILC_CHANNEL_REC *chanrec;
   char *tmpcmd = "ME", *tmp;
-  uint32 argc = 0;
+  SilcUInt32 argc = 0;
   unsigned char **argv;
-  uint32 *argv_lens, *argv_types;
+  SilcUInt32 *argv_lens, *argv_types;
   int i;
  
   if (!IS_SILC_SERVER(server) || !server->connected)
@@ -260,9 +260,9 @@ static void command_notice(const char *data, SILC_SERVER_REC *server,
 {
   SILC_CHANNEL_REC *chanrec;
   char *tmpcmd = "ME", *tmp;
-  uint32 argc = 0;
+  SilcUInt32 argc = 0;
   unsigned char **argv;
-  uint32 *argv_lens, *argv_types;
+  SilcUInt32 *argv_lens, *argv_types;
   int i;
  
   if (!IS_SILC_SERVER(server) || !server->connected)
@@ -422,7 +422,7 @@ typedef struct {
 static void silc_client_command_key_get_clients(SilcClient client,
                                                SilcClientConnection conn,
                                                SilcClientEntry *clients,
-                                               uint32 clients_count,
+                                               SilcUInt32 clients_count,
                                                void *context)
 {
   KeyGetClients internal = (KeyGetClients)context;
@@ -449,15 +449,15 @@ static void command_key(const char *data, SILC_SERVER_REC *server,
 {
   SilcClientConnection conn;
   SilcClientEntry *entrys, client_entry = NULL;
-  uint32 entry_count;
+  SilcUInt32 entry_count;
   SilcChannelEntry channel_entry = NULL;
   char *nickname = NULL, *tmp;
   int command = 0, port = 0, type = 0;
   char *hostname = NULL;
   KeyInternal internal = NULL;
-  uint32 argc = 0;
+  SilcUInt32 argc = 0;
   unsigned char **argv;
-  uint32 *argv_lens, *argv_types;
+  SilcUInt32 *argv_lens, *argv_types;
   char *bindhost = NULL;
  
   if (!server || !IS_SILC_SERVER(server) || !server->connected)
@@ -605,7 +605,7 @@ static void command_key(const char *data, SILC_SERVER_REC *server,
     } else if (type == 2) {
       /* Unset channel key(s) */
       SilcChannelPrivateKey *keys;
-      uint32 keys_count;
+      SilcUInt32 keys_count;
       int number;
 
       if (argc == 4)
@@ -640,7 +640,7 @@ static void command_key(const char *data, SILC_SERVER_REC *server,
 
     if (type == 1) {
       SilcPrivateMessageKeys keys;
-      uint32 keys_count;
+      SilcUInt32 keys_count;
       int k, i, len;
       char buf[1024];
 
@@ -714,7 +714,7 @@ static void command_key(const char *data, SILC_SERVER_REC *server,
 
     } else if (type == 2) {
       SilcChannelPrivateKey *keys;
-      uint32 keys_count;
+      SilcUInt32 keys_count;
       int k, i, len;
       char buf[1024];
 
index dca5302248c346e316963bb2dc5d81cbcdac8141..80dc21431eac327eb5355a883b5bc8b1729a11ad 100644 (file)
@@ -53,7 +53,7 @@ extern bool silc_debug_hexdump;
 #ifdef SILC_SIM
 /* SIM (SILC Module) table */
 SilcSimContext **sims = NULL;
-uint32 sims_count = 0;
+SilcUInt32 sims_count = 0;
 #endif
 
 static int my_silc_scheduler(void)
index 8736fab35003667c4aff743c9aaa592b7b9a381b..47467f2875ac50b7111819f58b5f6063cb290aec 100644 (file)
@@ -30,7 +30,7 @@ extern SilcClient silc_client;
 #ifdef SILC_SIM
 /* SIM (SILC Module) table */
 extern SilcSimContext **sims;
-extern uint32 sims_count;
+extern SilcUInt32 sims_count;
 #endif
 
 #define IS_SILC_ITEM(rec) (IS_SILC_CHANNEL(rec) || IS_SILC_QUERY(rec))
index 1569b4d14bad45f4b6d123de6c241a39ed161513..03ccd79f7426e2c27bc9a24706e65bac7b7556c1 100644 (file)
@@ -71,7 +71,7 @@ typedef struct {
 static void silc_send_msg_clients(SilcClient client,
                                  SilcClientConnection conn,
                                  SilcClientEntry *clients,
-                                 uint32 clients_count,
+                                 SilcUInt32 clients_count,
                                  void *context)
 {
   PRIVMSG_REC *rec = context;
@@ -128,7 +128,7 @@ static void silc_send_msg(SILC_SERVER_REC *server, char *nick, char *msg)
 {
   PRIVMSG_REC *rec;
   SilcClientEntry *clients;
-  uint32 clients_count;
+  SilcUInt32 clients_count;
   char *nickname = NULL;
 
   if (!silc_parse_userfqdn(nick, &nickname, NULL)) {
@@ -327,9 +327,9 @@ char *silc_server_get_channels(SILC_SERVER_REC *server)
 void silc_command_exec(SILC_SERVER_REC *server,
                       const char *command, const char *args)
 {
-  uint32 argc = 0;
+  SilcUInt32 argc = 0;
   unsigned char **argv;
-  uint32 *argv_lens, *argv_types;
+  SilcUInt32 *argv_lens, *argv_types;
   char *data, *tmpcmd;
   SilcClientCommand cmd;
   SilcClientCommandContext ctx;
@@ -416,10 +416,10 @@ static void silc_client_file_monitor(SilcClient client,
                                     SilcClientConnection conn,
                                     SilcClientMonitorStatus status,
                                     SilcClientFileError error,
-                                    uint64 offset,
-                                    uint64 filesize,
+                                    SilcUInt64 offset,
+                                    SilcUInt64 filesize,
                                     SilcClientEntry client_entry,
-                                    uint32 session_id,
+                                    SilcUInt32 session_id,
                                     const char *filepath,
                                     void *context)
 {
@@ -532,7 +532,7 @@ typedef struct {
 static void silc_client_command_file_get_clients(SilcClient client,
                                                 SilcClientConnection conn,
                                                 SilcClientEntry *clients,
-                                                uint32 clients_count,
+                                                SilcUInt32 clients_count,
                                                 void *context)
 {
   FileGetClients internal = (FileGetClients)context;
@@ -560,16 +560,16 @@ static void command_file(const char *data, SILC_SERVER_REC *server,
   SilcClientConnection conn;
   SilcClientEntry *entrys, client_entry;
   SilcClientFileError ret;
-  uint32 entry_count;
+  SilcUInt32 entry_count;
   char *nickname = NULL, *tmp;
   unsigned char **argv;
-  uint32 argc;
-  uint32 *argv_lens, *argv_types;
+  SilcUInt32 argc;
+  SilcUInt32 *argv_lens, *argv_types;
   int type = 0;
   FtpSession ftp;
   char *local_ip = NULL;
-  uint32 local_port = 0;
-  uint32 session_id;
+  SilcUInt32 local_port = 0;
+  SilcUInt32 session_id;
 
   if (!server || !IS_SILC_SERVER(server) || !server->connected)
     cmd_return_error(CMDERR_NOT_CONNECTED);
@@ -823,8 +823,8 @@ static void command_file(const char *data, SILC_SERVER_REC *server,
                         MSGLEVEL_CRAP, SILCTXT_FILE_SHOW_LINE,
                         ftp->client_entry->nickname, 
                         ftp->send ? "send" : "receive",
-                        (uint32)(ftp->offset + 1023) / 1024,
-                        (uint32)(ftp->filesize + 1023) / 1024,
+                        (SilcUInt32)(ftp->offset + 1023) / 1024,
+                        (SilcUInt32)(ftp->filesize + 1023) / 1024,
                         ftp->percent, ftp->kps,
                         ftp->filepath ? ftp->filepath : "[N/A]");
     }
index c90b84f35ac2c7814cc8cfb6b4de65f433455e82..965e1f9661b3ba0d7025a05848d4d157b0065d8b 100644 (file)
@@ -24,15 +24,15 @@ typedef struct {
 typedef struct {
   SilcClientEntry client_entry;
   SilcClientConnection conn;
-  uint32 session_id;
+  SilcUInt32 session_id;
   char *filepath;
   bool send;
 
   long starttime;              /* Start time of transfer */
   double kps;                  /* Kilos per second */
-  uint64 offset;               /* Current offset */
-  uint64 filesize;             /* Total file size */
-  uint32 percent;              /* Percent of current transmission */
+  SilcUInt64 offset;           /* Current offset */
+  SilcUInt64 filesize;         /* Total file size */
+  SilcUInt32 percent;          /* Percent of current transmission */
 } *FtpSession;
 
 #define STRUCT_SERVER_CONNECT_REC SILC_SERVER_CONNECT_REC
@@ -56,7 +56,7 @@ typedef struct {
   
   gpointer chanqueries;
   SilcClientConnection conn;
-  uint32 umode;
+  SilcUInt32 umode;
 } SILC_SERVER_REC;
 
 SILC_SERVER_REC *silc_server_connect(SILC_SERVER_CONNECT_REC *conn);
index c027c147df9a7449904f252cc68bb3e2313d1717..19dbb519c25741e10976790412e86d85af51061d 100644 (file)
@@ -23,7 +23,7 @@
 static bool 
 silc_verify_public_key_internal(SilcClient client, SilcClientConnection conn,
                                SilcSocketType conn_type, unsigned char *pk, 
-                               uint32 pk_len, SilcSKEPKType pk_type)
+                               SilcUInt32 pk_len, SilcSKEPKType pk_type)
 {
   int i;
   char file[256], filename[256], *fingerprint;
@@ -89,7 +89,7 @@ silc_verify_public_key_internal(SilcClient client, SilcClientConnection conn,
     /* The key already exists, verify it. */
     SilcPublicKey public_key;
     unsigned char *encpk;
-    uint32 encpk_len;
+    SilcUInt32 encpk_len;
 
     /* Load the key file */
     if (!silc_pkcs_load_public_key(filename, &public_key, 
@@ -279,7 +279,7 @@ void silc_notify(SilcClient client, SilcClientConnection conn,
   SilcClientEntry client_entry, client_entry2;
   SilcChannelEntry channel_entry;
   char *tmp = NULL;
-  uint32 tmp_int;
+  SilcUInt32 tmp_int;
 
   va_start(vp, type);
 
@@ -376,7 +376,7 @@ void silc_notify(SilcClient client, SilcClientConnection conn,
 
   case SILC_NOTIFY_TYPE_CMODE_CHANGE:
     client_entry = va_arg(vp, SilcClientEntry);
-    tmp_int = va_arg(vp, uint32);
+    tmp_int = va_arg(vp, SilcUInt32);
     (void)va_arg(vp, char *);
     (void)va_arg(vp, char *);
     channel_entry = va_arg(vp, SilcChannelEntry);
@@ -412,7 +412,7 @@ void silc_notify(SilcClient client, SilcClientConnection conn,
 
   case SILC_NOTIFY_TYPE_CUMODE_CHANGE:
     client_entry = va_arg(vp, SilcClientEntry);
-    tmp_int = va_arg(vp, uint32);
+    tmp_int = va_arg(vp, SilcUInt32);
     tmp = silc_client_chumode(tmp_int);
     client_entry2 = va_arg(vp, SilcClientEntry);
     channel_entry = va_arg(vp, SilcChannelEntry);
@@ -501,12 +501,12 @@ void silc_notify(SilcClient client, SilcClientConnection conn,
   case SILC_NOTIFY_TYPE_SERVER_SIGNOFF:
     {
       SilcClientEntry *clients;
-      uint32 clients_count;
+      SilcUInt32 clients_count;
       int i;
 
       (void)va_arg(vp, void *);
       clients = va_arg(vp, SilcClientEntry *);
-      clients_count = va_arg(vp, uint32);
+      clients_count = va_arg(vp, SilcUInt32);
 
       for (i = 0; i < clients_count; i++) {
        if (clients[i]->server)
@@ -571,7 +571,7 @@ void silc_command(SilcClient client, SilcClientConnection conn,
 void silc_client_show_users(SilcClient client,
                            SilcClientConnection conn,
                            SilcClientEntry *clients,
-                           uint32 clients_count,
+                           SilcUInt32 clients_count,
                            void *context)
 {
   SilcChannelEntry channel = (SilcChannelEntry)context;
@@ -647,7 +647,7 @@ void silc_command_reply(SilcClient client, SilcClientConnection conn,
       {
        char buf[1024], *nickname, *username, *realname;
        int len;
-       uint32 idle, mode;
+       SilcUInt32 idle, mode;
        SilcBuffer channels;
 
        if (status == SILC_STATUS_ERR_NO_SUCH_NICK ||
@@ -672,8 +672,8 @@ void silc_command_reply(SilcClient client, SilcClientConnection conn,
        username = va_arg(vp, char *);
        realname = va_arg(vp, char *);
        channels = va_arg(vp, SilcBuffer);
-       mode = va_arg(vp, uint32);
-       idle = va_arg(vp, uint32);
+       mode = va_arg(vp, SilcUInt32);
+       idle = va_arg(vp, SilcUInt32);
 
        memset(buf, 0, sizeof(buf));
 
@@ -706,7 +706,7 @@ void silc_command_reply(SilcClient client, SilcClientConnection conn,
            silc_dlist_start(list);
            while ((entry = silc_dlist_get(list)) != SILC_LIST_END) {
              char *m = silc_client_chumode_char(silc_channel_get_mode(entry));
-             uint32 name_len;
+             SilcUInt32 name_len;
              char *name = silc_channel_get_name(entry, &name_len);
 
              if (m)
@@ -813,10 +813,10 @@ void silc_command_reply(SilcClient client, SilcClientConnection conn,
 
     case SILC_COMMAND_JOIN:
       {
-       uint32 mode;
+       SilcUInt32 mode;
        char *topic;
        SilcBuffer client_id_list;
-       uint32 list_count;
+       SilcUInt32 list_count;
        SilcChannelEntry channel;
 
        if (!success)
@@ -824,14 +824,14 @@ void silc_command_reply(SilcClient client, SilcClientConnection conn,
 
        app->screen->bottom_line->channel = va_arg(vp, char *);
        channel = va_arg(vp, SilcChannelEntry);
-       mode = va_arg(vp, uint32);
-       (void)va_arg(vp, uint32);
+       mode = va_arg(vp, SilcUInt32);
+       (void)va_arg(vp, SilcUInt32);
        (void)va_arg(vp, unsigned char *);
        (void)va_arg(vp, unsigned char *);
        (void)va_arg(vp, unsigned char *);
        topic = va_arg(vp, char *);
        (void)va_arg(vp, unsigned char *);
-       list_count = va_arg(vp, uint32);
+       list_count = va_arg(vp, SilcUInt32);
        client_id_list = va_arg(vp, SilcBuffer);
 
        if (topic)
@@ -916,12 +916,12 @@ void silc_command_reply(SilcClient client, SilcClientConnection conn,
 
     case SILC_COMMAND_UMODE:
       {
-       uint32 mode;
+       SilcUInt32 mode;
 
        if (!success)
          return;
 
-       mode = va_arg(vp, uint32);
+       mode = va_arg(vp, SilcUInt32);
 
        if (!mode && app->screen->bottom_line->umode) {
          silc_free(app->screen->bottom_line->umode);
@@ -1075,9 +1075,9 @@ void silc_command_reply(SilcClient client, SilcClientConnection conn,
        void *entry;
        SilcPublicKey public_key;
        unsigned char *pk;
-       uint32 pk_len;
+       SilcUInt32 pk_len;
 
-       id_type = va_arg(vp, uint32);
+       id_type = va_arg(vp, SilcUInt32);
        entry = va_arg(vp, void *);
        public_key = va_arg(vp, SilcPublicKey);
 
@@ -1193,7 +1193,7 @@ void silc_ask_passphrase(SilcClient client, SilcClientConnection conn,
 
 void silc_verify_public_key(SilcClient client, SilcClientConnection conn,
                            SilcSocketType conn_type, unsigned char *pk, 
-                           uint32 pk_len, SilcSKEPKType pk_type,
+                           SilcUInt32 pk_len, SilcSKEPKType pk_type,
                            SilcVerifyPublicKey completion, void *context)
 {
   if (silc_verify_public_key_internal(client, conn, conn_type, pk,
@@ -1212,10 +1212,10 @@ void silc_verify_public_key(SilcClient client, SilcClientConnection conn,
    is found and FALSE if not. `conn' may be NULL. */
 
 int silc_get_auth_method(SilcClient client, SilcClientConnection conn,
-                        char *hostname, uint16 port,
+                        char *hostname, SilcUInt16 port,
                         SilcProtocolAuthMeth *auth_meth,
                         unsigned char **auth_data,
-                        uint32 *auth_data_len)
+                        SilcUInt32 *auth_data_len)
 {
   SilcClientInternal app = (SilcClientInternal)client->application;
 
@@ -1285,7 +1285,7 @@ void silc_failure(SilcClient client, SilcClientConnection conn,
   }
 
   if (protocol->protocol->type == SILC_PROTOCOL_CLIENT_CONNECTION_AUTH) {
-    uint32 err = (uint32)failure;
+    SilcUInt32 err = (SilcUInt32)failure;
 
     if (err == SILC_AUTH_FAILED)
       silc_say(client, conn, "Authentication failed");
index eb084caf185df502d4767c3a8f8cdf8669f0ea7e..07885e93cd7e62acb7180ec819efab9c57ce349a 100644 (file)
@@ -45,13 +45,13 @@ void silc_ask_passphrase(SilcClient client, SilcClientConnection conn,
                         SilcAskPassphrase completion, void *context);
 void silc_verify_public_key(SilcClient client, SilcClientConnection conn,
                            SilcSocketType conn_type, unsigned char *pk, 
-                           uint32 pk_len, SilcSKEPKType pk_type,
+                           SilcUInt32 pk_len, SilcSKEPKType pk_type,
                            SilcVerifyPublicKey completion, void *context);
 int silc_get_auth_method(SilcClient client, SilcClientConnection conn,
-                        char *hostname, uint16 port,
+                        char *hostname, SilcUInt16 port,
                         SilcProtocolAuthMeth *auth_meth,
                         unsigned char **auth_data,
-                        uint32 *auth_data_len);
+                        SilcUInt32 *auth_data_len);
 void silc_failure(SilcClient client, SilcClientConnection conn, 
                  SilcProtocol protocol, void *failure);
 int silc_key_agreement(SilcClient client, SilcClientConnection conn,
index 7644c030c2b5e5858a3508a9ee1599f239ec190b..e5651a705d0e9a6a2fa9181cd6d087913cadb264 100644 (file)
@@ -25,8 +25,8 @@
 typedef struct SilcClientConfigSectionAlgStruct {
   char *alg_name;
   char *sim_name;
-  uint32 block_len;
-  uint32 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;
-  uint16 port;
+  SilcUInt16 port;
   struct SilcClientConfigSectionConnectionStruct *next;
   struct SilcClientConfigSectionConnectionStruct *prev;
 #define SILC_CLIENT_CONFIG_AUTH_METH_PASSWD "passwd"
@@ -114,7 +114,7 @@ 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(uint32 checkmask);
+int silc_client_config_check_sections(SilcUInt32 checkmask);
 void silc_client_config_setlogfiles(SilcClientConfig config);
 bool silc_client_config_register_ciphers(SilcClientConfig config);
 bool silc_client_config_register_pkcs(SilcClientConfig config);
index 1bcc9c8bc3fde0d889130218400c74f69c6c3ed3..71b628bc4aacf7d35d8b689140700ef790cd3ce6 100644 (file)
@@ -333,7 +333,7 @@ int silc_client_create_key_pair(char *pkcs_name, int bits,
   SilcPrivateKey prv_key;
   SilcRng rng;
   unsigned char *key;
-  uint32 key_len;
+  SilcUInt32 key_len;
   char line[256];
   char *pkfile = NULL, *prvfile = NULL;
 
@@ -720,7 +720,7 @@ int silc_client_show_key(char *keyfile)
   SilcPublicKeyIdentifier ident;
   char *fingerprint;
   unsigned char *pk;
-  uint32 pk_len;
+  SilcUInt32 pk_len;
   SilcPKCS pkcs;
   int key_len = 0;
 
index 116f12fa679bad829ead432cc44864e468d5f4eb..76c5c5bf8824faf0d22ad2bb3254aeea1f647cc3 100644 (file)
@@ -97,7 +97,7 @@ SILC_CLIENT_LCMD_FUNC(msg)
   SilcClientConnection conn = cmd->conn;
   SilcClient client = cmd->client;
   SilcClientEntry client_entry = NULL;
-  uint32 num = 0;
+  SilcUInt32 num = 0;
   char *nickname = NULL, *server = NULL;
 
   if (!cmd->conn) {
@@ -349,7 +349,7 @@ SILC_CLIENT_LCMD_FUNC(key)
   SilcClient client = cmd->client;
   SilcClientEntry client_entry = NULL;
   SilcChannelEntry channel_entry = NULL;
-  uint32 num = 0;
+  SilcUInt32 num = 0;
   char *nickname = NULL, *server = NULL;
   int command = 0, port = 0, type = 0;
   char *hostname = NULL;
@@ -498,7 +498,7 @@ SILC_CLIENT_LCMD_FUNC(key)
     } else if (type == 2) {
       /* Unset channel key(s) */
       SilcChannelPrivateKey *keys;
-      uint32 keys_count;
+      SilcUInt32 keys_count;
       int number;
 
       if (cmd->argc == 4)
@@ -532,7 +532,7 @@ SILC_CLIENT_LCMD_FUNC(key)
 
     if (type == 1) {
       SilcPrivateMessageKeys keys;
-      uint32 keys_count;
+      SilcUInt32 keys_count;
       int k, i, len;
       char buf[1024];
 
@@ -607,7 +607,7 @@ SILC_CLIENT_LCMD_FUNC(key)
       silc_client_free_private_message_keys(keys, keys_count);
     } else if (type == 2) {
       SilcChannelPrivateKey *keys;
-      uint32 keys_count;
+      SilcUInt32 keys_count;
       int k, i, len;
       char buf[1024];
 
index d98d1b6cc0b66fd2c9c7b7aeb995cf696744de04..1721475b3ed7bd9784dc7f2228dd1689b8720613 100644 (file)
@@ -38,14 +38,14 @@ typedef struct {
   /* Output windows */
   WINDOW **output_win;
   WINDOW **output_stat_line;
-  uint32 output_win_count;
+  SilcUInt32 output_win_count;
 
   /* Input window at the bottom of the screen */
   WINDOW *input_win;
   unsigned char *input_buffer;
-  uint32 input_pos;
-  uint32 input_end;
-  uint32 cursor_pos;
+  SilcUInt32 input_pos;
+  SilcUInt32 input_end;
+  SilcUInt32 cursor_pos;
   int virtual_window;
 
   /* Bottom line on screen */
index 47f39dd983e9b8f40a07c206bb30dd668c6204f0..e449af1d89883c03da6294b2bcbcd146017e7f21 100644 (file)
@@ -549,7 +549,7 @@ static void silc_client_clear_input(SilcClientInternal app)
 static void silc_client_process_message(SilcClientInternal app)
 {
   unsigned char *data;
-  uint32 len;
+  SilcUInt32 len;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -558,9 +558,9 @@ static void silc_client_process_message(SilcClientInternal app)
 
   if (data[0] == '/' && data[1] != ' ') {
     /* Command */
-    uint32 argc = 0;
+    SilcUInt32 argc = 0;
     unsigned char **argv, *tmpcmd;
-    uint32 *argv_lens, *argv_types;
+    SilcUInt32 *argv_lens, *argv_types;
     SilcClientCommand *cmd;
     SilcClientCommandContext ctx;
 
@@ -658,9 +658,9 @@ SILC_TASK_CALLBACK(silc_client_run_commands)
 
   cs = app->config->commands;
   while(cs) {
-    uint32 argc = 0;
+    SilcUInt32 argc = 0;
     unsigned char **argv, *tmpcmd;
-    uint32 *argv_lens, *argv_types;
+    SilcUInt32 *argv_lens, *argv_types;
     SilcClientCommand *cmd;
     SilcClientCommandContext ctx;
 
index a5d75d90a0733efff92d655e2f06e407483c021e..b03ce9da5dc665a6f8e2cd5e917b04995cb81ced 100644 (file)
@@ -63,7 +63,7 @@ typedef struct {
 #ifdef SILC_SIM
   /* SIM (SILC Module) table */
   SilcSimContext **sim;
-  uint32 sim_count;
+  SilcUInt32 sim_count;
 #endif
 
   /* The allocated client */
index 807faee2cf8743ed787d06a14f15ee52bc19eb36..02ec6d1d6aefaf07681f48562db78c15108bf5f7 100644 (file)
@@ -34,9 +34,9 @@ static void
 silc_server_command_send_status_data(SilcServerCommandContext cmd,
                                     SilcCommand command,
                                     SilcCommandStatus status,
-                                    uint32 arg_type,
+                                    SilcUInt32 arg_type,
                                     const unsigned char *arg,
-                                    uint32 arg_len);
+                                    SilcUInt32 arg_len);
 static bool
 silc_server_command_pending_error_check(SilcServerCommandContext cmd,
                                        SilcServerCommandReplyContext cmdr,
@@ -89,7 +89,7 @@ SilcServerCommand silc_command_list[] =
    of arguments. */
 #define SILC_SERVER_COMMAND_CHECK(command, context, min, max)                \
 do {                                                                         \
-  uint32 _argc;                                                                      \
+  SilcUInt32 _argc;                                                                  \
                                                                              \
   SILC_LOG_DEBUG(("Start"));                                                 \
                                                                              \
@@ -308,7 +308,7 @@ silc_server_command_dup(SilcServerCommandContext ctx)
 
 bool silc_server_command_pending(SilcServer server,
                                 SilcCommand reply_cmd,
-                                uint16 ident,
+                                SilcUInt16 ident,
                                 SilcCommandCb callback,
                                 void *context)
 {
@@ -338,7 +338,7 @@ bool silc_server_command_pending(SilcServer server,
 
 void silc_server_command_pending_del(SilcServer server,
                                     SilcCommand reply_cmd,
-                                    uint16 ident)
+                                    SilcUInt16 ident)
 {
   SilcServerCommandPending *r;
 
@@ -358,8 +358,8 @@ SilcServerCommandPendingCallbacks
 silc_server_command_pending_check(SilcServer server,
                                  SilcServerCommandReplyContext ctx,
                                  SilcCommand command, 
-                                 uint16 ident,
-                                 uint32 *callbacks_count)
+                                 SilcUInt16 ident,
+                                 SilcUInt32 *callbacks_count)
 {
   SilcServerCommandPending *r;
   SilcServerCommandPendingCallbacks callbacks = NULL;
@@ -409,9 +409,9 @@ static void
 silc_server_command_send_status_data(SilcServerCommandContext cmd,
                                     SilcCommand command,
                                     SilcCommandStatus status,
-                                    uint32 arg_type,
+                                    SilcUInt32 arg_type,
                                     const unsigned char *arg,
-                                    uint32 arg_len)
+                                    SilcUInt32 arg_len)
 {
   SilcBuffer buffer;
 
@@ -472,15 +472,15 @@ silc_server_command_pending_error_check(SilcServerCommandContext cmd,
 static int
 silc_server_command_whois_parse(SilcServerCommandContext cmd,
                                SilcClientID ***client_id,
-                               uint32 *client_id_count,
+                               SilcUInt32 *client_id_count,
                                char **nickname,
                                char **server_name,
                                int *count,
                                SilcCommand command)
 {
   unsigned char *tmp;
-  uint32 len;
-  uint32 argc = silc_argument_get_arg_num(cmd->args);
+  SilcUInt32 len;
+  SilcUInt32 argc = silc_argument_get_arg_num(cmd->args);
   int i, k;
 
   /* If client ID is in the command it must be used instead of nickname */
@@ -547,22 +547,22 @@ silc_server_command_whois_parse(SilcServerCommandContext cmd,
 /* Resolve context used by both WHOIS and IDENTIFY commands */
 typedef struct {
   SilcServerEntry router;
-  uint16 ident;
+  SilcUInt16 ident;
   unsigned char **res_argv;
-  uint32 *res_argv_lens;
-  uint32 *res_argv_types;
-  uint32 res_argc;
+  SilcUInt32 *res_argv_lens;
+  SilcUInt32 *res_argv_types;
+  SilcUInt32 res_argc;
 } *SilcServerResolveContext;
 
 static bool
 silc_server_command_whois_check(SilcServerCommandContext cmd,
                                SilcClientEntry *clients,
-                               uint32 clients_count)
+                               SilcUInt32 clients_count)
 {
   SilcServer server = cmd->server;
   SilcClientEntry entry;
   SilcServerResolveContext resolve = NULL, r = NULL;
-  uint32 resolve_count = 0;
+  SilcUInt32 resolve_count = 0;
   int i, k;
   bool no_res = TRUE;
 
@@ -696,7 +696,7 @@ silc_server_command_whois_check(SilcServerCommandContext cmd,
 static void
 silc_server_command_whois_send_reply(SilcServerCommandContext cmd,
                                     SilcClientEntry *clients,
-                                    uint32 clients_count,
+                                    SilcUInt32 clients_count,
                                     int count,
                                     const char *nickname,
                                     SilcClientID **client_ids)
@@ -707,7 +707,7 @@ silc_server_command_whois_send_reply(SilcServerCommandContext cmd,
   SilcBuffer packet, idp, channels;
   SilcClientEntry entry;
   SilcCommandStatus status;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
   char nh[256], uh[256];
   unsigned char idle[4], mode[4];
   unsigned char *fingerprint;
@@ -830,7 +830,7 @@ silc_server_command_whois_send_router(SilcServerCommandContext cmd)
 {
   SilcServer server = cmd->server;
   SilcBuffer tmpbuf;
-  uint16 old_ident;
+  SilcUInt16 old_ident;
 
   old_ident = silc_command_get_ident(cmd->payload);
   silc_command_set_ident(cmd->payload, ++server->cmd_ident);
@@ -860,7 +860,7 @@ silc_server_command_whois_process(SilcServerCommandContext cmd)
   int count = 0;
   SilcClientEntry *clients = NULL, entry;
   SilcClientID **client_id = NULL;
-  uint32 client_id_count = 0, clients_count = 0;
+  SilcUInt32 client_id_count = 0, clients_count = 0;
   int i, ret = 0;
   bool check_global = FALSE;
 
@@ -1010,7 +1010,7 @@ silc_server_command_whowas_parse(SilcServerCommandContext cmd,
                                 int *count)
 {
   unsigned char *tmp;
-  uint32 len;
+  SilcUInt32 len;
 
   tmp = silc_argument_get_arg_type(cmd->args, 1, &len);
   if (!tmp) {
@@ -1035,7 +1035,7 @@ silc_server_command_whowas_parse(SilcServerCommandContext cmd,
 static char
 silc_server_command_whowas_check(SilcServerCommandContext cmd,
                                 SilcClientEntry *clients,
-                                uint32 clients_count)
+                                SilcUInt32 clients_count)
 {
   SilcServer server = cmd->server;
   int i;
@@ -1046,7 +1046,7 @@ silc_server_command_whowas_check(SilcServerCommandContext cmd,
 
     if (!entry->nickname || !entry->username) {
       SilcBuffer tmpbuf;
-      uint16 old_ident;
+      SilcUInt16 old_ident;
 
       if (!entry->router)
        continue;
@@ -1079,7 +1079,7 @@ silc_server_command_whowas_check(SilcServerCommandContext cmd,
 static void
 silc_server_command_whowas_send_reply(SilcServerCommandContext cmd,
                                      SilcClientEntry *clients,
-                                     uint32 clients_count)
+                                     SilcUInt32 clients_count)
 {
   SilcServer server = cmd->server;
   char *tmp;
@@ -1087,7 +1087,7 @@ silc_server_command_whowas_send_reply(SilcServerCommandContext cmd,
   SilcBuffer packet, idp;
   SilcClientEntry entry = NULL;
   SilcCommandStatus status;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
   char nh[256], uh[256];
   int valid_count;
 
@@ -1182,7 +1182,7 @@ silc_server_command_whowas_process(SilcServerCommandContext cmd)
   char *nick = NULL, *server_name = NULL;
   int count = 0;
   SilcClientEntry *clients = NULL;
-  uint32 clients_count = 0;
+  SilcUInt32 clients_count = 0;
   int ret = 0;
   bool check_global = FALSE;
 
@@ -1194,7 +1194,7 @@ silc_server_command_whowas_process(SilcServerCommandContext cmd)
       server->server_type == SILC_SERVER && !cmd->pending && 
       !server->standalone) {
     SilcBuffer tmpbuf;
-    uint16 old_ident;
+    SilcUInt16 old_ident;
 
     old_ident = silc_command_get_ident(cmd->payload);
     silc_command_set_ident(cmd->payload, ++server->cmd_ident);
@@ -1296,7 +1296,7 @@ silc_server_command_identify_send_router(SilcServerCommandContext cmd)
 {
   SilcServer server = cmd->server;
   SilcBuffer tmpbuf;
-  uint16 old_ident;
+  SilcUInt16 old_ident;
 
   old_ident = silc_command_get_ident(cmd->payload);
   silc_command_set_ident(cmd->payload, ++server->cmd_ident);
@@ -1321,17 +1321,17 @@ silc_server_command_identify_send_router(SilcServerCommandContext cmd)
 static int
 silc_server_command_identify_parse(SilcServerCommandContext cmd,
                                   SilcClientEntry **clients,
-                                  uint32 *clients_count,
+                                  SilcUInt32 *clients_count,
                                   SilcServerEntry **servers,
-                                  uint32 *servers_count,
+                                  SilcUInt32 *servers_count,
                                   SilcChannelEntry **channels,
-                                  uint32 *channels_count,
-                                  uint32 *count)
+                                  SilcUInt32 *channels_count,
+                                  SilcUInt32 *count)
 {
   SilcServer server = cmd->server;
   unsigned char *tmp;
-  uint32 len;
-  uint32 argc = silc_argument_get_arg_num(cmd->args);
+  SilcUInt32 len;
+  SilcUInt32 argc = silc_argument_get_arg_num(cmd->args);
   SilcIDPayload idp;
   bool check_global = FALSE;
   void *entry;
@@ -1593,12 +1593,12 @@ silc_server_command_identify_parse(SilcServerCommandContext cmd,
 static bool
 silc_server_command_identify_check_client(SilcServerCommandContext cmd,
                                          SilcClientEntry *clients,
-                                         uint32 clients_count)
+                                         SilcUInt32 clients_count)
 {
   SilcServer server = cmd->server;
   SilcClientEntry entry;
   SilcServerResolveContext resolve = NULL, r = NULL;
-  uint32 resolve_count = 0;
+  SilcUInt32 resolve_count = 0;
   int i, k;
   bool no_res = TRUE;
 
@@ -1730,18 +1730,18 @@ silc_server_command_identify_check_client(SilcServerCommandContext cmd,
 static void
 silc_server_command_identify_send_reply(SilcServerCommandContext cmd,
                                        SilcClientEntry *clients,
-                                       uint32 clients_count,
+                                       SilcUInt32 clients_count,
                                        SilcServerEntry *servers,
-                                       uint32 servers_count,
+                                       SilcUInt32 servers_count,
                                        SilcChannelEntry *channels,
-                                       uint32 channels_count,
+                                       SilcUInt32 channels_count,
                                        int count)
 {
   SilcServer server = cmd->server;
   int i, k, len, valid_count;
   SilcBuffer packet, idp;
   SilcCommandStatus status;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
   char nh[256], uh[256];
   SilcSocketConnection hsock;
 
@@ -1769,7 +1769,7 @@ silc_server_command_identify_send_reply(SilcServerCommandContext cmd,
                                             SILC_STATUS_ERR_NO_SUCH_NICK,
                                             3, tmp, strlen(tmp));
       } else {
-       tmp = silc_argument_get_arg_type(cmd->args, 5, (uint32 *)&len);
+       tmp = silc_argument_get_arg_type(cmd->args, 5, (SilcUInt32 *)&len);
        silc_server_command_send_status_data(cmd, SILC_COMMAND_IDENTIFY,
                                             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID,
                                             2, tmp, len);
@@ -1924,12 +1924,12 @@ silc_server_command_identify_send_reply(SilcServerCommandContext cmd,
 static int
 silc_server_command_identify_process(SilcServerCommandContext cmd)
 {
-  uint32 count = 0;
+  SilcUInt32 count = 0;
   int ret = 0;
   SilcClientEntry *clients = NULL;
   SilcServerEntry *servers = NULL;
   SilcChannelEntry *channels = NULL;
-  uint32 clients_count = 0, servers_count = 0, channels_count = 0;
+  SilcUInt32 clients_count = 0, servers_count = 0, channels_count = 0;
 
   /* Parse the IDENTIFY request */
   ret = silc_server_command_identify_parse(cmd,
@@ -1985,9 +1985,9 @@ SILC_SERVER_CMD_FUNC(nick)
   SilcServer server = cmd->server;
   SilcBuffer packet, nidp, oidp = NULL;
   SilcClientID *new_id;
-  uint32 nick_len;
+  SilcUInt32 nick_len;
   char *nick;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
   int nickfail = 0;
 
   if (cmd->sock->type != SILC_SOCKET_TYPE_CLIENT)
@@ -2077,18 +2077,18 @@ SILC_SERVER_CMD_FUNC(nick)
 static void
 silc_server_command_list_send_reply(SilcServerCommandContext cmd,
                                    SilcChannelEntry *lch, 
-                                   uint32 lch_count,
+                                   SilcUInt32 lch_count,
                                    SilcChannelEntry *gch,
-                                   uint32 gch_count)
+                                   SilcUInt32 gch_count)
 {
   int i, k;
   SilcBuffer packet, idp;
   SilcChannelEntry entry;
   SilcCommandStatus status;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
   char *topic;
   unsigned char usercount[4];
-  uint32 users;
+  SilcUInt32 users;
   int valid_lcount = 0, valid_rcount = 0;
 
   for (i = 0; i < lch_count; i++) {
@@ -2196,9 +2196,9 @@ SILC_SERVER_CMD_FUNC(list)
   SilcServer server = cmd->server;
   SilcChannelID *channel_id = NULL;
   unsigned char *tmp;
-  uint32 tmp_len;
+  SilcUInt32 tmp_len;
   SilcChannelEntry *lchannels = NULL, *gchannels = NULL;
-  uint32 lch_count = 0, gch_count = 0;
+  SilcUInt32 lch_count = 0, gch_count = 0;
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_LIST, cmd, 0, 1);
 
@@ -2207,7 +2207,7 @@ SILC_SERVER_CMD_FUNC(list)
   if (!cmd->pending && server->server_type == SILC_SERVER && 
       !server->standalone) {
     SilcBuffer tmpbuf;
-    uint16 old_ident;
+    SilcUInt16 old_ident;
     
     old_ident = silc_command_get_ident(cmd->payload);
     silc_command_set_ident(cmd->payload, ++server->cmd_ident);
@@ -2270,8 +2270,8 @@ SILC_SERVER_CMD_FUNC(topic)
   SilcChannelClientEntry chl;
   SilcBuffer packet, idp;
   unsigned char *tmp;
-  uint32 argc, tmp_len;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt32 argc, tmp_len;
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_TOPIC, cmd, 1, 2);
 
@@ -2392,8 +2392,8 @@ SILC_SERVER_CMD_FUNC(invite)
   SilcIDListData idata;
   SilcBuffer idp, idp2, packet;
   unsigned char *tmp, *add, *del;
-  uint32 len;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt32 len;
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_INVITE, cmd, 1, 4);
 
@@ -2637,7 +2637,7 @@ SILC_SERVER_CMD_FUNC(quit)
   SilcSocketConnection sock = cmd->sock;
   QuitInternal q;
   unsigned char *tmp = NULL;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_QUIT, cmd, 0, 1);
 
@@ -2674,7 +2674,7 @@ SILC_SERVER_CMD_FUNC(kill)
   SilcClientEntry remote_client;
   SilcClientID *client_id;
   unsigned char *tmp, *comment;
-  uint32 tmp_len, tmp_len2;
+  SilcUInt32 tmp_len, tmp_len2;
   bool local;
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_KILL, cmd, 1, 2);
@@ -2798,9 +2798,9 @@ SILC_SERVER_CMD_FUNC(info)
   SilcServer server = cmd->server;
   SilcBuffer packet, idp;
   unsigned char *tmp;
-  uint32 tmp_len;
+  SilcUInt32 tmp_len;
   char *dest_server, *server_info = NULL, *server_name;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
   SilcServerEntry entry = NULL;
   SilcServerID *server_id = NULL;
 
@@ -2871,7 +2871,7 @@ SILC_SERVER_CMD_FUNC(info)
        server->server_type != SILC_SERVER && entry && !entry->server_info) {
       /* Send to the server */
       SilcBuffer tmpbuf;
-      uint16 old_ident;
+      SilcUInt16 old_ident;
 
       old_ident = silc_command_get_ident(cmd->payload);
       silc_command_set_ident(cmd->payload, ++server->cmd_ident);
@@ -2895,7 +2895,7 @@ SILC_SERVER_CMD_FUNC(info)
     if (!entry && !cmd->pending && !server->standalone) {
       /* Send to the primary router */
       SilcBuffer tmpbuf;
-      uint16 old_ident;
+      SilcUInt16 old_ident;
 
       old_ident = silc_command_get_ident(cmd->payload);
       silc_command_set_ident(cmd->payload, ++server->cmd_ident);
@@ -2956,7 +2956,7 @@ SILC_SERVER_CMD_FUNC(ping)
   SilcServerCommandContext cmd = (SilcServerCommandContext)context;
   SilcServer server = cmd->server;
   SilcServerID *id;
-  uint32 len;
+  SilcUInt32 len;
   unsigned char *tmp;
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_INFO, cmd, 1, 2);
@@ -2998,18 +2998,18 @@ static void silc_server_command_join_channel(SilcServer server,
                                             SilcClientID *client_id,
                                             bool created,
                                             bool create_key,
-                                            uint32 umode,
+                                            SilcUInt32 umode,
                                             const unsigned char *auth,
-                                            uint32 auth_len)
+                                            SilcUInt32 auth_len)
 {
   SilcSocketConnection sock = cmd->sock;
   unsigned char *tmp;
-  uint32 tmp_len, user_count;
+  SilcUInt32 tmp_len, user_count;
   unsigned char *passphrase = NULL, mode[4], tmp2[4], tmp3[4];
   SilcClientEntry client;
   SilcChannelClientEntry chl;
   SilcBuffer reply, chidp, clidp, keyp = NULL, user_list, mode_list;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
   char check[512], check2[512];
   bool founder = FALSE;
   bool resolve;
@@ -3062,7 +3062,7 @@ static void silc_server_command_join_channel(SilcServer server,
       void *auth_data = (channel->founder_method == SILC_AUTH_PASSWORD ?
                         (void *)channel->founder_passwd : 
                         (void *)channel->founder_key);
-      uint32 auth_data_len = (channel->founder_method == SILC_AUTH_PASSWORD ?
+      SilcUInt32 auth_data_len = (channel->founder_method == SILC_AUTH_PASSWORD ?
                              channel->founder_passwd_len : 0);
 
       /* Check whether the client is to become founder */
@@ -3303,10 +3303,10 @@ SILC_SERVER_CMD_FUNC(join)
   SilcServerCommandContext cmd = (SilcServerCommandContext)context;
   SilcServer server = cmd->server;
   unsigned char *auth;
-  uint32 tmp_len, auth_len;
+  SilcUInt32 tmp_len, auth_len;
   char *tmp, *channel_name = NULL, *cipher, *hmac;
   SilcChannelEntry channel;
-  uint32 umode = 0;
+  SilcUInt32 umode = 0;
   bool created = FALSE, create_key = TRUE;
   SilcClientID *client_id;
 
@@ -3384,7 +3384,7 @@ SILC_SERVER_CMD_FUNC(join)
           or joins the client to it). */
        if (server->server_type != SILC_ROUTER) {
          SilcBuffer tmpbuf;
-         uint16 old_ident;
+         SilcUInt16 old_ident;
 
          /* If this is pending command callback then we've resolved
             it and it didn't work, return since we've notified the
@@ -3507,8 +3507,8 @@ SILC_SERVER_CMD_FUNC(motd)
   SilcServer server = cmd->server;
   SilcBuffer packet, idp;
   char *motd, *dest_server;
-  uint32 motd_len;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt32 motd_len;
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
   
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_MOTD, cmd, 1, 1);
 
@@ -3563,7 +3563,7 @@ SILC_SERVER_CMD_FUNC(motd)
        entry && !entry->motd) {
       /* Send to the server */
       SilcBuffer tmpbuf;
-      uint16 old_ident;
+      SilcUInt16 old_ident;
 
       old_ident = silc_command_get_ident(cmd->payload);
       silc_command_set_ident(cmd->payload, ++server->cmd_ident);
@@ -3587,7 +3587,7 @@ SILC_SERVER_CMD_FUNC(motd)
     if (!entry && !cmd->pending && !server->standalone) {
       /* Send to the primary router */
       SilcBuffer tmpbuf;
-      uint16 old_ident;
+      SilcUInt16 old_ident;
 
       old_ident = silc_command_get_ident(cmd->payload);
       silc_command_set_ident(cmd->payload, ++server->cmd_ident);
@@ -3642,8 +3642,8 @@ SILC_SERVER_CMD_FUNC(umode)
   SilcClientEntry client = (SilcClientEntry)cmd->sock->user_data;
   SilcBuffer packet;
   unsigned char *tmp_mask;
-  uint32 mask;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt32 mask;
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
 
   if (cmd->sock->type != SILC_SOCKET_TYPE_CLIENT)
     goto out;
@@ -3729,7 +3729,7 @@ SILC_SERVER_CMD_FUNC(umode)
 
 int silc_server_check_cmode_rights(SilcChannelEntry channel,
                                   SilcChannelClientEntry client,
-                                  uint32 mode)
+                                  SilcUInt32 mode)
 {
   int is_op = client->mode & SILC_CHANNEL_UMODE_CHANOP;
   int is_fo = client->mode & SILC_CHANNEL_UMODE_CHANFO;
@@ -3807,8 +3807,8 @@ SILC_SERVER_CMD_FUNC(cmode)
   SilcBuffer packet, cidp;
   unsigned char *tmp, *tmp_id, *tmp_mask;
   char *cipher = NULL, *hmac = NULL, *passphrase = NULL;
-  uint32 mode_mask, tmp_len, tmp_len2;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt32 mode_mask, tmp_len, tmp_len2;
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_CMODE, cmd, 2, 7);
 
@@ -3897,7 +3897,7 @@ SILC_SERVER_CMD_FUNC(cmode)
 
   if (mode_mask & SILC_CHANNEL_MODE_ULIMIT) {
     /* User limit is set on channel */
-    uint32 user_limit;
+    SilcUInt32 user_limit;
       
     /* Get user limit */
     tmp = silc_argument_get_arg_type(cmd->args, 3, NULL);
@@ -4189,9 +4189,9 @@ SILC_SERVER_CMD_FUNC(cumode)
   SilcChannelClientEntry chl;
   SilcBuffer packet, idp;
   unsigned char *tmp_id, *tmp_ch_id, *tmp_mask;
-  uint32 target_mask, sender_mask = 0, tmp_len, tmp_ch_len;
+  SilcUInt32 target_mask, sender_mask = 0, tmp_len, tmp_ch_len;
   int notify = FALSE;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_CUMODE, cmd, 3, 4);
 
@@ -4301,7 +4301,7 @@ SILC_SERVER_CMD_FUNC(cumode)
     if (!(chl->mode & SILC_CHANNEL_UMODE_CHANFO)) {
       /* The client tries to claim the founder rights. */
       unsigned char *tmp_auth;
-      uint32 tmp_auth_len, auth_len;
+      SilcUInt32 tmp_auth_len, auth_len;
       void *auth;
       
       if (target_client != client) {
@@ -4436,7 +4436,7 @@ SILC_SERVER_CMD_FUNC(kick)
   SilcChannelEntry channel;
   SilcChannelClientEntry chl;
   SilcBuffer idp;
-  uint32 tmp_len, target_idp_len;
+  SilcUInt32 tmp_len, target_idp_len;
   unsigned char *tmp, *comment, *target_idp;
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_LEAVE, cmd, 1, 3);
@@ -4579,7 +4579,7 @@ SILC_SERVER_CMD_FUNC(oper)
   SilcServer server = cmd->server;
   SilcClientEntry client = (SilcClientEntry)cmd->sock->user_data;
   unsigned char *username, *auth;
-  uint32 tmp_len;
+  SilcUInt32 tmp_len;
   SilcServerConfigAdmin *admin;
   SilcIDListData idata = (SilcIDListData)client;
   bool result = FALSE;
@@ -4666,7 +4666,7 @@ SILC_SERVER_CMD_FUNC(silcoper)
   SilcServer server = cmd->server;
   SilcClientEntry client = (SilcClientEntry)cmd->sock->user_data;
   unsigned char *username, *auth;
-  uint32 tmp_len;
+  SilcUInt32 tmp_len;
   SilcServerConfigAdmin *admin;
   SilcIDListData idata = (SilcIDListData)client;
   bool result = FALSE;
@@ -4759,8 +4759,8 @@ SILC_SERVER_CMD_FUNC(connect)
   SilcServer server = cmd->server;
   SilcClientEntry client = (SilcClientEntry)cmd->sock->user_data;
   unsigned char *tmp, *host;
-  uint32 tmp_len;
-  uint32 port = SILC_PORT;
+  SilcUInt32 tmp_len;
+  SilcUInt32 port = SILC_PORT;
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_CONNECT, cmd, 1, 2);
 
@@ -4818,8 +4818,8 @@ SILC_SERVER_CMD_FUNC(ban)
   SilcChannelClientEntry chl;
   SilcChannelID *channel_id = NULL;
   unsigned char *id, *add, *del;
-  uint32 id_len, tmp_len;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt32 id_len, tmp_len;
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
 
   if (cmd->sock->type != SILC_SOCKET_TYPE_CLIENT)
     goto out;
@@ -4945,9 +4945,9 @@ SILC_SERVER_CMD_FUNC(close)
   SilcServerEntry server_entry;
   SilcSocketConnection sock;
   unsigned char *tmp;
-  uint32 tmp_len;
+  SilcUInt32 tmp_len;
   unsigned char *name;
-  uint32 port = SILC_PORT;
+  SilcUInt32 port = SILC_PORT;
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_CLOSE, cmd, 1, 2);
 
@@ -5050,7 +5050,7 @@ SILC_SERVER_CMD_FUNC(leave)
   SilcClientEntry id_entry = (SilcClientEntry)cmd->sock->user_data;
   SilcChannelID *id = NULL;
   SilcChannelEntry channel;
-  uint32 len;
+  SilcUInt32 len;
   unsigned char *tmp;
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_LEAVE, cmd, 1, 2);
@@ -5131,12 +5131,12 @@ SILC_SERVER_CMD_FUNC(users)
   SilcChannelID *id = NULL;
   SilcBuffer packet, idp;
   unsigned char *channel_id;
-  uint32 channel_id_len;
+  SilcUInt32 channel_id_len;
   SilcBuffer client_id_list;
   SilcBuffer client_mode_list;
   unsigned char lc[4];
-  uint32 list_count = 0;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt32 list_count = 0;
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
   char *channel_name;
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_USERS, cmd, 1, 2);
@@ -5271,9 +5271,9 @@ SILC_SERVER_CMD_FUNC(getkey)
   SilcClientID *client_id = NULL;
   SilcServerID *server_id = NULL;
   SilcIDPayload idp = NULL;
-  uint16 ident = silc_command_get_ident(cmd->payload);
+  SilcUInt16 ident = silc_command_get_ident(cmd->payload);
   unsigned char *tmp, *pkdata;
-  uint32 tmp_len, pklen;
+  SilcUInt32 tmp_len, pklen;
   SilcBuffer pk = NULL;
   SilcIdType id_type;
   SilcPublicKey public_key;
@@ -5309,7 +5309,7 @@ SILC_SERVER_CMD_FUNC(getkey)
        (client && !client->connection && !cmd->pending) ||
        (client && !client->data.public_key && !cmd->pending)) {
       SilcBuffer tmpbuf;
-      uint16 old_ident;
+      SilcUInt16 old_ident;
       SilcSocketConnection dest_sock;
       
       dest_sock = silc_server_get_client_route(server, NULL, 0, 
@@ -5380,7 +5380,7 @@ SILC_SERVER_CMD_FUNC(getkey)
         (server_entry && !server_entry->data.public_key && !cmd->pending &&
          !server->standalone))) {
       SilcBuffer tmpbuf;
-      uint16 old_ident;
+      SilcUInt16 old_ident;
       
       old_ident = silc_command_get_ident(cmd->payload);
       silc_command_set_ident(cmd->payload, ++server->cmd_ident);
index 43195e8a2febdffa16dcfd919ae5971e895c8e54..cd317f79e285c968bc042d6d09db49b4e19e0d27 100644 (file)
@@ -65,7 +65,7 @@ typedef struct SilcServerCommandPendingStruct {
   SilcCommand reply_cmd;
   SilcCommandCb callback;
   void *context;
-  uint16 ident;
+  SilcUInt16 ident;
   struct SilcServerCommandPendingStruct *next;
 } SilcServerCommandPending;
 
@@ -107,18 +107,18 @@ SilcServerCommandContext
 silc_server_command_dup(SilcServerCommandContext ctx);
 bool silc_server_command_pending(SilcServer server,
                                 SilcCommand reply_cmd,
-                                uint16 ident,
+                                SilcUInt16 ident,
                                 SilcCommandCb callback,
                                 void *context);
 void silc_server_command_pending_del(SilcServer server,
                                     SilcCommand reply_cmd,
-                                    uint16 ident);
+                                    SilcUInt16 ident);
 SilcServerCommandPendingCallbacks
 silc_server_command_pending_check(SilcServer server,
                                  SilcServerCommandReplyContext ctx,
                                  SilcCommand command, 
-                                 uint16 ident,
-                                 uint32 *callbacks_count);
+                                 SilcUInt16 ident,
+                                 SilcUInt32 *callbacks_count);
 SILC_SERVER_CMD_FUNC(whois);
 SILC_SERVER_CMD_FUNC(whowas);
 SILC_SERVER_CMD_FUNC(identify);
index dee4e0bef9bcd7a1838c08a96a06445caec96082..3c4f490e4c46e4d9c6ead1999520079160318649 100644 (file)
@@ -72,7 +72,7 @@ void silc_server_command_reply_process(SilcServer server,
   SilcServerCommandReplyContext ctx;
   SilcCommandPayload payload;
   SilcCommand command;
-  uint16 ident;
+  SilcUInt16 ident;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -139,7 +139,7 @@ silc_server_command_reply_whois_save(SilcServerCommandReplyContext cmd)
   SilcClientEntry client;
   char global = FALSE;
   char *nick;
-  uint32 mode = 0, len, id_len, flen;
+  SilcUInt32 mode = 0, len, id_len, flen;
   int expire = 0;
 
   id_data = silc_argument_get_arg_type(cmd->args, 2, &id_len);
@@ -275,7 +275,7 @@ SILC_SERVER_CMD_REPLY_FUNC(whois)
   if (status == SILC_STATUS_ERR_NO_SUCH_CLIENT_ID &&
       cmd->sock->type == SILC_SOCKET_TYPE_ROUTER) {
     SilcClientEntry client;
-    uint32 tmp_len;
+    SilcUInt32 tmp_len;
     unsigned char *tmp = silc_argument_get_arg_type(cmd->args, 2, &tmp_len);
     if (tmp) {
       SilcClientID *client_id = silc_id_payload_parse_id(tmp, tmp_len);
@@ -304,7 +304,7 @@ static char
 silc_server_command_reply_whowas_save(SilcServerCommandReplyContext cmd)
 {
   SilcServer server = cmd->server;
-  uint32 len, id_len;
+  SilcUInt32 len, id_len;
   unsigned char *id_data;
   char *nickname, *username, *realname, *servername = NULL;
   SilcClientID *client_id;
@@ -416,7 +416,7 @@ static char
 silc_server_command_reply_identify_save(SilcServerCommandReplyContext cmd)
 {
   SilcServer server = cmd->server;
-  uint32 len, id_len;
+  SilcUInt32 len, id_len;
   unsigned char *id_data;
   char *name, *info;
   SilcClientID *client_id = NULL;
@@ -636,7 +636,7 @@ SILC_SERVER_CMD_REPLY_FUNC(identify)
   if (status == SILC_STATUS_ERR_NO_SUCH_CLIENT_ID &&
       cmd->sock->type == SILC_SOCKET_TYPE_ROUTER) {
     SilcClientEntry client;
-    uint32 tmp_len;
+    SilcUInt32 tmp_len;
     unsigned char *tmp = silc_argument_get_arg_type(cmd->args, 2, &tmp_len);
     if (tmp) {
       SilcClientID *client_id = silc_id_payload_parse_id(tmp, tmp_len);
@@ -668,7 +668,7 @@ SILC_SERVER_CMD_REPLY_FUNC(info)
   SilcCommandStatus status;
   SilcServerEntry entry;
   SilcServerID *server_id;
-  uint32 tmp_len;
+  SilcUInt32 tmp_len;
   unsigned char *tmp, *name;
 
   COMMAND_CHECK_STATUS;
@@ -725,7 +725,7 @@ SILC_SERVER_CMD_REPLY_FUNC(motd)
   SilcCommandStatus status;
   SilcServerEntry entry = NULL;
   SilcServerID *server_id;
-  uint32 tmp_len;
+  SilcUInt32 tmp_len;
   unsigned char *tmp;
 
   COMMAND_CHECK_STATUS;
@@ -776,10 +776,10 @@ SILC_SERVER_CMD_REPLY_FUNC(join)
   SilcClientID *client_id = NULL;
   SilcChannelEntry entry;
   SilcHmac hmac = NULL;
-  uint32 id_len, len, list_count;
+  SilcUInt32 id_len, len, list_count;
   unsigned char *id_string;
   char *channel_name, *tmp;
-  uint32 mode, created;
+  SilcUInt32 mode, created;
   SilcBuffer keyp = NULL, client_id_list = NULL, client_mode_list = NULL;
 
   COMMAND_CHECK_STATUS;
@@ -982,8 +982,8 @@ SILC_SERVER_CMD_REPLY_FUNC(users)
   SilcBuffer client_id_list;
   SilcBuffer client_mode_list;
   unsigned char *tmp;
-  uint32 tmp_len;
-  uint32 list_count;
+  SilcUInt32 tmp_len;
+  SilcUInt32 list_count;
 
   COMMAND_CHECK_STATUS;
 
@@ -1072,8 +1072,8 @@ SILC_SERVER_CMD_REPLY_FUNC(getkey)
   SilcServerID *server_id = NULL;
   SilcSKEPKType type;
   unsigned char *tmp, *pk;
-  uint32 len;
-  uint16 pk_len;
+  SilcUInt32 len;
+  SilcUInt16 pk_len;
   SilcIDPayload idp = NULL;
   SilcIdType id_type;
   SilcPublicKey public_key = NULL;
@@ -1154,9 +1154,9 @@ SILC_SERVER_CMD_REPLY_FUNC(list)
   SilcChannelID *channel_id = NULL;
   SilcChannelEntry channel;
   SilcIDCacheEntry cache;
-  uint32 len;
+  SilcUInt32 len;
   unsigned char *tmp, *name, *topic;
-  uint32 usercount = 0;
+  SilcUInt32 usercount = 0;
   bool global_list = FALSE;
 
   COMMAND_CHECK_STATUS_LIST;
index 97222f34193b5c1c689bd066abc2b8abe2b56f4b..37dc113879e9992521296e3337539d010608a006 100644 (file)
@@ -47,8 +47,8 @@ typedef struct {
 
   /* If defined this executes the pending command. */
   SilcServerCommandPendingCallbacks callbacks;
-  uint32 callbacks_count;
-  uint16 ident;
+  SilcUInt32 callbacks_count;
+  SilcUInt16 ident;
 } *SilcServerCommandReplyContext;
 
 /* Macros */
index 40b9041caaafee09f3b3d36f3e64168429b7972e..110fa3cf5f3e20123ad0e1c23a64715789f7e4b7 100644 (file)
@@ -381,7 +381,7 @@ int silc_idlist_del_client(SilcIDList id_list, SilcClientEntry entry)
 int silc_idlist_get_clients_by_nickname(SilcIDList id_list, char *nickname,
                                        char *server, 
                                        SilcClientEntry **clients,
-                                       uint32 *clients_count)
+                                       SilcUInt32 *clients_count)
 {
   SilcIDCacheList list = NULL;
   SilcIDCacheEntry id_cache = NULL;
@@ -414,7 +414,7 @@ int silc_idlist_get_clients_by_nickname(SilcIDList id_list, char *nickname,
 int silc_idlist_get_clients_by_hash(SilcIDList id_list, char *nickname,
                                    SilcHash md5hash,
                                    SilcClientEntry **clients,
-                                   uint32 *clients_count)
+                                   SilcUInt32 *clients_count)
 {
   SilcIDCacheList list = NULL;
   SilcIDCacheEntry id_cache = NULL;
@@ -748,7 +748,7 @@ silc_idlist_replace_channel_id(SilcIDList id_list, SilcChannelID *old_id,
 
 SilcChannelEntry *
 silc_idlist_get_channels(SilcIDList id_list, SilcChannelID *channel_id,
-                        uint32 *channels_count)
+                        SilcUInt32 *channels_count)
 {
   SilcIDCacheList list = NULL;
   SilcIDCacheEntry id_cache = NULL;
index b2a7a413b6a2b8cf118c90c3130bfb65da64687f..9766921f6bccc33bd186a26f2e80d6153af8f0c1 100644 (file)
@@ -31,14 +31,14 @@ typedef struct SilcChannelEntryStruct *SilcChannelEntry;
 typedef struct {
   SilcIDCache cache;
   SilcSchedule schedule;
-  uint32 timeout;
+  SilcUInt32 timeout;
 } *SilcIDListPurge;
 
 /* Channel key re-key context. */
 typedef struct {
   void *context;
   SilcChannelEntry channel;
-  uint32 key_len;
+  SilcUInt32 key_len;
   SilcTask task;
 } *SilcServerChannelRekey;
 
@@ -47,15 +47,15 @@ typedef struct {
   /* Current sending encryption key, provided for re-key. The `pfs'
      is TRUE if the Perfect Forward Secrecy is performed in re-key. */
   unsigned char *send_enc_key;
-  uint32 enc_key_len;
+  SilcUInt32 enc_key_len;
   int ske_group;
   bool pfs;
-  uint32 timeout;
+  SilcUInt32 timeout;
   void *context;
 } *SilcServerRekey;
 
 /* ID List Entry status type and all the types. */
-typedef uint8 SilcIDListStatus;
+typedef SilcUInt8 SilcIDListStatus;
 #define SILC_IDLIST_STATUS_NONE         0x00    /* No status */
 #define SILC_IDLIST_STATUS_REGISTERED   0x01    /* Entry is registered */
 #define SILC_IDLIST_STATUS_RESOLVED     0x02    /* Entry info is resolved */
@@ -86,8 +86,8 @@ typedef struct {
   SilcHmac hmac_receive;
 
   /* Packet sequence numbers */
-  uint32 psn_send;
-  uint32 psn_receive;
+  SilcUInt32 psn_send;
+  SilcUInt32 psn_receive;
 
   /* Hash selected in the SKE protocol, NULL if not needed at all */
   SilcHash hash;
@@ -135,7 +135,7 @@ typedef struct {
        Logical name of the server. There is no limit of the length of the
        server name. This is usually the same name as defined in DNS.
 
-   uint8 server_type
+   SilcUInt8 server_type
 
        Type of the server. SILC_SERVER or SILC_ROUTER are the possible
        choices for this.
@@ -176,7 +176,7 @@ struct SilcServerEntryStruct {
   SilcIDListDataStruct data;
 
   char *server_name;
-  uint8 server_type;
+  SilcUInt8 server_type;
   SilcServerID *id;
   char *server_info;
   char *motd;
@@ -199,7 +199,7 @@ struct SilcServerEntryStruct {
 
        Pointer to the client list. This is the client currently on channel.
 
-   uint32 mode
+   SilcUInt32 mode
 
        Client's current mode on the channel.
 
@@ -212,7 +212,7 @@ struct SilcServerEntryStruct {
 */
 typedef struct SilcChannelClientEntryStruct {
   SilcClientEntry client;
-  uint32 mode;
+  SilcUInt32 mode;
   SilcChannelEntry channel;
 } *SilcChannelClientEntry;
 
@@ -284,7 +284,7 @@ typedef struct SilcChannelClientEntryStruct {
        nickname. Nickname is not relevant information that would need to be 
        saved as plain.
 
-   uint32 mode
+   SilcUInt32 mode
 
        Client's mode.  Client maybe for example server operator or
        router operator (SILC operator).
@@ -295,7 +295,7 @@ typedef struct SilcChannelClientEntryStruct {
        not allow any command to be exeucted more than once in about
        2 seconds. This is result of normal time().
 
-   uint8 fast_command
+   SilcUInt8 fast_command
 
        Counter to check command bursts.  By default, up to 5 commands
        are allowed before limiting the execution.  See command flags
@@ -320,7 +320,7 @@ typedef struct SilcChannelClientEntryStruct {
        but as just said, this is usually pointer to the socket connection
        list.
 
-   uint16 resolve_cmd_ident
+   SilcUInt16 resolve_cmd_ident
 
        Command identifier for the entry when the entry's data.status
        is SILC_IDLIST_STATUS_RESOLVING.  If this entry is asked to be
@@ -338,10 +338,10 @@ struct SilcClientEntryStruct {
   char *username;
   char *userinfo;
   SilcClientID *id;
-  uint32 mode;
+  SilcUInt32 mode;
 
   long last_command;
-  uint8 fast_command;
+  SilcUInt8 fast_command;
 
   /* Pointer to the router */
   SilcServerEntry router;
@@ -354,7 +354,7 @@ struct SilcClientEntryStruct {
 
   /* data.status is RESOLVING and this includes the resolving command 
      reply identifier. */
-  uint16 resolve_cmd_ident;
+  SilcUInt16 resolve_cmd_ident;
 };
 
 /* 
@@ -379,7 +379,7 @@ struct SilcClientEntryStruct {
 
        Logical name of the channel.
 
-   uint32 mode
+   SilcUInt32 mode
 
        Current mode of the channel.  See lib/silccore/silcchannel.h for
        all modes.
@@ -416,7 +416,7 @@ struct SilcClientEntryStruct {
    SilcPublicKey founder_key
    SilcAuthMethod founder_method
    unsigned char *founder_passwd
-   uint32 founder_passwd_len
+   SilcUInt32 founder_passwd_len
 
        If the SILC_CMODE_FOUNDER_AUTH has been set then these will include
        the founder's public key, authentication method and the password
@@ -440,7 +440,7 @@ struct SilcClientEntryStruct {
        The key of the channel (the cipher actually).
 
    unsigned char *key
-   uint32 key_len
+   SilcUInt32 key_len
 
        Raw key data of the channel key.
 
@@ -460,7 +460,7 @@ struct SilcClientEntryStruct {
 */
 struct SilcChannelEntryStruct {
   char *channel_name;
-  uint32 mode;
+  SilcUInt32 mode;
   SilcChannelID *id;
   bool global_users;
   char *topic;
@@ -470,16 +470,16 @@ struct SilcChannelEntryStruct {
   SilcPublicKey founder_key;
   SilcAuthMethod founder_method;
   unsigned char *founder_passwd;
-  uint32 founder_passwd_len;
+  SilcUInt32 founder_passwd_len;
 
-  uint32 user_limit;
+  SilcUInt32 user_limit;
   unsigned char *passphrase;
   char *invite_list;
   char *ban_list;
 
   /* All users on this channel */
   SilcHashTable user_list;
-  uint32 user_count;
+  SilcUInt32 user_count;
 
   /* Pointer to the router */
   SilcServerEntry router;
@@ -487,7 +487,7 @@ struct SilcChannelEntryStruct {
   /* Channel keys */
   SilcCipher channel_key;
   unsigned char *key;
-  uint32 key_len;
+  SilcUInt32 key_len;
   unsigned char iv[SILC_CIPHER_MAX_IV_SIZE];
   SilcHmac hmac;
 
@@ -587,11 +587,11 @@ int silc_idlist_del_client(SilcIDList id_list, SilcClientEntry entry);
 int silc_idlist_get_clients_by_nickname(SilcIDList id_list, char *nickname,
                                        char *server, 
                                        SilcClientEntry **clients,
-                                       uint32 *clients_count);
+                                       SilcUInt32 *clients_count);
 int silc_idlist_get_clients_by_hash(SilcIDList id_list, char *nickname,
                                    SilcHash md5hash,
                                    SilcClientEntry **clients,
-                                   uint32 *clients_count);
+                                   SilcUInt32 *clients_count);
 SilcClientEntry
 silc_idlist_find_client_by_id(SilcIDList id_list, SilcClientID *id,
                              bool registered, SilcIDCacheEntry *ret_entry);
@@ -617,6 +617,6 @@ silc_idlist_replace_channel_id(SilcIDList id_list, SilcChannelID *old_id,
                               SilcChannelID *new_id);
 SilcChannelEntry *
 silc_idlist_get_channels(SilcIDList id_list, SilcChannelID *channel_id,
-                        uint32 *channels_count);
+                        SilcUInt32 *channels_count);
 
 #endif
index 65aba7318907e6c024dc0769da3c76a1570b54b2..07d1e1c86fad97b154863f60dee0baf6003a9169 100644 (file)
@@ -46,9 +46,9 @@ void silc_server_notify(SilcServer server,
   SilcChannelClientEntry chl;
   SilcIDCacheEntry cache;
   SilcHashTableList htl;
-  uint32 mode;
+  SilcUInt32 mode;
   unsigned char *tmp;
-  uint32 tmp_len;
+  SilcUInt32 tmp_len;
   bool local;
 
   SILC_LOG_DEBUG(("Start"));
@@ -993,7 +993,7 @@ void silc_server_notify(SilcServer server,
        * Distribute the notify to local clients on channels
        */
       unsigned char *id;
-      uint32 id_len;
+      SilcUInt32 id_len;
     
       SILC_LOG_DEBUG(("KILLED notify"));
       
@@ -1193,7 +1193,7 @@ void silc_server_notify_list(SilcServer server,
 {
   SilcPacketContext *new;
   SilcBuffer buffer;
-  uint16 len;
+  SilcUInt16 len;
 
   SILC_LOG_DEBUG(("Processing Notify List"));
 
@@ -1523,8 +1523,8 @@ SilcClientEntry silc_server_new_client(SilcServer server,
   SilcBuffer reply;
   SilcIDListData idata;
   char *username = NULL, *realname = NULL, *id_string;
-  uint16 username_len;
-  uint32 id_len;
+  SilcUInt16 username_len;
+  SilcUInt32 id_len;
   int ret;
   char *hostname, *nickname;
   int nickfail = 0;
@@ -1772,7 +1772,7 @@ SilcServerEntry silc_server_new_server(SilcServer server,
   SilcServerID *server_id;
   SilcIDListData idata;
   unsigned char *server_name, *id_string;
-  uint16 id_len, name_len;
+  SilcUInt16 id_len, name_len;
   int ret;
   bool local = TRUE;
 
@@ -2110,7 +2110,7 @@ void silc_server_new_id_list(SilcServer server, SilcSocketConnection sock,
 {
   SilcPacketContext *new_id;
   SilcBuffer idp;
-  uint16 id_len;
+  SilcUInt16 id_len;
 
   SILC_LOG_DEBUG(("Processing New ID List"));
 
@@ -2182,10 +2182,10 @@ void silc_server_new_channel(SilcServer server,
   SilcChannelPayload payload;
   SilcChannelID *channel_id;
   char *channel_name;
-  uint32 name_len;
+  SilcUInt32 name_len;
   unsigned char *id;
-  uint32 id_len;
-  uint32 mode;
+  SilcUInt32 id_len;
+  SilcUInt32 mode;
   SilcServerEntry server_entry;
   SilcChannelEntry channel;
 
@@ -2388,7 +2388,7 @@ void silc_server_new_channel_list(SilcServer server,
 {
   SilcPacketContext *new;
   SilcBuffer buffer;
-  uint16 len1, len2;
+  SilcUInt16 len1, len2;
 
   SILC_LOG_DEBUG(("Processing New Channel List"));
 
@@ -2500,7 +2500,7 @@ void silc_server_connection_auth_request(SilcServer server,
                                         SilcPacketContext *packet)
 {
   SilcServerConfigClient *client = NULL;
-  uint16 conn_type;
+  SilcUInt16 conn_type;
   int ret;
   SilcAuthMethod auth_meth = SILC_AUTH_NONE;
 
index 8062551faa4d9393e83a1745095ec68ee961391e..a5366eab918d410f404ad3b595fa7224f9e9d390 100644 (file)
@@ -78,7 +78,7 @@ void silc_server_packet_send(SilcServer server,
                             SilcPacketType type, 
                             SilcPacketFlags flags,
                             unsigned char *data, 
-                            uint32 data_len,
+                            SilcUInt32 data_len,
                             bool force_send)
 {
   void *dst_id = NULL;
@@ -133,16 +133,16 @@ void silc_server_packet_send_dest(SilcServer server,
                                  void *dst_id,
                                  SilcIdType dst_id_type,
                                  unsigned char *data, 
-                                 uint32 data_len,
+                                 SilcUInt32 data_len,
                                  bool force_send)
 {
   SilcPacketContext packetdata;
   SilcIDListData idata = (SilcIDListData)sock->user_data;
   SilcCipher cipher = NULL;
   SilcHmac hmac = NULL;
-  uint32 sequence = 0;
+  SilcUInt32 sequence = 0;
   unsigned char *dst_id_data = NULL;
-  uint32 dst_id_len = 0;
+  SilcUInt32 dst_id_len = 0;
   int block_len = 0;
 
   /* If disconnecting, ignore the data */
@@ -232,18 +232,18 @@ void silc_server_packet_send_srcdest(SilcServer server,
                                     void *dst_id,
                                     SilcIdType dst_id_type,
                                     unsigned char *data, 
-                                    uint32 data_len,
+                                    SilcUInt32 data_len,
                                     bool force_send)
 {
   SilcPacketContext packetdata;
   SilcIDListData idata;
   SilcCipher cipher = NULL;
   SilcHmac hmac = NULL;
-  uint32 sequence = 0;
+  SilcUInt32 sequence = 0;
   unsigned char *dst_id_data = NULL;
-  uint32 dst_id_len = 0;
+  SilcUInt32 dst_id_len = 0;
   unsigned char *src_id_data = NULL;
-  uint32 src_id_len = 0;
+  SilcUInt32 src_id_len = 0;
   int block_len = 0;
 
   SILC_LOG_DEBUG(("Sending packet, type %d", type));
@@ -392,18 +392,18 @@ void silc_server_packet_route(SilcServer server,
 
 void silc_server_packet_send_clients(SilcServer server,
                                     SilcClientEntry *clients,
-                                    uint32 clients_count,
+                                    SilcUInt32 clients_count,
                                     SilcPacketType type, 
                                     SilcPacketFlags flags,
                                     bool route,
                                     unsigned char *data, 
-                                    uint32 data_len,
+                                    SilcUInt32 data_len,
                                     bool force_send)
 {
   SilcSocketConnection sock = NULL;
   SilcClientEntry client = NULL;
   SilcServerEntry *routed = NULL;
-  uint32 routed_count = 0;
+  SilcUInt32 routed_count = 0;
   bool gone = FALSE;
   int i, k;
 
@@ -469,9 +469,9 @@ silc_server_packet_send_to_channel_real(SilcServer server,
                                        SilcPacketContext *packet,
                                        SilcCipher cipher,
                                        SilcHmac hmac,
-                                       uint32 sequence,
+                                       SilcUInt32 sequence,
                                        unsigned char *data,
-                                       uint32 data_len,
+                                       SilcUInt32 data_len,
                                        bool channel_message,
                                        bool force_send)
 {
@@ -538,7 +538,7 @@ void silc_server_packet_send_to_channel(SilcServer server,
                                        SilcPacketType type,
                                        bool route,
                                        unsigned char *data,
-                                       uint32 data_len,
+                                       SilcUInt32 data_len,
                                        bool force_send)
 {
   SilcSocketConnection sock = NULL;
@@ -548,7 +548,7 @@ void silc_server_packet_send_to_channel(SilcServer server,
   SilcChannelClientEntry chl;
   SilcHashTableList htl;
   SilcIDListData idata;
-  uint32 routed_count = 0;
+  SilcUInt32 routed_count = 0;
   bool gone = FALSE;
   int k;
 
@@ -688,8 +688,8 @@ silc_server_packet_relay_to_channel_encrypt(SilcServer server,
       !(channel->mode & SILC_CHANNEL_MODE_PRIVKEY) &&
       channel->channel_key) {
     SilcBuffer chp;
-    uint32 iv_len, i;
-    uint16 dlen, flags;
+    SilcUInt32 iv_len, i;
+    SilcUInt16 dlen, flags;
 
     iv_len = silc_cipher_get_block_len(channel->channel_key);
     if (channel->iv[0] == '\0')
@@ -734,7 +734,7 @@ void silc_server_packet_relay_to_channel(SilcServer server,
                                         SilcIdType sender_type,
                                         void *sender_entry,
                                         unsigned char *data,
-                                        uint32 data_len,
+                                        SilcUInt32 data_len,
                                         bool force_send)
 {
   bool found = FALSE;
@@ -743,7 +743,7 @@ void silc_server_packet_relay_to_channel(SilcServer server,
   SilcClientEntry client = NULL;
   SilcServerEntry *routed = NULL;
   SilcChannelClientEntry chl;
-  uint32 routed_count = 0;
+  SilcUInt32 routed_count = 0;
   SilcIDListData idata;
   SilcHashTableList htl;
   bool gone = FALSE;
@@ -961,7 +961,7 @@ void silc_server_packet_send_local_channel(SilcServer server,
                                           SilcPacketType type,
                                           SilcPacketFlags flags,
                                           unsigned char *data,
-                                          uint32 data_len,
+                                          SilcUInt32 data_len,
                                           bool force_send)
 {
   SilcChannelClientEntry chl;
@@ -995,7 +995,7 @@ void silc_server_send_private_message(SilcServer server,
                                      SilcSocketConnection dst_sock,
                                      SilcCipher cipher,
                                      SilcHmac hmac,
-                                     uint32 sequence,
+                                     SilcUInt32 sequence,
                                      SilcPacketContext *packet)
 {
   SilcBuffer buffer = packet->buffer;
@@ -1036,7 +1036,7 @@ void silc_server_send_motd(SilcServer server,
                           SilcSocketConnection sock)
 {
   char *motd, *motd_file = NULL;
-  uint32 motd_len;
+  SilcUInt32 motd_len;
 
   if (server->config)
     motd_file = server->config->server_info->motd_file;
@@ -1080,7 +1080,7 @@ void silc_server_send_notify(SilcServer server,
                             SilcSocketConnection sock,
                             bool broadcast,
                             SilcNotifyType type,
-                            uint32 argc, ...)
+                            SilcUInt32 argc, ...)
 {
   va_list ap;
   SilcBuffer packet;
@@ -1110,7 +1110,7 @@ void silc_server_send_notify_args(SilcServer server,
                                  SilcSocketConnection sock,
                                  bool broadcast,
                                  SilcNotifyType type,
-                                 uint32 argc,
+                                 SilcUInt32 argc,
                                  SilcBuffer args)
 {
   SilcBuffer packet;
@@ -1210,7 +1210,7 @@ void silc_server_send_notify_cmode(SilcServer server,
                                   SilcSocketConnection sock,
                                   bool broadcast,
                                   SilcChannelEntry channel,
-                                  uint32 mode_mask,
+                                  SilcUInt32 mode_mask,
                                   void *id, SilcIdType id_type,
                                   char *cipher, char *hmac,
                                   char *passphrase)
@@ -1240,7 +1240,7 @@ void silc_server_send_notify_cumode(SilcServer server,
                                    SilcSocketConnection sock,
                                    bool broadcast,
                                    SilcChannelEntry channel,
-                                   uint32 mode_mask,
+                                   SilcUInt32 mode_mask,
                                    void *id, SilcIdType id_type,
                                    SilcClientID *target)
 {
@@ -1361,7 +1361,7 @@ void silc_server_send_notify_umode(SilcServer server,
                                   SilcSocketConnection sock,
                                   bool broadcast,
                                   SilcClientID *client_id,
-                                  uint32 mode_mask)
+                                  SilcUInt32 mode_mask)
 {
   SilcBuffer idp;
   unsigned char mode[4];
@@ -1432,7 +1432,7 @@ void silc_server_send_notify_dest(SilcServer server,
                                  void *dest_id,
                                  SilcIdType dest_id_type,
                                  SilcNotifyType type,
-                                 uint32 argc, ...)
+                                 SilcUInt32 argc, ...)
 {
   va_list ap;
   SilcBuffer packet;
@@ -1460,7 +1460,7 @@ void silc_server_send_notify_to_channel(SilcServer server,
                                        SilcChannelEntry channel,
                                        bool route_notify,
                                        SilcNotifyType type,
-                                       uint32 argc, ...)
+                                       SilcUInt32 argc, ...)
 {
   va_list ap;
   SilcBuffer packet;
@@ -1486,23 +1486,23 @@ void silc_server_send_notify_on_channels(SilcServer server,
                                         SilcClientEntry sender,
                                         SilcClientEntry client,
                                         SilcNotifyType type,
-                                        uint32 argc, ...)
+                                        SilcUInt32 argc, ...)
 {
   int k;
   SilcSocketConnection sock = NULL;
   SilcPacketContext packetdata;
   SilcClientEntry c;
   SilcClientEntry *sent_clients = NULL;
-  uint32 sent_clients_count = 0;
+  SilcUInt32 sent_clients_count = 0;
   SilcServerEntry *routed = NULL;
-  uint32 routed_count = 0;
+  SilcUInt32 routed_count = 0;
   SilcHashTableList htl, htl2;
   SilcChannelEntry channel;
   SilcChannelClientEntry chl, chl2;
   SilcIDListData idata;
   SilcBuffer packet;
   unsigned char *data;
-  uint32 data_len;
+  SilcUInt32 data_len;
   bool force_send = FALSE;
   va_list ap;
 
@@ -1637,7 +1637,7 @@ void silc_server_send_new_id(SilcServer server,
                             SilcSocketConnection sock,
                             bool broadcast,
                             void *id, SilcIdType id_type, 
-                            uint32 id_len)
+                            SilcUInt32 id_len)
 {
   SilcBuffer idp;
 
@@ -1667,12 +1667,12 @@ void silc_server_send_new_channel(SilcServer server,
                                  bool broadcast,
                                  char *channel_name,
                                  void *channel_id, 
-                                 uint32 channel_id_len,
-                                 uint32 mode)
+                                 SilcUInt32 channel_id_len,
+                                 SilcUInt32 mode)
 {
   SilcBuffer packet;
   unsigned char *cid;
-  uint32 name_len = strlen(channel_name);
+  SilcUInt32 name_len = strlen(channel_name);
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -1716,7 +1716,7 @@ void silc_server_send_channel_key(SilcServer server,
 {
   SilcBuffer packet;
   unsigned char *chid;
-  uint32 tmp_len;
+  SilcUInt32 tmp_len;
  
   SILC_LOG_DEBUG(("Sending key to channel %s", channel->channel_name));
  
@@ -1745,8 +1745,8 @@ void silc_server_send_channel_key(SilcServer server,
 void silc_server_send_command(SilcServer server, 
                              SilcSocketConnection sock,
                              SilcCommand command, 
-                             uint16 ident,
-                             uint32 argc, ...)
+                             SilcUInt16 ident,
+                             SilcUInt32 argc, ...)
 {
   SilcBuffer packet;
   va_list ap;
@@ -1767,8 +1767,8 @@ void silc_server_send_command_reply(SilcServer server,
                                    SilcSocketConnection sock,
                                    SilcCommand command, 
                                    SilcCommandStatus status,
-                                   uint16 ident,
-                                   uint32 argc, ...)
+                                   SilcUInt16 ident,
+                                   SilcUInt32 argc, ...)
 {
   SilcBuffer packet;
   va_list ap;
@@ -1792,8 +1792,8 @@ void silc_server_send_dest_command_reply(SilcServer server,
                                         SilcIdType dst_id_type,
                                         SilcCommand command, 
                                         SilcCommandStatus status,
-                                        uint16 ident,
-                                        uint32 argc, ...)
+                                        SilcUInt16 ident,
+                                        SilcUInt32 argc, ...)
 {
   SilcBuffer packet;
   va_list ap;
@@ -1825,7 +1825,7 @@ void silc_server_relay_packet(SilcServer server,
                              SilcSocketConnection dst_sock,
                              SilcCipher cipher,
                              SilcHmac hmac,
-                             uint32 sequence,
+                             SilcUInt32 sequence,
                              SilcPacketContext *packet,
                              bool force_send)
 {
@@ -1850,7 +1850,7 @@ void silc_server_relay_packet(SilcServer server,
 
 void silc_server_send_connection_auth_request(SilcServer server,
                                              SilcSocketConnection sock,
-                                             uint16 conn_type,
+                                             SilcUInt16 conn_type,
                                              SilcAuthMethod auth_meth)
 {
   SilcBuffer packet;
index 58fa37b9a3f9fcb5b56e0271c18143087bcf3050..703eaeafae9392acdd11a35bb8fa95e2e70c5baa 100644 (file)
@@ -31,7 +31,7 @@ void silc_server_packet_send(SilcServer server,
                             SilcPacketType type, 
                             SilcPacketFlags flags,
                             unsigned char *data, 
-                            uint32 data_len,
+                            SilcUInt32 data_len,
                             bool force_send);
 void silc_server_packet_send_dest(SilcServer server,
                                  SilcSocketConnection sock, 
@@ -40,7 +40,7 @@ void silc_server_packet_send_dest(SilcServer server,
                                  void *dst_id,
                                  SilcIdType dst_id_type,
                                  unsigned char *data, 
-                                 uint32 data_len,
+                                 SilcUInt32 data_len,
                                  bool force_send);
 void silc_server_packet_send_srcdest(SilcServer server,
                                     SilcSocketConnection sock, 
@@ -51,7 +51,7 @@ void silc_server_packet_send_srcdest(SilcServer server,
                                     void *dst_id,
                                     SilcIdType dst_id_type,
                                     unsigned char *data, 
-                                    uint32 data_len,
+                                    SilcUInt32 data_len,
                                     bool force_send);
 void silc_server_packet_broadcast(SilcServer server,
                                  SilcSocketConnection sock,
@@ -61,12 +61,12 @@ void silc_server_packet_route(SilcServer server,
                              SilcPacketContext *packet);
 void silc_server_packet_send_clients(SilcServer server,
                                     SilcClientEntry *clients,
-                                    uint32 clients_count,
+                                    SilcUInt32 clients_count,
                                     SilcPacketType type, 
                                     SilcPacketFlags flags,
                                     bool route,
                                     unsigned char *data, 
-                                    uint32 data_len,
+                                    SilcUInt32 data_len,
                                     bool force_send);
 void silc_server_packet_send_to_channel(SilcServer server,
                                        SilcSocketConnection sender,
@@ -74,7 +74,7 @@ void silc_server_packet_send_to_channel(SilcServer server,
                                        SilcPacketType type,
                                        bool route,
                                        unsigned char *data,
-                                       uint32 data_len,
+                                       SilcUInt32 data_len,
                                        bool force_send);
 void silc_server_packet_relay_to_channel(SilcServer server,
                                         SilcSocketConnection sender_sock,
@@ -83,20 +83,20 @@ void silc_server_packet_relay_to_channel(SilcServer server,
                                         SilcIdType sender_type,
                                         void *sender_entry,
                                         unsigned char *data,
-                                        uint32 data_len,
+                                        SilcUInt32 data_len,
                                         bool force_send);
 void silc_server_packet_send_local_channel(SilcServer server,
                                           SilcChannelEntry channel,
                                           SilcPacketType type,
                                           SilcPacketFlags flags,
                                           unsigned char *data,
-                                          uint32 data_len,
+                                          SilcUInt32 data_len,
                                           bool force_send);
 void silc_server_send_private_message(SilcServer server,
                                      SilcSocketConnection dst_sock,
                                      SilcCipher cipher,
                                      SilcHmac hmac,
-                                     uint32 sequence,
+                                     SilcUInt32 sequence,
                                      SilcPacketContext *packet);
 void silc_server_send_motd(SilcServer server,
                           SilcSocketConnection sock);
@@ -107,12 +107,12 @@ void silc_server_send_notify(SilcServer server,
                             SilcSocketConnection sock,
                             bool broadcast,
                             SilcNotifyType type,
-                            uint32 argc, ...);
+                            SilcUInt32 argc, ...);
 void silc_server_send_notify_args(SilcServer server,
                                  SilcSocketConnection sock,
                                  bool broadcast,
                                  SilcNotifyType type,
-                                 uint32 argc,
+                                 SilcUInt32 argc,
                                  SilcBuffer args);
 void silc_server_send_notify_channel_change(SilcServer server,
                                            SilcSocketConnection sock,
@@ -138,7 +138,7 @@ void silc_server_send_notify_cmode(SilcServer server,
                                   SilcSocketConnection sock,
                                   bool broadcast,
                                   SilcChannelEntry channel,
-                                  uint32 mode_mask,
+                                  SilcUInt32 mode_mask,
                                   void *id, SilcIdType id_type,
                                   char *cipher, char *hmac,
                                   char *passphrase);
@@ -146,7 +146,7 @@ void silc_server_send_notify_cumode(SilcServer server,
                                    SilcSocketConnection sock,
                                    bool broadcast,
                                    SilcChannelEntry channel,
-                                   uint32 mode_mask,
+                                   SilcUInt32 mode_mask,
                                    void *id, SilcIdType id_type,
                                    SilcClientID *target);
 void silc_server_send_notify_signoff(SilcServer server,
@@ -176,7 +176,7 @@ void silc_server_send_notify_umode(SilcServer server,
                                   SilcSocketConnection sock,
                                   bool broadcast,
                                   SilcClientID *client_id,
-                                  uint32 mode_mask);
+                                  SilcUInt32 mode_mask);
 void silc_server_send_notify_ban(SilcServer server,
                                 SilcSocketConnection sock,
                                 bool broadcast,
@@ -194,30 +194,30 @@ void silc_server_send_notify_dest(SilcServer server,
                                  void *dest_id,
                                  SilcIdType dest_id_type,
                                  SilcNotifyType type,
-                                 uint32 argc, ...);
+                                 SilcUInt32 argc, ...);
 void silc_server_send_notify_to_channel(SilcServer server,
                                        SilcSocketConnection sender,
                                        SilcChannelEntry channel,
                                        bool route_notify,
                                        SilcNotifyType type,
-                                       uint32 argc, ...);
+                                       SilcUInt32 argc, ...);
 void silc_server_send_notify_on_channels(SilcServer server,
                                         SilcClientEntry sender,
                                         SilcClientEntry client,
                                         SilcNotifyType type,
-                                        uint32 argc, ...);
+                                        SilcUInt32 argc, ...);
 void silc_server_send_new_id(SilcServer server,
                             SilcSocketConnection sock,
                             bool broadcast,
                             void *id, SilcIdType id_type, 
-                            uint32 id_len);
+                            SilcUInt32 id_len);
 void silc_server_send_new_channel(SilcServer server,
                                  SilcSocketConnection sock,
                                  bool broadcast,
                                  char *channel_name,
                                  void *channel_id, 
-                                 uint32 channel_id_len,
-                                 uint32 mode);
+                                 SilcUInt32 channel_id_len,
+                                 SilcUInt32 mode);
 void silc_server_send_channel_key(SilcServer server,
                                  SilcSocketConnection sender,
                                  SilcChannelEntry channel,
@@ -225,34 +225,34 @@ void silc_server_send_channel_key(SilcServer server,
 void silc_server_send_command(SilcServer server, 
                              SilcSocketConnection sock,
                              SilcCommand command, 
-                             uint16 ident,
-                             uint32 argc, ...);
+                             SilcUInt16 ident,
+                             SilcUInt32 argc, ...);
 void silc_server_send_command_reply(SilcServer server, 
                                    SilcSocketConnection sock,
                                    SilcCommand command, 
                                    SilcCommandStatus status,
-                                   uint16 ident,
-                                   uint32 argc, ...);
+                                   SilcUInt16 ident,
+                                   SilcUInt32 argc, ...);
 void silc_server_send_dest_command_reply(SilcServer server, 
                                         SilcSocketConnection sock,
                                         void *dst_id,
                                         SilcIdType dst_id_type,
                                         SilcCommand command, 
                                         SilcCommandStatus status,
-                                        uint16 ident,
-                                        uint32 argc, ...);
+                                        SilcUInt16 ident,
+                                        SilcUInt32 argc, ...);
 void silc_server_send_heartbeat(SilcServer server,
                                SilcSocketConnection sock);
 void silc_server_relay_packet(SilcServer server,
                              SilcSocketConnection dst_sock,
                              SilcCipher cipher,
                              SilcHmac hmac,
-                             uint32 sequence,
+                             SilcUInt32 sequence,
                              SilcPacketContext *packet,
                              bool force_send);
 void silc_server_send_connection_auth_request(SilcServer server,
                                              SilcSocketConnection sock,
-                                             uint16 conn_type,
+                                             SilcUInt16 conn_type,
                                              SilcAuthMethod auth_meth);
 void silc_server_packet_queue_purge(SilcServer server,
                                    SilcSocketConnection sock);
index 794a20880279462c6b473c8896443a1c971969e2..29eb07a707d6f8cc7f3cea6728a1a2e08115d745 100644 (file)
@@ -38,7 +38,7 @@ extern char *silc_version_string;
 static bool 
 silc_verify_public_key_internal(SilcServer server, SilcSocketConnection sock,
                                SilcSocketType conn_type,
-                               unsigned char *pk, uint32 pk_len, 
+                               unsigned char *pk, SilcUInt32 pk_len, 
                                SilcSKEPKType pk_type)
 {
   char file[256], filename[256], *fingerprint;
@@ -103,7 +103,7 @@ silc_verify_public_key_internal(SilcServer server, SilcSocketConnection sock,
     /* The key already exists, verify it. */
     SilcPublicKey public_key;
     unsigned char *encpk;
-    uint32 encpk_len;
+    SilcUInt32 encpk_len;
 
     SILC_LOG_DEBUG(("We have the public key saved locally"));
 
@@ -159,7 +159,7 @@ silc_verify_public_key_internal(SilcServer server, SilcSocketConnection sock,
 static void 
 silc_server_protocol_ke_verify_key(SilcSKE ske,
                                   unsigned char *pk_data,
-                                  uint32 pk_len,
+                                  SilcUInt32 pk_len,
                                   SilcSKEPKType pk_type,
                                   void *context,
                                   SilcSKEVerifyCbCompletion completion,
@@ -315,7 +315,7 @@ int silc_server_protocol_ke_set_keys(SilcServer server,
 /* Check remote host version string */
 
 SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version,
-                                    uint32 len, void *context)
+                                    SilcUInt32 len, void *context)
 {
   SilcSKEStatus status = SILC_SKE_STATUS_OK;
   char *cp;
@@ -736,7 +736,7 @@ static int
 silc_server_public_key_authentication(SilcServer server,
                                      SilcPublicKey pub_key,
                                      unsigned char *sign,
-                                     uint32 sign_len,
+                                     SilcUInt32 sign_len,
                                      SilcSKE ske)
 {
   SilcPKCS pkcs;
@@ -779,7 +779,7 @@ silc_server_public_key_authentication(SilcServer server,
 static int
 silc_server_get_public_key_auth(SilcServer server,
                                unsigned char **auth_data,
-                               uint32 *auth_data_len,
+                               SilcUInt32 *auth_data_len,
                                SilcSKE ske)
 {
   int len;
@@ -819,7 +819,7 @@ silc_server_get_authentication(SilcServerConnAuthInternalContext *ctx,
                               char *local_passphrase,
                               void *local_publickey,
                               unsigned char *remote_auth,
-                              uint32 remote_auth_len)
+                              SilcUInt32 remote_auth_len)
 {
   SilcServer server = (SilcServer)ctx->server;
   SilcSKE ske = ctx->ske;
@@ -886,8 +886,8 @@ SILC_TASK_CALLBACK(silc_server_protocol_connection_auth)
         * We are receiving party
         */
        int ret;
-       uint16 payload_len;
-       uint16 conn_type;
+       SilcUInt16 payload_len;
+       SilcUInt16 conn_type;
        unsigned char *auth_data = NULL;
 
        SILC_LOG_INFO(("Performing authentication protocol for %s (%s)",
@@ -1052,7 +1052,7 @@ SILC_TASK_CALLBACK(silc_server_protocol_connection_auth)
        SilcBuffer packet;
        int payload_len = 0;
        unsigned char *auth_data = NULL;
-       uint32 auth_data_len = 0;
+       SilcUInt32 auth_data_len = 0;
        
        switch(ctx->auth_meth) {
        case SILC_AUTH_NONE:
@@ -1259,8 +1259,8 @@ void silc_server_protocol_rekey_generate(SilcServer server,
 {
   SilcIDListData idata = (SilcIDListData)ctx->sock->user_data;
   SilcSKEKeyMaterial *keymat;
-  uint32 key_len = silc_cipher_get_key_len(idata->send_key);
-  uint32 hash_len = idata->hash->hash->hash_len;
+  SilcUInt32 key_len = silc_cipher_get_key_len(idata->send_key);
+  SilcUInt32 hash_len = idata->hash->hash->hash_len;
 
   SILC_LOG_DEBUG(("Generating new %s session keys (no PFS)",
                  send ? "sending" : "receiving"));
@@ -1288,10 +1288,10 @@ silc_server_protocol_rekey_generate_pfs(SilcServer server,
 {
   SilcIDListData idata = (SilcIDListData)ctx->sock->user_data;
   SilcSKEKeyMaterial *keymat;
-  uint32 key_len = silc_cipher_get_key_len(idata->send_key);
-  uint32 hash_len = idata->hash->hash->hash_len;
+  SilcUInt32 key_len = silc_cipher_get_key_len(idata->send_key);
+  SilcUInt32 hash_len = idata->hash->hash->hash_len;
   unsigned char *tmpbuf;
-  uint32 klen;
+  SilcUInt32 klen;
 
   SILC_LOG_DEBUG(("Generating new %s session keys (with PFS)",
                  send ? "sending" : "receiving"));
index c2b30e5ef0e82dab610a53f273137047a6896325..a6ce666a1d28c3a7e94c3a77da40c531c328e2dc 100644 (file)
@@ -71,9 +71,9 @@ typedef struct {
   /* Authentication method and data if we alreay know it. This is filled
      before starting the protocol if we know the authentication data.
      Otherwise these are and remain NULL. Used when we are initiating. */
-  uint32 auth_meth;
+  SilcUInt32 auth_meth;
   void *auth_data;
-  uint32 auth_data_len;
+  SilcUInt32 auth_data_len;
 
   /* Destinations ID from KE protocol context */
   void *dest_id;
@@ -86,7 +86,7 @@ typedef struct {
 
   SilcTask timeout_task;
   SilcPacketContext *packet;
-  uint16 conn_type;
+  SilcUInt16 conn_type;
 } SilcServerConnAuthInternalContext;
 
 /* Internal context for the rekey protocol */
index eac09e64d42c27a03b350c79178b290170e11247..a762edfa63828cb84c810ece51a556907016eee6 100644 (file)
@@ -40,7 +40,7 @@ SilcServerRouteTable silc_route_cache[SILC_SERVER_ROUTE_SIZE];
 /* Adds new route to the route cache. The argument `index' is the
    index value generated by silc_server_route_hash. */
 
-void silc_server_route_add(uint32 index, unsigned int dest,
+void silc_server_route_add(SilcUInt32 index, unsigned int dest,
                           SilcServerEntry router)
 {
   silc_route_cache[index].dest = dest;
@@ -50,10 +50,10 @@ void silc_server_route_add(uint32 index, unsigned int dest,
 /* Checksk whether destination has a specific router. Returns the
    router data if found, NULL otherwise. */
 
-SilcServerEntry silc_server_route_check(uint32 dest, 
-                                       uint16 port)
+SilcServerEntry silc_server_route_check(SilcUInt32 dest, 
+                                       SilcUInt16 port)
 {
-  uint32 index;
+  SilcUInt32 index;
 
   index = silc_server_route_hash(dest, port);
 
@@ -72,8 +72,8 @@ SilcSocketConnection silc_server_route_get(SilcServer server, void *id,
                                           SilcIdType id_type)
 {
   if (server->server_type == SILC_ROUTER) {
-    uint32 dest = 0;
-    uint16 port = 0;
+    SilcUInt32 dest = 0;
+    SilcUInt16 port = 0;
     SilcServerEntry router = NULL;
 #if 0
 
index 077831d647720964f2e768caaa84abb8b50591dc..a33112607ce9e0b09458e78938ccb85b7e8ac9dd 100644 (file)
@@ -31,7 +31,7 @@
 
    Following short description of the fields.
 
-   uint32 dest
+   SilcUInt32 dest
 
        Destination IPv4 address.  Can be used to quickly check whether
        the found route entry is what the caller wanted.
@@ -42,7 +42,7 @@
 
 */
 typedef struct {
-  uint32 dest;
+  SilcUInt32 dest;
   SilcServerEntry router;
 } SilcServerRouteTable;
 
@@ -55,10 +55,10 @@ extern SilcServerRouteTable silc_route_cache[SILC_SERVER_ROUTE_SIZE];
    `port' argument may be zero (0) if it doesn't exist.  This has been
    taken from Linux kernel's route cache code. */
 extern inline
-uint32 silc_server_route_hash(unsigned int addr, 
-                                   uint16 port)
+SilcUInt32 silc_server_route_hash(unsigned int addr, 
+                                   SilcUInt16 port)
 {
-  uint32 hash;
+  SilcUInt32 hash;
   
   hash = ((addr & 0xf0f0f0f0) >> 4) | ((addr & 0x0f0f0f0f) << 4);
   hash ^= port;
@@ -69,10 +69,10 @@ uint32 silc_server_route_hash(unsigned int addr,
 }
 
 /* Prototypes */
-void silc_server_route_add(uint32 index, unsigned int dest,
+void silc_server_route_add(SilcUInt32 index, unsigned int dest,
                           SilcServerEntry router);
-SilcServerEntry silc_server_route_check(uint32 dest, 
-                                       uint16 port);
+SilcServerEntry silc_server_route_check(SilcUInt32 dest, 
+                                       SilcUInt16 port);
 SilcSocketConnection silc_server_route_get(SilcServer server, void *id,
                                           SilcIdType id_type);
 
index fab3d975a72344ea6c0c22dc404a0e3c88f060a1..61b4c50dca6239703ae171a18615f6e65693a208 100644 (file)
@@ -845,7 +845,7 @@ SILC_TASK_CALLBACK(silc_server_connect_to_router_final)
   SilcBuffer packet;
   SilcServerHBContext hb_context;
   unsigned char *id_string;
-  uint32 id_len;
+  SilcUInt32 id_len;
   SilcIDListData idata;
   SilcServerConfigConnParams *param;
 
@@ -1284,8 +1284,8 @@ SILC_TASK_CALLBACK(silc_server_accept_new_connection_final)
   SilcServerHBContext hb_context;
   SilcUnknownEntry entry = (SilcUnknownEntry)sock->user_data;
   void *id_entry;
-  uint32 hearbeat_timeout = server->config->param.keepalive_secs;
-  uint32 num_sockets;
+  SilcUInt32 hearbeat_timeout = server->config->param.keepalive_secs;
+  SilcUInt32 num_sockets;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -1317,7 +1317,7 @@ SILC_TASK_CALLBACK(silc_server_accept_new_connection_final)
     {
       SilcClientEntry client;
       SilcServerConfigClient *conn = ctx->cconfig;
-      uint32 max_per_host = server->config->param.connections_max_per_host;
+      SilcUInt32 max_per_host = server->config->param.connections_max_per_host;
 
       /* Check for maximum connections limit */
       if (conn->param) {
@@ -1383,10 +1383,10 @@ SILC_TASK_CALLBACK(silc_server_accept_new_connection_final)
       bool backup_local = FALSE;
       bool backup_router = FALSE;
       char *backup_replace_ip = NULL;
-      uint16 backup_replace_port = 0;
+      SilcUInt16 backup_replace_port = 0;
       SilcServerConfigServer *sconn = ctx->sconfig;
       SilcServerConfigRouter *rconn = ctx->rconfig;
-      uint32 max_per_host = server->config->param.connections_max_per_host;
+      SilcUInt32 max_per_host = server->config->param.connections_max_per_host;
 
       if (ctx->conn_type == SILC_SOCKET_TYPE_ROUTER && rconn) {
        if (rconn->param) {
@@ -1562,7 +1562,7 @@ SILC_TASK_CALLBACK(silc_server_packet_process)
   SilcIDListData idata;
   SilcCipher cipher = NULL;
   SilcHmac hmac = NULL;
-  uint32 sequence = 0;
+  SilcUInt32 sequence = 0;
   int ret;
 
   if (!sock)
@@ -2288,7 +2288,7 @@ void silc_server_packet_parse_type(SilcServer server,
 /* Creates connection to a remote router. */
 
 void silc_server_create_connection(SilcServer server,
-                                  const char *remote_host, uint32 port)
+                                  const char *remote_host, SilcUInt32 port)
 {
   SilcServerConnection sconn;
 
@@ -3026,11 +3026,11 @@ SILC_TASK_CALLBACK(silc_server_channel_key_rekey)
 
 bool silc_server_create_channel_key(SilcServer server, 
                                    SilcChannelEntry channel,
-                                   uint32 key_len)
+                                   SilcUInt32 key_len)
 {
   int i;
   unsigned char channel_key[32], hash[32];
-  uint32 len;
+  SilcUInt32 len;
 
   SILC_LOG_DEBUG(("Generating channel key"));
 
@@ -3109,7 +3109,7 @@ SilcChannelEntry silc_server_save_channel_key(SilcServer server,
   SilcChannelKeyPayload payload = NULL;
   SilcChannelID *id = NULL;
   unsigned char *tmp, hash[32];
-  uint32 tmp_len;
+  SilcUInt32 tmp_len;
   char *cipher;
 
   SILC_LOG_DEBUG(("Start"));
@@ -3281,7 +3281,7 @@ static void silc_server_announce_get_servers(SilcServer server,
 }
 
 static SilcBuffer 
-silc_server_announce_encode_notify(SilcNotifyType notify, uint32 argc, ...)
+silc_server_announce_encode_notify(SilcNotifyType notify, SilcUInt32 argc, ...)
 {
   va_list ap;
   SilcBuffer p;
@@ -3531,7 +3531,7 @@ void silc_server_announce_get_channels(SilcServer server,
                                       SilcBuffer *channels,
                                       SilcBuffer *channel_users,
                                       SilcBuffer **channel_users_modes,
-                                      uint32 *channel_users_modes_c,
+                                      SilcUInt32 *channel_users_modes_c,
                                       SilcBuffer **channel_topics,
                                       SilcChannelID ***channel_ids,
                                       unsigned long creation_time)
@@ -3540,8 +3540,8 @@ void silc_server_announce_get_channels(SilcServer server,
   SilcIDCacheEntry id_cache;
   SilcChannelEntry channel;
   unsigned char *cid;
-  uint32 id_len;
-  uint16 name_len;
+  SilcUInt32 id_len;
+  SilcUInt16 name_len;
   int len;
   int i = *channel_users_modes_c;
   bool announce;
@@ -3628,7 +3628,7 @@ void silc_server_announce_channels(SilcServer server,
   SilcBuffer channels = NULL, channel_users = NULL;
   SilcBuffer *channel_users_modes = NULL;
   SilcBuffer *channel_topics = NULL;
-  uint32 channel_users_modes_c = 0;
+  SilcUInt32 channel_users_modes_c = 0;
   SilcChannelID **channel_ids = NULL;
 
   SILC_LOG_DEBUG(("Announcing channels and channel users"));
@@ -3750,14 +3750,14 @@ void silc_server_get_users_on_channel(SilcServer server,
                                      SilcChannelEntry channel,
                                      SilcBuffer *user_list,
                                      SilcBuffer *mode_list,
-                                     uint32 *user_count)
+                                     SilcUInt32 *user_count)
 {
   SilcChannelClientEntry chl;
   SilcHashTableList htl;
   SilcBuffer client_id_list;
   SilcBuffer client_mode_list;
   SilcBuffer idp;
-  uint32 list_count = 0, len = 0;
+  SilcUInt32 list_count = 0, len = 0;
 
   silc_hash_table_list(channel->user_list, &htl);
   while (silc_hash_table_get(&htl, NULL, (void *)&chl))
@@ -3803,11 +3803,11 @@ void silc_server_save_users_on_channel(SilcServer server,
                                       SilcClientID *noadd,
                                       SilcBuffer user_list,
                                       SilcBuffer mode_list,
-                                      uint32 user_count)
+                                      SilcUInt32 user_count)
 {
   int i;
-  uint16 idp_len;
-  uint32 mode;
+  SilcUInt16 idp_len;
+  SilcUInt32 mode;
   SilcClientID *client_id;
   SilcClientEntry client;
   SilcIDCacheEntry cache;
@@ -3894,7 +3894,7 @@ void silc_server_save_users_on_channel(SilcServer server,
 
 SilcSocketConnection silc_server_get_client_route(SilcServer server,
                                                  unsigned char *id_data,
-                                                 uint32 id_len,
+                                                 SilcUInt32 id_len,
                                                  SilcClientID *client_id,
                                                  SilcIDListData *idata)
 {
@@ -3979,8 +3979,8 @@ SilcBuffer silc_server_get_client_channel_list(SilcServer server,
   SilcChannelClientEntry chl;
   SilcHashTableList htl;
   unsigned char *cid;
-  uint32 id_len;
-  uint16 name_len;
+  SilcUInt32 id_len;
+  SilcUInt16 name_len;
   int len;
 
   silc_hash_table_list(client->channels, &htl);
index 9e626f5e3949bcdd4bf046bd8455a300e750b53b..d442bc033055c1df722d715ec245741dca8bff25 100644 (file)
@@ -53,8 +53,8 @@ typedef struct {
   void *param;
 
   /* Current connection retry info */
-  uint32 retry_count;
-  uint32 retry_timeout;
+  SilcUInt32 retry_count;
+  SilcUInt32 retry_timeout;
 
   /* Back pointer to server */
   SilcServer server;
@@ -127,7 +127,7 @@ void silc_server_packet_parse_type(SilcServer server,
                                   SilcSocketConnection sock,
                                   SilcPacketContext *packet);
 void silc_server_create_connection(SilcServer server,
-                                  const char *remote_host, uint32 port);
+                                  const char *remote_host, SilcUInt32 port);
 void silc_server_close_connection(SilcServer server,
                                  SilcSocketConnection sock);
 void silc_server_free_client_data(SilcServer server, 
@@ -167,7 +167,7 @@ silc_server_create_new_channel_with_id(SilcServer server,
                                       int broadcast);
 bool silc_server_create_channel_key(SilcServer server, 
                                    SilcChannelEntry channel,
-                                   uint32 key_len);
+                                   SilcUInt32 key_len);
 SilcChannelEntry silc_server_save_channel_key(SilcServer server,
                                              SilcBuffer key_payload,
                                              SilcChannelEntry channel);
@@ -185,7 +185,7 @@ void silc_server_announce_get_channels(SilcServer server,
                                       SilcBuffer *channels,
                                       SilcBuffer *channel_users,
                                       SilcBuffer **channel_users_modes,
-                                      uint32 *channel_users_modes_c,
+                                      SilcUInt32 *channel_users_modes_c,
                                       SilcBuffer **channel_topics,
                                       SilcChannelID ***channel_ids,
                                       unsigned long creation_time);
@@ -202,17 +202,17 @@ void silc_server_get_users_on_channel(SilcServer server,
                                      SilcChannelEntry channel,
                                      SilcBuffer *user_list,
                                      SilcBuffer *mode_list,
-                                     uint32 *user_count);
+                                     SilcUInt32 *user_count);
 void silc_server_save_users_on_channel(SilcServer server,
                                       SilcSocketConnection sock,
                                       SilcChannelEntry channel,
                                       SilcClientID *noadd,
                                       SilcBuffer user_list,
                                       SilcBuffer mode_list,
-                                      uint32 user_count);
+                                      SilcUInt32 user_count);
 SilcSocketConnection silc_server_get_client_route(SilcServer server,
                                                  unsigned char *id_data,
-                                                 uint32 id_len,
+                                                 SilcUInt32 id_len,
                                                  SilcClientID *client_id,
                                                  SilcIDListData *idata);
 SilcBuffer silc_server_get_client_channel_list(SilcServer server,
index 9591cade0aa9892a272b6cef4afd7a1e8674b2d8..5888909c6a1a63d3716a345c9d98d22f82a2b8d7 100644 (file)
@@ -27,7 +27,7 @@ SILC_TASK_CALLBACK(silc_server_protocol_backup_done);
 typedef struct {
   SilcServerEntry server;
   SilcIDIP ip;
-  uint16 port;
+  SilcUInt16 port;
   bool local;
 } SilcServerBackupEntry;
 
@@ -35,20 +35,20 @@ typedef struct {
    by backup router. */
 typedef struct {
   SilcIDIP ip;
-  uint16 port;
+  SilcUInt16 port;
   SilcServerEntry server;      /* Backup router that replaced the primary */
 } SilcServerBackupReplaced;
 
 /* Backup context */
 struct SilcServerBackupStruct {
   SilcServerBackupEntry *servers;
-  uint32 servers_count;
+  SilcUInt32 servers_count;
   SilcServerBackupReplaced **replaced;
-  uint32 replaced_count;
+  SilcUInt32 replaced_count;
 };
 
 typedef struct {
-  uint8 session;
+  SilcUInt8 session;
   bool connected;
   SilcServerEntry server_entry;
 } SilcServerBackupProtocolSession;
@@ -58,10 +58,10 @@ typedef struct {
   SilcServer server;
   SilcSocketConnection sock;
   bool responder;
-  uint8 type;
-  uint8 session;
+  SilcUInt8 type;
+  SilcUInt8 session;
   SilcServerBackupProtocolSession *sessions;
-  uint32 sessions_count;
+  SilcUInt32 sessions_count;
   long start;
 } *SilcServerBackupProtocolContext;
 
@@ -319,7 +319,7 @@ void silc_server_backup_send(SilcServer server,
                             SilcPacketType type,
                             SilcPacketFlags flags,
                             unsigned char *data,
-                            uint32 data_len,
+                            SilcUInt32 data_len,
                             bool force_send,
                             bool local)
 {
@@ -361,7 +361,7 @@ void silc_server_backup_send_dest(SilcServer server,
                                  void *dst_id,
                                  SilcIdType dst_id_type,
                                  unsigned char *data,
-                                 uint32 data_len,
+                                 SilcUInt32 data_len,
                                  bool force_send,
                                  bool local)
 {
@@ -400,7 +400,7 @@ void silc_server_backup_resume_router(SilcServer server,
                                      SilcSocketConnection sock, 
                                      SilcPacketContext *packet)
 {
-  uint8 type, session;
+  SilcUInt8 type, session;
   SilcServerBackupProtocolContext ctx;
   int i, ret;
 
@@ -544,7 +544,7 @@ SILC_TASK_CALLBACK(silc_server_backup_connect_to_router)
    connection is created. */
 
 void silc_server_backup_reconnect(SilcServer server,
-                                 const char *ip, uint16 port,
+                                 const char *ip, SilcUInt16 port,
                                  SilcServerConnectRouterCallback callback,
                                  void *context)
 {
@@ -682,7 +682,7 @@ SILC_TASK_CALLBACK(silc_server_backup_send_resumed)
 
    SILC_PACKET_RESUME_ROUTER:
 
-   <uint8 type> <uint8 Session ID>
+   <SilcUInt8 type> <SilcUInt8 Session ID>
 
    <type>          = the protocol opcode
    <Session ID>    = Identifier for this packet and any subsequent reply
index 57f6a05d001562df797b97c41b194023a556ed5c..d8a2ab3d10467c7fed46036bf74fb68d0660833a 100644 (file)
@@ -87,7 +87,7 @@ void silc_server_backup_send(SilcServer server,
                             SilcPacketType type,
                             SilcPacketFlags flags,
                             unsigned char *data,
-                            uint32 data_len,
+                            SilcUInt32 data_len,
                             bool force_send,
                             bool local);
 
@@ -102,7 +102,7 @@ void silc_server_backup_send_dest(SilcServer server,
                                  void *dst_id,
                                  SilcIdType dst_id_type,
                                  unsigned char *data,
-                                 uint32 data_len,
+                                 SilcUInt32 data_len,
                                  bool force_send,
                                  bool local);
 
@@ -117,7 +117,7 @@ void silc_server_backup_resume_router(SilcServer server,
    `ip' and `port'. The `connected' callback will be called when the
    connection is created. */
 void silc_server_backup_reconnect(SilcServer server,
-                                 const char *ip, uint16 port,
+                                 const char *ip, SilcUInt16 port,
                                  SilcServerConnectRouterCallback callback,
                                  void *context);
 
index f4f1d10ce21c0698b7fb1d9500d4fd7964c5238c..d35c5d8a09f3e60530ec30121c5d39d9c9eb3aae 100644 (file)
    various things. */
 typedef struct {
   /* Local stats (server and router) */
-  uint32 my_clients;             /* Locally connected clients */
-  uint32 my_servers;             /* Locally connected servers */
-  uint32 my_routers;             /* Locally connected routers */
-  uint32 my_channels;            /* Locally created channels */
-  uint32 my_chanclients;         /* Local clients on local channels */
-  uint32 my_aways;               /* Local clients away (XXX) */
-  uint32 my_server_ops;                  /* Local server operators */
-  uint32 my_router_ops;                  /* Local router operators */
+  SilcUInt32 my_clients;                 /* Locally connected clients */
+  SilcUInt32 my_servers;                 /* Locally connected servers */
+  SilcUInt32 my_routers;                 /* Locally connected routers */
+  SilcUInt32 my_channels;                /* Locally created channels */
+  SilcUInt32 my_chanclients;     /* Local clients on local channels */
+  SilcUInt32 my_aways;           /* Local clients away (XXX) */
+  SilcUInt32 my_server_ops;              /* Local server operators */
+  SilcUInt32 my_router_ops;              /* Local router operators */
 
   /* Global stats (mainly for router) */
-  uint32 cell_clients;           /* All clients in cell */
-  uint32 cell_servers;           /* All servers in cell */
-  uint32 cell_channels;                  /* All channels in cell */
-  uint32 cell_chanclients;       /* All clients on cell's channels */
-  uint32 clients;                /* All clients */
-  uint32 servers;                /* All servers */
-  uint32 routers;                /* All routers */
-  uint32 channels;               /* All channels */
-  uint32 chanclients;            /* All clients on channels */
-  uint32 server_ops;             /* All server operators */
-  uint32 router_ops;             /* All router operators */
+  SilcUInt32 cell_clients;               /* All clients in cell */
+  SilcUInt32 cell_servers;               /* All servers in cell */
+  SilcUInt32 cell_channels;              /* All channels in cell */
+  SilcUInt32 cell_chanclients;   /* All clients on cell's channels */
+  SilcUInt32 clients;            /* All clients */
+  SilcUInt32 servers;            /* All servers */
+  SilcUInt32 routers;            /* All routers */
+  SilcUInt32 channels;           /* All channels */
+  SilcUInt32 chanclients;                /* All clients on channels */
+  SilcUInt32 server_ops;                 /* All server operators */
+  SilcUInt32 router_ops;                 /* All router operators */
 
   /* General */
-  uint32 conn_attempts;                  /* Connection attempts */
-  uint32 conn_failures;                  /* Connection failure */
-  uint32 auth_attempts;                  /* Authentication attempts */
-  uint32 auth_failures;                  /* Authentication failures */
-  uint32 packets_sent;           /* Sent packets */
-  uint32 packets_received;       /* Received packets */
+  SilcUInt32 conn_attempts;              /* Connection attempts */
+  SilcUInt32 conn_failures;              /* Connection failure */
+  SilcUInt32 auth_attempts;              /* Authentication attempts */
+  SilcUInt32 auth_failures;              /* Authentication failures */
+  SilcUInt32 packets_sent;               /* Sent packets */
+  SilcUInt32 packets_received;   /* Received packets */
 } SilcServerStatistics;
 
 /* 
@@ -66,7 +66,7 @@ struct SilcServerStruct {
   int sock;
   SilcServerID *id;
   unsigned char *id_string;
-  uint32 id_string_len;
+  SilcUInt32 id_string_len;
   SilcIdType id_type;
 
   bool standalone;                  /* TRUE if server is standalone, and
@@ -84,7 +84,7 @@ struct SilcServerStruct {
                                       primary router, and NULL otherwise. */
 
   /* Current command identifier, 0 not used */
-  uint16 cmd_ident;
+  SilcUInt16 cmd_ident;
 
   /* SILC server scheduler */
   SilcSchedule schedule;
@@ -138,7 +138,7 @@ typedef struct {
 typedef struct {
   SilcServer server;
   SilcSocketConnection sock;
-  uint32 failure;
+  SilcUInt32 failure;
 } *SilcServerFailureContext;
 
 /* Macros */
index 0827924c29b6d5f3bace247a525e45a8162cbc27..7e83c5fc1947e8662d67a7441daf4d18f6a5d14f 100644 (file)
@@ -144,9 +144,9 @@ bool silc_server_remove_clients_by_server(SilcServer server,
   SilcClientEntry client = NULL;
   SilcBuffer idp;
   SilcClientEntry *clients = NULL;
-  uint32 clients_c = 0;
+  SilcUInt32 clients_c = 0;
   unsigned char **argv = NULL;
-  uint32 *argv_lens = NULL, *argv_types = NULL, argc = 0;
+  SilcUInt32 *argv_lens = NULL, *argv_types = NULL, argc = 0;
   SilcHashTableList htl;
   SilcChannelEntry channel;
   SilcHashTable channels;
@@ -753,7 +753,7 @@ bool silc_server_client_on_channel(SilcClientEntry client,
 
 /* Checks string for bad characters and returns TRUE if they are found. */
 
-bool silc_server_name_bad_chars(const char *name, uint32 name_len)
+bool silc_server_name_bad_chars(const char *name, SilcUInt32 name_len)
 {
   int i;
 
@@ -773,7 +773,7 @@ bool silc_server_name_bad_chars(const char *name, uint32 name_len)
 /* Modifies the `name' if it includes bad characters and returns new
    allocated name that does not include bad characters. */
 
-char *silc_server_name_modify_bad(const char *name, uint32 name_len)
+char *silc_server_name_modify_bad(const char *name, SilcUInt32 name_len)
 {
   int i;
   char *newname = strdup(name);
@@ -793,7 +793,7 @@ char *silc_server_name_modify_bad(const char *name, uint32 name_len)
 /* Find number of sockets by IP address indicated by `ip'. Returns 0 if
    socket connections with the IP address does not exist. */
 
-uint32 silc_server_num_sockets_by_ip(SilcServer server, const char *ip)
+SilcUInt32 silc_server_num_sockets_by_ip(SilcServer server, const char *ip)
 {
   int i, count;
 
index 665647f062967b17093f119555fc77e1d461c624..b7e040451df8ed31cc705a83aaf50f1013f3d9e3 100644 (file)
@@ -75,14 +75,14 @@ bool silc_server_client_on_channel(SilcClientEntry client,
                                   SilcChannelEntry channel);
 
 /* Checks string for bad characters and returns TRUE if they are found. */
-bool silc_server_name_bad_chars(const char *name, uint32 name_len);
+bool silc_server_name_bad_chars(const char *name, SilcUInt32 name_len);
 
 /* Modifies the `nick' if it includes bad characters and returns new
    allocated nickname that does not include bad characters. */
-char *silc_server_name_modify_bad(const char *name, uint32 name_len);
+char *silc_server_name_modify_bad(const char *name, SilcUInt32 name_len);
 
 /* Find number of sockets by IP address indicated by `ip'. Returns 0 if
    socket connections with the IP address does not exist. */
-uint32 silc_server_num_sockets_by_ip(SilcServer server, const char *ip);
+SilcUInt32 silc_server_num_sockets_by_ip(SilcServer server, const char *ip);
 
 #endif /* SERVER_UTIL_H */
index 7177c103d8fd65cd230ac53fd730dc00f35c6eb3..09fde6070f8fdab3de3aa6accfd0e64efb627e97 100644 (file)
@@ -90,7 +90,7 @@ my_set_param_defaults(SilcServerConfigConnParams *params,
 
 /* Find connection parameters by the parameter block name. */
 static SilcServerConfigConnParams *
-my_find_param(SilcServerConfig config, const char *name, uint32 line)
+my_find_param(SilcServerConfig config, const char *name, SilcUInt32 line)
 {
   SilcServerConfigConnParams *param;
 
@@ -106,15 +106,15 @@ my_find_param(SilcServerConfig config, const char *name, uint32 line)
 }
 
 /* parse an authdata according to its auth method */
-static bool my_parse_authdata(SilcAuthMethod auth_meth, char *p, uint32 line,
-                             void **auth_data, uint32 *auth_data_len)
+static bool my_parse_authdata(SilcAuthMethod auth_meth, char *p, SilcUInt32 line,
+                             void **auth_data, SilcUInt32 *auth_data_len)
 {
   if (auth_meth == SILC_AUTH_PASSWORD) {
     /* p is a plain text password */
     if (auth_data)
       *auth_data = (void *) strdup(p);
     if (auth_data_len)
-      *auth_data_len = (uint32) strlen(p);
+      *auth_data_len = (SilcUInt32) strlen(p);
   } else if (auth_meth == SILC_AUTH_PUBLIC_KEY) {
     /* p is a public key */
     SilcPublicKey public_key;
@@ -155,40 +155,40 @@ SILC_CONFIG_CALLBACK(fetch_generic)
     config->require_reverse_lookup = *(bool *)val;
   }
   else if (!strcmp(name, "connections_max")) {
-    config->param.connections_max = (uint32) *(int *)val;
+    config->param.connections_max = (SilcUInt32) *(int *)val;
   }
   else if (!strcmp(name, "connections_max_per_host")) {
-    config->param.connections_max_per_host = (uint32) *(int *)val;
+    config->param.connections_max_per_host = (SilcUInt32) *(int *)val;
   }
   else if (!strcmp(name, "keepalive_secs")) {
-    config->param.keepalive_secs = (uint32) *(int *)val;
+    config->param.keepalive_secs = (SilcUInt32) *(int *)val;
   }
   else if (!strcmp(name, "reconnect_count")) {
-    config->param.reconnect_count = (uint32) *(int *)val;
+    config->param.reconnect_count = (SilcUInt32) *(int *)val;
   }
   else if (!strcmp(name, "reconnect_interval")) {
-    config->param.reconnect_interval = (uint32) *(int *)val;
+    config->param.reconnect_interval = (SilcUInt32) *(int *)val;
   }
   else if (!strcmp(name, "reconnect_interval_max")) {
-    config->param.reconnect_interval_max = (uint32) *(int *)val;
+    config->param.reconnect_interval_max = (SilcUInt32) *(int *)val;
   }
   else if (!strcmp(name, "reconnect_keep_trying")) {
     config->param.reconnect_keep_trying = *(bool *)val;
   }
   else if (!strcmp(name, "key_exchange_rekey")) {
-    config->param.key_exchange_rekey = (uint32) *(int *)val;
+    config->param.key_exchange_rekey = (SilcUInt32) *(int *)val;
   }
   else if (!strcmp(name, "key_exchange_pfs")) {
     config->param.key_exchange_pfs = *(bool *)val;
   }
   else if (!strcmp(name, "channel_rekey_secs")) {
-    config->channel_rekey_secs = (uint32) *(int *)val;
+    config->channel_rekey_secs = (SilcUInt32) *(int *)val;
   }
   else if (!strcmp(name, "key_exchange_timeout")) {
-    config->key_exchange_timeout = (uint32) *(int *)val;
+    config->key_exchange_timeout = (SilcUInt32) *(int *)val;
   }
   else if (!strcmp(name, "conn_auth_timeout")) {
-    config->conn_auth_timeout = (uint32) *(int *)val;
+    config->conn_auth_timeout = (SilcUInt32) *(int *)val;
   }
   else
     return SILC_CONFIG_EINTERNAL;
@@ -234,10 +234,10 @@ SILC_CONFIG_CALLBACK(fetch_cipher)
     tmp->module = (*(char *)val ? strdup((char *) val) : NULL);
   }
   else if (!strcmp(name, "keylength")) {
-    tmp->key_length = *(uint32 *)val;
+    tmp->key_length = *(SilcUInt32 *)val;
   }
   else if (!strcmp(name, "blocklength")) {
-    tmp->block_length = *(uint32 *)val;
+    tmp->block_length = *(SilcUInt32 *)val;
   }
   else
     return SILC_CONFIG_EINTERNAL;
@@ -423,7 +423,7 @@ SILC_CONFIG_CALLBACK(fetch_serverinfo)
       fprintf(stderr, "Invalid port number!\n");
       return SILC_CONFIG_ESILENT;
     }
-    server_info->port = (uint16) port;
+    server_info->port = (SilcUInt16) port;
   }
   else if (!strcmp(name, "servertype")) {
     CONFIG_IS_DOUBLE(server_info->server_type);
@@ -539,7 +539,7 @@ SILC_CONFIG_CALLBACK(fetch_logging)
       config->tmp = silc_calloc(1, sizeof(*tmp));
       tmp = (SilcServerConfigLogging *) config->tmp;
     }
-    tmp->maxsize = *(uint32 *) val;
+    tmp->maxsize = *(SilcUInt32 *) val;
   }
   else
     return SILC_CONFIG_EINTERNAL;
@@ -587,28 +587,28 @@ SILC_CONFIG_CALLBACK(fetch_connparam)
     tmp->name = (*(char *)val ? strdup((char *) val) : NULL);
   }
   else if (!strcmp(name, "connections_max")) {
-    tmp->connections_max = *(uint32 *)val;
+    tmp->connections_max = *(SilcUInt32 *)val;
   }
   else if (!strcmp(name, "connections_max_per_host")) {
-    tmp->connections_max_per_host = *(uint32 *)val;
+    tmp->connections_max_per_host = *(SilcUInt32 *)val;
   }
   else if (!strcmp(name, "keepalive_secs")) {
-    tmp->keepalive_secs = *(uint32 *)val;
+    tmp->keepalive_secs = *(SilcUInt32 *)val;
   }
   else if (!strcmp(name, "reconnect_count")) {
-    tmp->reconnect_count = *(uint32 *)val;
+    tmp->reconnect_count = *(SilcUInt32 *)val;
   }
   else if (!strcmp(name, "reconnect_interval")) {
-    tmp->reconnect_interval = *(uint32 *)val;
+    tmp->reconnect_interval = *(SilcUInt32 *)val;
   }
   else if (!strcmp(name, "reconnect_interval_max")) {
-    tmp->reconnect_interval_max = *(uint32 *)val;
+    tmp->reconnect_interval_max = *(SilcUInt32 *)val;
   }
   else if (!strcmp(name, "reconnect_keep_trying")) {
     tmp->reconnect_keep_trying = *(bool *)val;
   }
   else if (!strcmp(name, "key_exchange_rekey")) {
-    tmp->key_exchange_rekey = *(uint32 *)val;
+    tmp->key_exchange_rekey = *(SilcUInt32 *)val;
   }
   else if (!strcmp(name, "key_exchange_pfs")) {
     tmp->key_exchange_pfs = *(bool *)val;
@@ -902,7 +902,7 @@ SILC_CONFIG_CALLBACK(fetch_router)
       fprintf(stderr, "Invalid port number!\n");
       return SILC_CONFIG_ESILENT;
     }
-    tmp->port = (uint16) port;
+    tmp->port = (SilcUInt16) port;
   }
   else if (!strcmp(name, "passphrase")) {
     if (!my_parse_authdata(SILC_AUTH_PASSWORD, (char *) val, line,
@@ -945,7 +945,7 @@ SILC_CONFIG_CALLBACK(fetch_router)
       fprintf(stderr, "Invalid port number!\n");
       return SILC_CONFIG_ESILENT;
     }
-    tmp->backup_replace_port = (uint16) port;
+    tmp->backup_replace_port = (SilcUInt16) port;
   }
   else if (!strcmp(name, "backuplocal")) {
     tmp->backup_local = *(bool *)val;
@@ -1163,7 +1163,7 @@ SilcServerConfig silc_server_config_alloc(char *filename)
     /* handle this special error return which asks to quietly return */
     if (ret != SILC_CONFIG_ESILENT) {
       char *linebuf, *filename = silc_config_get_filename(file);
-      uint32 line = silc_config_get_line(file);
+      SilcUInt32 line = silc_config_get_line(file);
       fprintf(stderr, "\nError while parsing config file: %s.\n",
                silc_config_strerror(ret));
       linebuf = silc_config_read_line(file, line);
index f06ab5796bab5d0fe8213d6824c7a457ec15e372..c4190e36dffcfc070d4c1b8a6ee7baa99a13c50e 100644 (file)
 typedef struct SilcServerConfigCipherStruct {
   char *name;
   char *module;
-  uint32 key_length;
-  uint32 block_length;
+  SilcUInt32 key_length;
+  SilcUInt32 block_length;
   struct SilcServerConfigCipherStruct *next;
 } SilcServerConfigCipher;
 
 typedef struct SilcServerConfigHashStruct {
   char *name;
   char *module;
-  uint32 block_length;
-  uint32 digest_length;
+  SilcUInt32 block_length;
+  SilcUInt32 digest_length;
   struct SilcServerConfigHashStruct *next;
 } SilcServerConfigHash;
 
 typedef struct SilcServerConfigHmacStruct {
   char *name;
   char *hash;
-  uint32 mac_length;
+  SilcUInt32 mac_length;
   struct SilcServerConfigHmacStruct *next;
 } SilcServerConfigHmac;
 
@@ -52,7 +52,7 @@ typedef struct SilcServerConfigPkcsStruct {
 typedef struct SilcServerConfigServerInfoStruct {
   char *server_name;
   char *server_ip;
-  uint16 port;
+  SilcUInt16 port;
   char *server_type;   /* E.g. "Test Server" */
   char *location;      /* geographic location */
   char *admin;         /* admin full name */
@@ -67,20 +67,20 @@ typedef struct SilcServerConfigServerInfoStruct {
 
 typedef struct SilcServerConfigLoggingStruct {
   char *file;
-  uint32 maxsize;
+  SilcUInt32 maxsize;
 } SilcServerConfigLogging;
 
 /* Connection parameters */
 typedef struct SilcServerConfigConnParams {
   char *name;
-  uint32 connections_max;
-  uint32 connections_max_per_host;
-  uint32 keepalive_secs;
-  uint32 reconnect_count;
-  uint32 reconnect_interval;
-  uint32 reconnect_interval_max;
+  SilcUInt32 connections_max;
+  SilcUInt32 connections_max_per_host;
+  SilcUInt32 keepalive_secs;
+  SilcUInt32 reconnect_count;
+  SilcUInt32 reconnect_interval;
+  SilcUInt32 reconnect_interval_max;
   bool reconnect_keep_trying;
-  uint32 key_exchange_rekey;
+  SilcUInt32 key_exchange_rekey;
   bool key_exchange_pfs;
   struct SilcServerConfigConnParams *next;
 } SilcServerConfigConnParams;
@@ -89,7 +89,7 @@ typedef struct SilcServerConfigConnParams {
 typedef struct SilcServerConfigClientStruct {
   char *host;
   unsigned char *passphrase;
-  uint32 passphrase_len;
+  SilcUInt32 passphrase_len;
   void *publickey;
   SilcServerConfigConnParams *param;
   struct SilcServerConfigClientStruct *next;
@@ -101,7 +101,7 @@ typedef struct SilcServerConfigAdminStruct {
   char *user;
   char *nick;
   unsigned char *passphrase;
-  uint32 passphrase_len;
+  SilcUInt32 passphrase_len;
   void *publickey;
   struct SilcServerConfigAdminStruct *next;
 } SilcServerConfigAdmin;
@@ -117,7 +117,7 @@ typedef struct SilcServerConfigDenyStruct {
 typedef struct SilcServerConfigServerStruct {
   char *host;
   unsigned char *passphrase;
-  uint32 passphrase_len;
+  SilcUInt32 passphrase_len;
   void *publickey;
   char *version;
   SilcServerConfigConnParams *param;
@@ -129,15 +129,15 @@ typedef struct SilcServerConfigServerStruct {
 typedef struct SilcServerConfigRouterStruct {
   char *host;
   unsigned char *passphrase;
-  uint32 passphrase_len;
+  SilcUInt32 passphrase_len;
   void *publickey;
-  uint16 port;
+  SilcUInt16 port;
   char *version;
   SilcServerConfigConnParams *param;
   bool initiator;
   bool backup_router;
   char *backup_replace_ip;
-  uint16 backup_replace_port;
+  SilcUInt16 backup_replace_port;
   bool backup_local;
   struct SilcServerConfigRouterStruct *next;
 } SilcServerConfigRouter;
@@ -150,9 +150,9 @@ typedef struct {
   char *module_path;
   bool prefer_passphrase_auth;
   bool require_reverse_lookup;
-  uint32 channel_rekey_secs;
-  uint32 key_exchange_timeout;
-  uint32 conn_auth_timeout;
+  SilcUInt32 channel_rekey_secs;
+  SilcUInt32 key_exchange_timeout;
+  SilcUInt32 conn_auth_timeout;
   SilcServerConfigConnParams param;
 
   /* Other configuration sections */
index 05cf1b35757d845041819ac146d5a2e0b7b29628..3f2c65914e37cb678f0ac783fd9a4c8de57fc762 100644 (file)
@@ -25,7 +25,7 @@
 /* Creates a Server ID. Newly created Server ID is returned to the
    new_id argument. */
 
-void silc_id_create_server_id(const char *ip, uint16 port, SilcRng rng, 
+void silc_id_create_server_id(const char *ip, SilcUInt16 port, SilcRng rng, 
                              SilcServerID **new_id)
 {
   SILC_LOG_DEBUG(("Creating new Server ID"));
index 9873ec2d67fcec8bde8d70e2ffdd0ca4110efc65..2beb4b64ed0ffd7dd5202aba210e2c007586f8a2 100644 (file)
@@ -22,7 +22,7 @@
 #define SERVERID_H
 
 /* Prototypes */
-void silc_id_create_server_id(const char *ip, uint16 port, SilcRng rng, 
+void silc_id_create_server_id(const char *ip, SilcUInt16 port, SilcRng rng, 
                              SilcServerID **new_id);
 bool silc_id_create_client_id(SilcServer server,
                              SilcServerID *server_id, SilcRng rng,
index 60055417f6d5a1ceda314b6f39eed0f3716f2ee6..84e35dc4aab629b45a250e625db6410b121e3b25 100644 (file)
@@ -107,7 +107,7 @@ static void silc_server_checkpid(SilcServer silcd)
   if (silcd->config->server_info->pid_file) {
     int oldpid;
     char *buf;
-    uint32 buf_len;
+    SilcUInt32 buf_len;
 
     SILC_LOG_DEBUG(("Checking for another silcd running"));
     buf = silc_file_readfile(silcd->config->server_info->pid_file, &buf_len);
@@ -329,7 +329,7 @@ silc_server_create_key_pair(char *pkcs_name, int bits, char *path,
   SilcPrivateKey prv_key;
   SilcRng rng;
   unsigned char *key;
-  uint32 key_len;
+  SilcUInt32 key_len;
   char pkfile[256], prvfile[256];
 
   if (!pkcs_name || !path)
index b7627bf611cd01abe9da98f7a5d8aed68599690f..3c4593007480fb49669d2fc144fb6d43be8d5e85 100644 (file)
@@ -698,14 +698,14 @@ _nl_find_msg (domain_file, domainbinding, msgid, lengthp)
   if (domain->hash_size > 2 && domain->hash_tab != NULL)
     {
       /* Use the hashing table.  */
-      nls_uint32 len = strlen (msgid);
-      nls_uint32 hash_val = hash_string (msgid);
-      nls_uint32 idx = hash_val % domain->hash_size;
-      nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
+      nls_SilcUInt32 len = strlen (msgid);
+      nls_SilcUInt32 hash_val = hash_string (msgid);
+      nls_SilcUInt32 idx = hash_val % domain->hash_size;
+      nls_SilcUInt32 incr = 1 + (hash_val % (domain->hash_size - 2));
 
       while (1)
        {
-         nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
+         nls_SilcUInt32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
 
          if (nstr == 0)
            /* Hash table entry is empty.  */
index eb5889074a460c9a6b7724136b9e7d6208830729..0c9a102e9db31577026dcb01ef0f85b6edbabe66 100644 (file)
 #endif
 
 #if UINT_MAX == UINT_MAX_32_BITS
-typedef unsigned nls_uint32;
+typedef unsigned nls_SilcUInt32;
 #else
 # if USHRT_MAX == UINT_MAX_32_BITS
-typedef unsigned short nls_uint32;
+typedef unsigned short nls_SilcUInt32;
 # else
 #  if ULONG_MAX == UINT_MAX_32_BITS
-typedef unsigned long nls_uint32;
+typedef unsigned long nls_SilcUInt32;
 #  else
   /* The following line is intended to throw an error.  Using #error is
      not portable enough.  */
@@ -73,27 +73,27 @@ typedef unsigned long nls_uint32;
 struct mo_file_header
 {
   /* The magic number.  */
-  nls_uint32 magic;
+  nls_SilcUInt32 magic;
   /* The revision number of the file format.  */
-  nls_uint32 revision;
+  nls_SilcUInt32 revision;
   /* The number of strings pairs.  */
-  nls_uint32 nstrings;
+  nls_SilcUInt32 nstrings;
   /* Offset of table with start offsets of original strings.  */
-  nls_uint32 orig_tab_offset;
+  nls_SilcUInt32 orig_tab_offset;
   /* Offset of table with start offsets of translation strings.  */
-  nls_uint32 trans_tab_offset;
+  nls_SilcUInt32 trans_tab_offset;
   /* Size of hashing table.  */
-  nls_uint32 hash_tab_size;
+  nls_SilcUInt32 hash_tab_size;
   /* Offset of first hashing entry.  */
-  nls_uint32 hash_tab_offset;
+  nls_SilcUInt32 hash_tab_offset;
 };
 
 struct string_desc
 {
   /* Length of addressed string.  */
-  nls_uint32 length;
+  nls_SilcUInt32 length;
   /* Offset of string in file.  */
-  nls_uint32 offset;
+  nls_SilcUInt32 offset;
 };
 
 /* @@ begin of epilog @@ */
index ee8ca48e95a2a61956a34c87cdb0913ab434af10..bd54d7cb3713f824cf76b39c1ffecd0efb97f799 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "loadinfo.h"
 
-#include "gettext.h"           /* Get nls_uint32.  */
+#include "gettext.h"           /* Get nls_SilcUInt32.  */
 
 /* @@ end of prolog @@ */
 
@@ -62,9 +62,9 @@
 # include <byteswap.h>
 # define SWAP(i) bswap_32 (i)
 #else
-static inline nls_uint32
+static inline nls_SilcUInt32
 SWAP (i)
-     nls_uint32 i;
+     nls_SilcUInt32 i;
 {
   return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
 }
@@ -123,11 +123,11 @@ struct loaded_domain
   int use_mmap;
   size_t mmap_size;
   int must_swap;
-  nls_uint32 nstrings;
+  nls_SilcUInt32 nstrings;
   struct string_desc *orig_tab;
   struct string_desc *trans_tab;
-  nls_uint32 hash_size;
-  nls_uint32 *hash_tab;
+  nls_SilcUInt32 hash_size;
+  nls_SilcUInt32 *hash_tab;
   int codeset_cntr;
 #ifdef _LIBC
   __gconv_t conv;
index d589243b20ecd34da8fab8edbb5c4504ab65b1ae..61321d5fabdadd29d3e8d01e215da68ff4df761c 100644 (file)
@@ -468,7 +468,7 @@ _nl_load_domain (domain_file, domainbinding)
       domain->trans_tab = (struct string_desc *)
        ((char *) data + W (domain->must_swap, data->trans_tab_offset));
       domain->hash_size = W (domain->must_swap, data->hash_tab_size);
-      domain->hash_tab = (nls_uint32 *)
+      domain->hash_tab = (nls_SilcUInt32 *)
        ((char *) data + W (domain->must_swap, data->hash_tab_offset));
       break;
     default:
index fb3dd9359bd53fc959b7c7cd3035903019f39f47..176b3de786a8a0c21f6570906f242fb1da64e810 100644 (file)
@@ -112,9 +112,9 @@ gint SilcerMainDlg::InputBoxKeyPress(GdkEventKey *key)
       SilcClientCommand cmd;
       SilcClientCommandContext ctx;
       char *tmpcmd;
-      uint32 argc = 0;
+      SilcUInt32 argc = 0;
       unsigned char **argv;
-      uint32 *argv_lens, *argv_types;
+      SilcUInt32 *argv_lens, *argv_types;
 
       // Parse arguments
       tmpcmd = parse_command(msg.c_str());
index 883c364839c4fac646c0403987433e7a0abdf9bb..e04ee1d629efe91a7bd649665508841140099634 100644 (file)
@@ -48,7 +48,7 @@ silc_create_key_pair(char *pkcs_name, int bits, char *path,
   SilcPrivateKey prv_key;
   SilcRng rng;
   unsigned char *key;
-  uint32 key_len;
+  SilcUInt32 key_len;
   char pkfile[256], prvfile[256];
 
   if (!pkcs_name || !path)
@@ -144,7 +144,7 @@ void silc_disconnect(SilcClient client, SilcClientConnection conn)
 static
 void silc_auth_meth(SilcClient client, 
                    SilcClientConnection conn,
-                   char *hostname, uint16 port,
+                   char *hostname, SilcUInt16 port,
                    SilcGetAuthMeth completion, void *context)
 {
   completion(TRUE, SILC_AUTH_NONE, NULL, 0, context);
@@ -153,7 +153,7 @@ void silc_auth_meth(SilcClient client,
 static
 void silc_verify_public_key(SilcClient client, SilcClientConnection conn,
                            SilcSocketType conn_type, unsigned char *pk, 
-                           uint32 pk_len, SilcSKEPKType pk_type,
+                           SilcUInt32 pk_len, SilcSKEPKType pk_type,
                            SilcVerifyPublicKey completion, void *context)
 {
   completion(TRUE, context);
index 5ada690b3728de6819add7b436382c14809de56e..4d3dfd50d46fe41279675324d0bce2c6e1c4ff3b 100644 (file)
 #ifndef BITMOVE_H
 #define BITMOVE_H
 
-#define GET_WORD(cp) ((uint32)(uint8)(cp)[0]) << 24    \
-                   | ((uint32)(uint8)(cp)[1] << 16)    \
-                   | ((uint32)(uint8)(cp)[2] << 8)     \
-                   | ((uint32)(uint8)(cp)[3])
+#define GET_WORD(cp) ((SilcUInt32)(SilcUInt8)(cp)[0]) << 24    \
+                   | ((SilcUInt32)(SilcUInt8)(cp)[1] << 16)    \
+                   | ((SilcUInt32)(SilcUInt8)(cp)[2] << 8)     \
+                   | ((SilcUInt32)(SilcUInt8)(cp)[3])
 
 /* Returns eight 8-bit bytes, most significant bytes first. */
 #define SILC_GET64_MSB(l, cp)                  \
-       (l) = ((((uint64)GET_WORD((cp))) << 32) |       \
-             ((uint64)GET_WORD((cp) + 4)))
+       (l) = ((((SilcUInt64)GET_WORD((cp))) << 32) |   \
+             ((SilcUInt64)GET_WORD((cp) + 4)))
 #define SILC_PUT64_MSB(l, cp)                          \
 do {                                                   \
-  SILC_PUT32_MSB((uint32)((uint64)(l) >> 32), (cp));   \
-  SILC_PUT32_MSB((uint32)(l), (cp) + 4);               \
+  SILC_PUT32_MSB((SilcUInt32)((SilcUInt64)(l) >> 32), (cp));   \
+  SILC_PUT32_MSB((SilcUInt32)(l), (cp) + 4);           \
 } while(0)
 
 
 /* Returns four 8-bit bytes, most significant bytes first. */
 #define SILC_GET32_MSB(l, cp)                  \
-       (l) = ((uint32)(uint8)(cp)[0]) << 24    \
-           | ((uint32)(uint8)(cp)[1] << 16)    \
-           | ((uint32)(uint8)(cp)[2] << 8)     \
-           | ((uint32)(uint8)(cp)[3])
+       (l) = ((SilcUInt32)(SilcUInt8)(cp)[0]) << 24    \
+           | ((SilcUInt32)(SilcUInt8)(cp)[1] << 16)    \
+           | ((SilcUInt32)(SilcUInt8)(cp)[2] << 8)     \
+           | ((SilcUInt32)(SilcUInt8)(cp)[3])
 #define SILC_PUT32_MSB(l, cp)                  \
        (cp)[0] = l >> 24;                      \
        (cp)[1] = l >> 16;                      \
@@ -51,16 +51,16 @@ do {                                                        \
 
 /* Returns four 8-bit bytes, less significant bytes first. */
 #define SILC_GET32_LSB(l, cp)                  \
-       (l) = ((uint32)(uint8)(cp)[0])          \
-           | ((uint32)(uint8)(cp)[1] << 8)     \
-           | ((uint32)(uint8)(cp)[2] << 16)    \
-           | ((uint32)(uint8)(cp)[3] << 24)
+       (l) = ((SilcUInt32)(SilcUInt8)(cp)[0])          \
+           | ((SilcUInt32)(SilcUInt8)(cp)[1] << 8)     \
+           | ((SilcUInt32)(SilcUInt8)(cp)[2] << 16)    \
+           | ((SilcUInt32)(SilcUInt8)(cp)[3] << 24)
 /* same as upper but XOR the result always */
 #define SILC_GET32_X_LSB(l, cp)                        \
-       (l) ^= ((uint32)(uint8)(cp)[0])         \
-           | ((uint32)(uint8)(cp)[1] << 8)     \
-           | ((uint32)(uint8)(cp)[2] << 16)    \
-           | ((uint32)(uint8)(cp)[3] << 24)
+       (l) ^= ((SilcUInt32)(SilcUInt8)(cp)[0])         \
+           | ((SilcUInt32)(SilcUInt8)(cp)[1] << 8)     \
+           | ((SilcUInt32)(SilcUInt8)(cp)[2] << 16)    \
+           | ((SilcUInt32)(SilcUInt8)(cp)[3] << 24)
 #define SILC_PUT32_LSB(l, cp)                  \
        (cp)[0] = l;                            \
        (cp)[1] = l >> 8;                       \
@@ -70,16 +70,16 @@ do {                                                        \
 
 /* Returns two 8-bit bytes, most significant bytes first. */
 #define SILC_GET16_MSB(l, cp)                  \
-       (l) = ((uint32)(uint8)(cp)[0] << 8)     \
-           | ((uint32)(uint8)(cp)[1])
+       (l) = ((SilcUInt32)(SilcUInt8)(cp)[0] << 8)     \
+           | ((SilcUInt32)(SilcUInt8)(cp)[1])
 #define SILC_PUT16_MSB(l, cp)                  \
        (cp)[0] = l >> 8;                       \
        (cp)[1] = l;
 
 /* Returns two 8-bit bytes, less significant bytes first. */
 #define SILC_GET16_LSB(l, cp)                  \
-       (l) = ((uint32)(uint8)(cp)[0])          \
-           | ((uint32)(uint8)(cp)[1] << 8)
+       (l) = ((SilcUInt32)(SilcUInt8)(cp)[0])          \
+           | ((SilcUInt32)(SilcUInt8)(cp)[1] << 8)
 #define SILC_PUT16_LSB(l, cp)                  \
        (cp)[0] = l;                            \
        (cp)[1] = l >> 8;
index 65bd6a07a40a013b07088de7fcc8bfb514478009..ebdea361e518c19f7ca92cc220efbf88c60b6410 100644 (file)
@@ -205,62 +205,54 @@ extern "C" {
 #endif
 
 /* Define types. The types must be at least of the specified size */
-#undef uint8
-#undef uint16
-#undef uint32
-#undef uin64
-#undef int8
-#undef int16
-#undef int32
-#undef int64
-
-typedef unsigned char uint8;
-typedef signed char int8;
+
+typedef unsigned char SilcUInt8;
+typedef signed char SilcInt8;
 
 #if SILC_SIZEOF_SHORT > 2
 #error "size of the short must be 2 bytes"
 #endif
 
-typedef unsigned short uint16;
-typedef signed short int16;
+typedef unsigned short SilcUInt16;
+typedef signed short SilcInt16;
 
 #if SILC_SIZEOF_LONG == 4
-typedef unsigned long uint32;
-typedef signed long int32;
+typedef unsigned long SilcUInt32;
+typedef signed long SilcInt32;
 #else
 #if SILC_SIZEOF_INT == 4
-typedef unsigned long uint32;
-typedef signed long int32;
+typedef unsigned int SilcUInt32;
+typedef signed int SilcInt32;
 #else
 #if SILC_SIZEOF_LONG_LONG >= 4
 #ifndef WIN32
-typedef unsigned long long uint32;
-typedef signed long long int32;
+typedef unsigned long long SilcUInt32;
+typedef signed long long SilcInt32;
 #endif
 #endif
 #endif
 #endif
 
 #if SILC_SIZEOF_LONG >= 8
-typedef unsigned long uint64;
-typedef signed long int64;
+typedef unsigned long SilcUInt64;
+typedef signed long SilcInt64;
 #else
 #if SILC_SIZEOF_LONG_LONG >= 8
 #ifndef WIN32
-typedef unsigned long long uint64;
-typedef signed long long int64;
+typedef unsigned long long SilcUInt64;
+typedef signed long long SilcInt64;
 #else
-typedef uint32 uint64; /* XXX Use Windows's own 64 bit types */
-typedef int32 int64;
+typedef SilcUInt32 SilcUInt64; /* XXX Use Windows's own 64 bit types */
+typedef SilcInt32 SilcInt64;
 #endif
 #else
-typedef uint32 uint64;
-typedef int32 int64;
+typedef SilcUInt32 SilcUInt64;
+typedef SilcInt32 SilcInt64;
 #endif
 #endif
 
 #if SILC_SIZEOF_VOID_P < 4
-typedef uint32 * void *;
+typedef SilcUInt32 * void *;
 #endif
 
 #ifndef __cplusplus
index b797a8a88fe0349d5c9a8d4ce1fc4a6197de08a4..af4de6513b719cd065905a6c275af92d8381c40c 100644 (file)
@@ -37,7 +37,7 @@ static void silc_client_packet_parse_type(SilcClient client,
 void silc_client_resolve_auth_method(bool success,
                                     SilcProtocolAuthMeth auth_meth,
                                     const unsigned char *auth_data,
-                                    uint32 auth_data_len, void *context);
+                                    SilcUInt32 auth_data_len, void *context);
 
 /* Allocates new client object. This has to be done before client may
    work. After calling this one must call silc_client_init to initialize
@@ -600,7 +600,7 @@ SILC_TASK_CALLBACK(silc_client_connect_to_server_second)
 void silc_client_resolve_auth_method(bool success,
                                     SilcProtocolAuthMeth auth_meth,
                                     const unsigned char *auth_data,
-                                    uint32 auth_data_len, void *context)
+                                    SilcUInt32 auth_data_len, void *context)
 {
   SilcClientConnAuthInternalContext *proto_ctx =
     (SilcClientConnAuthInternalContext *)context;
@@ -1180,12 +1180,12 @@ void silc_client_packet_send(SilcClient client,
                             SilcCipher cipher,
                             SilcHmac hmac,
                             unsigned char *data, 
-                            uint32 data_len, 
+                            SilcUInt32 data_len, 
                             int force_send)
 {
   SilcPacketContext packetdata;
   int block_len;
-  uint32 sequence = 0;
+  SilcUInt32 sequence = 0;
 
   if (!sock)
     return;
@@ -1613,7 +1613,7 @@ void silc_client_process_failure(SilcClient client,
                                 SilcSocketConnection sock,
                                 SilcPacketContext *packet)
 {
-  uint32 failure = 0;
+  SilcUInt32 failure = 0;
 
   if (sock->protocol) {
     if (packet->buffer->len >= 4)
@@ -1715,7 +1715,7 @@ void silc_client_connection_auth_request(SilcClient client,
                                         SilcPacketContext *packet)
 {
   SilcClientConnection conn = (SilcClientConnection)sock->user_data;
-  uint16 conn_type, auth_meth;
+  SilcUInt16 conn_type, auth_meth;
   int ret;
 
   /* If we haven't send our request then ignore this one. */
index bf311c1031b697f1f0062ca3829b607664d292f0..7868d4602e1c91ec44a6e4c70bffcc78d17e099f 100644 (file)
@@ -28,10 +28,10 @@ typedef struct {
   /* Current sending encryption key, provided for re-key. The `pfs'
      is TRUE if the Perfect Forward Secrecy is performed in re-key. */
   unsigned char *send_enc_key;
-  uint32 enc_key_len;
+  SilcUInt32 enc_key_len;
   int ske_group;
   bool pfs;
-  uint32 timeout;
+  SilcUInt32 timeout;
   void *context;
 } *SilcClientRekey;
 
@@ -58,7 +58,7 @@ struct SilcClientConnectionStruct {
   /* Decoded local ID so that the above defined ID would not have
      to be decoded for every packet. */
   unsigned char *local_id_data;
-  uint32 local_id_data_len;
+  SilcUInt32 local_id_data_len;
 
   /* Own client entry. */
   SilcClientEntry local_entry;
@@ -77,7 +77,7 @@ struct SilcClientConnectionStruct {
   /* Decoded remote ID so that the above defined ID would not have
      to be decoded for every packet. */
   unsigned char *remote_id_data;
-  uint32 remote_id_data_len;
+  SilcUInt32 remote_id_data_len;
 
   /*
    * Common data 
@@ -88,8 +88,8 @@ struct SilcClientConnectionStruct {
   SilcHmac hmac_send;
   SilcHmac hmac_receive;
   SilcHash hash;
-  uint32 psn_send;
-  uint32 psn_receive;
+  SilcUInt32 psn_send;
+  SilcUInt32 psn_receive;
 
   /* Client ID and Channel ID cache. Messages transmitted in SILC network
      are done using different unique ID's. These are the cache for
@@ -111,11 +111,11 @@ struct SilcClientConnectionStruct {
   SilcDList pending_commands;
 
   /* Current command identifier, 0 not used */
-  uint16 cmd_ident;
+  SilcUInt16 cmd_ident;
 
   /* Requested pings. */
   SilcClientPing *ping;
-  uint32 ping_count;
+  SilcUInt32 ping_count;
 
   /* Set away message */
   SilcClientAway *away;
@@ -128,7 +128,7 @@ struct SilcClientConnectionStruct {
 
   /* File transmission sessions */
   SilcDList ftp_sessions;
-  uint32 next_session_id;
+  SilcUInt32 next_session_id;
   SilcClientFtpSession active_session;
 
   /* Pointer back to the SilcClient. This object is passed to the application
index 95505621062f2ba027911809e206ac4d2d2fc36f..c98a8823909d602fe8b666995b99e7e0f5e4e5ed 100644 (file)
@@ -39,7 +39,7 @@ void silc_client_send_channel_message(SilcClient client,
                                      SilcChannelPrivateKey key,
                                      SilcMessageFlags flags,
                                      unsigned char *data, 
-                                     uint32 data_len, 
+                                     SilcUInt32 data_len, 
                                      int force_send)
 {
   int i;
@@ -49,7 +49,7 @@ void silc_client_send_channel_message(SilcClient client,
   SilcCipher cipher;
   SilcHmac hmac;
   unsigned char *id_string;
-  uint32 iv_len;
+  SilcUInt32 iv_len;
   int block_len;
 
   SILC_LOG_DEBUG(("Sending packet to channel"));
@@ -165,7 +165,7 @@ typedef struct {
 static void silc_client_channel_message_cb(SilcClient client,
                                           SilcClientConnection conn,
                                           SilcClientEntry *clients,
-                                          uint32 clients_count,
+                                          SilcUInt32 clients_count,
                                           void *context)
 {
   SilcChannelClientResolve res = (SilcChannelClientResolve)context;
@@ -343,7 +343,7 @@ void silc_client_save_channel_key(SilcClient client,
                                  SilcChannelEntry channel)
 {
   unsigned char *id_string, *key, *cipher, *hmac, hash[32];
-  uint32 tmp_len;
+  SilcUInt32 tmp_len;
   SilcChannelID *id;
   SilcChannelKeyPayload payload;
 
@@ -474,7 +474,7 @@ int silc_client_add_channel_private_key(SilcClient client,
                                        char *cipher,
                                        char *hmac,
                                        unsigned char *key,
-                                       uint32 key_len)
+                                       SilcUInt32 key_len)
 {
   SilcChannelPrivateKey entry;
   unsigned char hash[32];
@@ -629,10 +629,10 @@ SilcChannelPrivateKey *
 silc_client_list_channel_private_keys(SilcClient client,
                                      SilcClientConnection conn,
                                      SilcChannelEntry channel,
-                                     uint32 *key_count)
+                                     SilcUInt32 *key_count)
 {
   SilcChannelPrivateKey *keys = NULL, entry;
-  uint32 count = 0;
+  SilcUInt32 count = 0;
 
   if (!channel->private_keys)
     return NULL;
@@ -653,7 +653,7 @@ silc_client_list_channel_private_keys(SilcClient client,
 /* Frees the SilcChannelPrivateKey array. */
 
 void silc_client_free_channel_private_keys(SilcChannelPrivateKey *keys,
-                                          uint32 key_count)
+                                          SilcUInt32 key_count)
 {
   silc_free(keys);
 }
index 27dc1c215d98084ad5b2de07a98f7491dfc80c9b..73681d15d4165b8bfd2881276d9a0faf25df830e 100644 (file)
@@ -34,7 +34,7 @@ static void silc_client_ftp_start_key_agreement(SilcClientFtpSession session,
 
 /* File transmission session */
 struct SilcClientFtpSessionStruct {
-  uint32 session_id;
+  SilcUInt32 session_id;
   SilcClient client;
   SilcClientConnection conn;
   SilcClientEntry client_entry;
@@ -43,7 +43,7 @@ struct SilcClientFtpSessionStruct {
   SilcBuffer packet;
 
   char *hostname;
-  uint16 port;
+  SilcUInt16 port;
   int listener;
 
   SilcClientFileMonitor monitor;
@@ -56,8 +56,8 @@ struct SilcClientFtpSessionStruct {
 
   SilcSFTPHandle dir_handle;
   SilcSFTPHandle read_handle;
-  uint64 filesize;
-  uint64 read_offset;
+  SilcUInt64 filesize;
+  SilcUInt64 read_offset;
   int fd;
 };
 
@@ -222,7 +222,7 @@ static void silc_client_ftp_monitor(SilcSFTP sftp,
 static void silc_client_ftp_data(SilcSFTP sftp,
                                 SilcSFTPStatus status,
                                 const unsigned char *data,
-                                uint32 data_len,
+                                SilcUInt32 data_len,
                                 void *context)
 {
   SilcClientFtpSession session = (SilcClientFtpSession)context;
@@ -780,10 +780,10 @@ silc_client_file_send(SilcClient client,
                      SilcClientFileMonitor monitor,
                      void *monitor_context,
                      const char *local_ip,
-                     uint32 local_port,
+                     SilcUInt32 local_port,
                      SilcClientEntry client_entry,
                      const char *filepath,
-                     uint32 *session_id)
+                     SilcUInt32 *session_id)
 {
   SilcClientFtpSession session;
   SilcBuffer keyagr, ftp;
@@ -891,7 +891,7 @@ silc_client_file_receive(SilcClient client,
                         SilcClientConnection conn,
                         SilcClientFileMonitor monitor,
                         void *monitor_context,
-                        uint32 session_id)
+                        SilcUInt32 session_id)
 {
   SilcClientFtpSession session;
   SilcBuffer keyagr, ftp;
@@ -973,7 +973,7 @@ silc_client_file_receive(SilcClient client,
 
 SilcClientFileError silc_client_file_close(SilcClient client,
                                           SilcClientConnection conn,
-                                          uint32 session_id)
+                                          SilcUInt32 session_id)
 {
   SilcClientFtpSession session;
 
@@ -1005,7 +1005,7 @@ SilcClientFileError silc_client_file_close(SilcClient client,
 static void silc_client_ftp_resolve_cb(SilcClient client,
                                       SilcClientConnection conn,
                                       SilcClientEntry *clients,
-                                      uint32 clients_count,
+                                      SilcUInt32 clients_count,
                                       void *context)
 {
   SilcPacketContext *packet = (SilcPacketContext *)context;
@@ -1013,7 +1013,7 @@ static void silc_client_ftp_resolve_cb(SilcClient client,
   SilcKeyAgreementPayload payload = NULL;
   SilcClientEntry client_entry;
   char *hostname;
-  uint16 port;
+  SilcUInt16 port;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -1094,7 +1094,7 @@ void silc_client_ftp(SilcClient client,
                     SilcPacketContext *packet)
 {
   SilcClientConnection conn = (SilcClientConnection)sock->user_data;
-  uint8 type;
+  SilcUInt8 type;
   int ret;
 
   SILC_LOG_DEBUG(("Start"));
index 32e7fdfb8db844d91bf1729eb2d3867ca557cf4d..294e003a165ce76048daabc25a3fd4920fc76ec5 100644 (file)
@@ -61,14 +61,14 @@ struct SilcClientInternalStruct {
 
   /* Table of connections in client. All the connection data is saved here. */
   SilcClientConnection *conns;
-  uint32 conns_count;
+  SilcUInt32 conns_count;
 
   /* Table of listenning sockets in client.  Client can have listeners
      (like key agreement protocol server) and those sockets are saved here.
      This table is checked always if the connection object cannot be found
      from the `conns' table. */
   SilcSocketConnection *sockets;
-  uint32 sockets_count;
+  SilcUInt32 sockets_count;
 
   /* Registered commands */
   SilcList commands;
@@ -153,7 +153,7 @@ void silc_client_packet_send(SilcClient client,
                             SilcCipher cipher,
                             SilcHmac hmac,
                             unsigned char *data, 
-                            uint32 data_len, 
+                            SilcUInt32 data_len, 
                             int force_send);
 void silc_client_disconnected_by_server(SilcClient client,
                                        SilcSocketConnection sock,
index 3bc2e52fbebad5d9d8a11bc2d3c0c88f5af4b2dd..87f13e1630cb5bb914622804524e4fc2eb0382a8 100644 (file)
@@ -299,7 +299,7 @@ void silc_client_send_key_agreement(SilcClient client,
                                    const char *hostname,
                                    const char *bindhost,
                                    int port,
-                                   uint32 timeout_secs,
+                                   SilcUInt32 timeout_secs,
                                    SilcKeyAgreementCallback completion,
                                    void *context)
 {
@@ -645,7 +645,7 @@ static void
 silc_client_key_agreement_resolve_cb(SilcClient client,
                                     SilcClientConnection conn,
                                     SilcClientEntry *clients,
-                                    uint32 clients_count,
+                                    SilcUInt32 clients_count,
                                     void *context)
 {
   SilcPacketContext *packet = (SilcPacketContext *)context;
index c42dca1c422753c7c1558e0b4c5cc88da18a617b..862d957a3631430ff3be933a4588088bfceb0401 100644 (file)
@@ -105,7 +105,7 @@ void silc_client_notify_by_server(SilcClient client,
   SilcChannelUser chu;
   SilcServerEntry server;
   unsigned char *tmp;
-  uint32 tmp_len, mode;
+  SilcUInt32 tmp_len, mode;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -823,7 +823,7 @@ void silc_client_notify_by_server(SilcClient client,
        * from channels as they quit as well.
        */
       SilcClientEntry *clients = NULL;
-      uint32 clients_count = 0;
+      SilcUInt32 clients_count = 0;
       int i;
 
       SILC_LOG_DEBUG(("Notify: SIGNOFF"));
index badf60010d6d82fc7f3ea9ff4542b6acb8719fce..bb17c1a4cd2ca41f594c3ffad34c1459524f7f24 100644 (file)
@@ -137,7 +137,7 @@ silc_disconnect(SilcClient client, SilcClientConnection conn)
 
 static void 
 silc_get_auth_method(SilcClient client, SilcClientConnection conn, 
-                    char *hostname, uint16 port, SilcGetAuthMeth completion, 
+                    char *hostname, SilcUInt16 port, SilcGetAuthMeth completion, 
                     void *context)
 {
 
@@ -152,7 +152,7 @@ silc_get_auth_method(SilcClient client, SilcClientConnection conn,
 static void 
 silc_verify_public_key(SilcClient client, SilcClientConnection conn, 
                       SilcSocketType conn_type, unsigned char *pk, 
-                      uint32 pk_len, SilcSKEPKType pk_type, 
+                      SilcUInt32 pk_len, SilcSKEPKType pk_type, 
                       SilcVerifyPublicKey completion, void *context)
 {
 
@@ -198,7 +198,7 @@ silc_failure(SilcClient client, SilcClientConnection conn,
 static int 
 silc_key_agreement(SilcClient client, SilcClientConnection conn, 
                   SilcClientEntry client_entry, const char *hostname, 
-                  uint16 port, SilcKeyAgreementCallback *completion, 
+                  SilcUInt16 port, SilcKeyAgreementCallback *completion, 
                   void **context)
 {
 
@@ -214,8 +214,8 @@ silc_key_agreement(SilcClient client, SilcClientConnection conn,
 
 static void 
 silc_ftp(SilcClient client, SilcClientConnection conn, 
-        SilcClientEntry client_entry, uint32 session_id, 
-        const char *hostname, uint16 port)
+        SilcClientEntry client_entry, SilcUInt32 session_id, 
+        const char *hostname, SilcUInt16 port)
 {
 
 }
index 7f672bde4621b04ca5dd1c56ba24c1faa06fdbbd..e472853fecf10f8487623d4d9bfee40fe472caab 100644 (file)
@@ -38,7 +38,7 @@ void silc_client_send_private_message(SilcClient client,
                                      SilcClientEntry client_entry,
                                      SilcMessageFlags flags,
                                      unsigned char *data, 
-                                     uint32 data_len, 
+                                     SilcUInt32 data_len, 
                                      int force_send)
 {
   SilcSocketConnection sock = conn->sock;
@@ -125,7 +125,7 @@ void silc_client_send_private_message(SilcClient client,
 static void silc_client_private_message_cb(SilcClient client,
                                           SilcClientConnection conn,
                                           SilcClientEntry *clients,
-                                          uint32 clients_count,
+                                          SilcUInt32 clients_count,
                                           void *context)
 {
   SilcPacketContext *packet = (SilcPacketContext *)context;
@@ -221,12 +221,12 @@ void silc_client_private_message(SilcClient client,
 static void silc_client_private_message_key_cb(SilcClient client,
                                               SilcClientConnection conn,
                                               SilcClientEntry *clients,
-                                              uint32 clients_count,
+                                              SilcUInt32 clients_count,
                                               void *context)
 {
   SilcPacketContext *packet = (SilcPacketContext *)context;
   unsigned char *key;
-  uint16 key_len;
+  SilcUInt16 key_len;
   unsigned char *cipher;
   int ret;
 
@@ -313,12 +313,12 @@ int silc_client_add_private_message_key(SilcClient client,
                                        SilcClientEntry client_entry,
                                        char *cipher,
                                        unsigned char *key,
-                                       uint32 key_len,
+                                       SilcUInt32 key_len,
                                        bool generate_key,
                                        bool responder)
 {
   unsigned char private_key[32];
-  uint32 len;
+  SilcUInt32 len;
   int i;
   SilcSKEKeyMaterial *keymat;
 
@@ -518,10 +518,10 @@ int silc_client_del_private_message_key(SilcClient client,
 SilcPrivateMessageKeys
 silc_client_list_private_message_keys(SilcClient client,
                                      SilcClientConnection conn,
-                                     uint32 *key_count)
+                                     SilcUInt32 *key_count)
 {
   SilcPrivateMessageKeys keys;
-  uint32 count = 0;
+  SilcUInt32 count = 0;
   SilcIDCacheEntry id_cache;
   SilcIDCacheList list;
   SilcClientEntry entry;
@@ -562,7 +562,7 @@ silc_client_list_private_message_keys(SilcClient client,
    silc_client_list_private_message_keys. */
 
 void silc_client_free_private_message_keys(SilcPrivateMessageKeys keys,
-                                          uint32 key_count)
+                                          SilcUInt32 key_count)
 {
   silc_free(keys);
 }
index f886e75915e3b4115d24b09e6b0c01c25c6a0e51..2a388e96459215d6f69dc6448a17747e27ff65ca 100644 (file)
@@ -41,8 +41,8 @@
    encoded into correct form and in correct order. */
 
 void silc_client_command_send(SilcClient client, SilcClientConnection conn,
-                             SilcCommand command, uint16 ident,
-                             uint32 argc, ...)
+                             SilcCommand command, SilcUInt16 ident,
+                             SilcUInt32 argc, ...)
 {
   SilcBuffer packet;
   va_list ap;
@@ -93,7 +93,7 @@ void silc_client_command_call(SilcClientCommand command,
 
 void silc_client_command_pending(SilcClientConnection conn,
                                 SilcCommand reply_cmd,
-                                uint16 ident,
+                                SilcUInt16 ident,
                                 SilcCommandCb callback,
                                 void *context)
 {
@@ -111,7 +111,7 @@ void silc_client_command_pending(SilcClientConnection conn,
 
 void silc_client_command_pending_del(SilcClientConnection conn,
                                     SilcCommand reply_cmd,
-                                    uint16 ident)
+                                    SilcUInt16 ident)
 {
   SilcClientCommandPending *r;
 
@@ -130,7 +130,7 @@ void silc_client_command_pending_del(SilcClientConnection conn,
 int silc_client_command_pending_check(SilcClientConnection conn,
                                      SilcClientCommandReplyContext ctx,
                                      SilcCommand command, 
-                                     uint16 ident)
+                                     SilcUInt16 ident)
 {
   SilcClientCommandPending *r;
 
@@ -546,7 +546,7 @@ SILC_CLIENT_CMD_FUNC(invite)
   SilcClientEntry client_entry = NULL;
   SilcChannelEntry channel;
   SilcBuffer buffer, clidp, chidp;
-  uint32 type = 0;
+  SilcUInt32 type = 0;
   char *nickname = NULL, *name;
   char *invite = NULL;
 
@@ -1076,7 +1076,7 @@ SILC_CLIENT_CMD_FUNC(umode)
   SilcClientConnection conn = cmd->conn;
   SilcBuffer buffer, idp;
   unsigned char *cp, modebuf[4];
-  uint32 mode, add, len;
+  SilcUInt32 mode, add, len;
   int i;
 
   if (!cmd->conn) {
@@ -1171,7 +1171,7 @@ SILC_CLIENT_CMD_FUNC(cmode)
   SilcChannelEntry channel;
   SilcBuffer buffer, chidp, auth = NULL;
   unsigned char *name, *cp, modebuf[4], tmp[4], *arg = NULL;
-  uint32 mode, add, type, len, arg_len = 0;
+  SilcUInt32 mode, add, type, len, arg_len = 0;
   int i;
 
   if (!cmd->conn) {
@@ -1401,7 +1401,7 @@ SILC_CLIENT_CMD_FUNC(cumode)
   SilcClientEntry client_entry;
   SilcBuffer buffer, clidp, chidp, auth = NULL;
   unsigned char *name, *cp, modebuf[4];
-  uint32 mode = 0, add, len;
+  SilcUInt32 mode = 0, add, len;
   char *nickname = NULL;
   int i;
 
@@ -1650,7 +1650,7 @@ SILC_CLIENT_CMD_FUNC(kick)
 }
 
 static void silc_client_command_oper_send(unsigned char *data,
-                                         uint32 data_len, void *context)
+                                         SilcUInt32 data_len, void *context)
 {
   SilcClientCommandContext cmd = (SilcClientCommandContext)context;
   SilcClientConnection conn = cmd->conn;
@@ -1718,7 +1718,7 @@ SILC_CLIENT_CMD_FUNC(oper)
 }
 
 static void silc_client_command_silcoper_send(unsigned char *data,
-                                             uint32 data_len, void *context)
+                                             SilcUInt32 data_len, void *context)
 {
   SilcClientCommandContext cmd = (SilcClientCommandContext)context;
   SilcClientConnection conn = cmd->conn;
@@ -1793,7 +1793,7 @@ SILC_CLIENT_CMD_FUNC(connect)
   SilcClientConnection conn = cmd->conn;
   SilcBuffer buffer;
   unsigned char port[4];
-  uint32 tmp;
+  SilcUInt32 tmp;
 
   if (!cmd->conn) {
     SILC_NOT_CONNECTED(cmd->client, cmd->conn);
@@ -1920,7 +1920,7 @@ SILC_CLIENT_CMD_FUNC(close)
   SilcClientConnection conn = cmd->conn;
   SilcBuffer buffer;
   unsigned char port[4];
-  uint32 tmp;
+  SilcUInt32 tmp;
 
   if (!cmd->conn) {
     SILC_NOT_CONNECTED(cmd->client, cmd->conn);
@@ -2240,8 +2240,8 @@ bool silc_client_command_register(SilcClient client,
                                  const char *name,
                                  SilcCommandCb command_function,
                                  SilcCommandCb command_reply_function,
-                                 uint8 max_args,
-                                 uint16 ident)
+                                 SilcUInt8 max_args,
+                                 SilcUInt16 ident)
 {
   SilcClientCommand cmd;
 
@@ -2266,7 +2266,7 @@ bool silc_client_command_unregister(SilcClient client,
                                    SilcCommand command,
                                    SilcCommandCb command_function,
                                    SilcCommandCb command_reply_function,
-                                   uint16 ident)
+                                   SilcUInt16 ident)
 {
   SilcClientCommand cmd;
 
index 3be53cc1f70d098ab2106e441a2c120f468ec516..0b8949e15132da54cb230e7e20face8ce73f0354 100644 (file)
@@ -35,8 +35,8 @@ struct SilcClientCommandStruct {
   SilcCommandCb command;          /* Command function */
   SilcCommandCb reply;            /* Command reply callback */
   char *name;                     /* Name of the command (optional) */
-  uint8 max_args;                 /* Maximum arguments (optional)  */
-  uint16 ident;                           /* Identifier for command (optional)  */
+  SilcUInt8 max_args;             /* Maximum arguments (optional)  */
+  SilcUInt16 ident;                       /* Identifier for command (optional)  */
   struct SilcClientCommandStruct *next;
 };
 
@@ -48,10 +48,10 @@ struct SilcClientCommandContextStruct {
   SilcClient client;
   SilcClientConnection conn;
   SilcClientCommand command;
-  uint32 argc;
+  SilcUInt32 argc;
   unsigned char **argv;
-  uint32 *argv_lens;
-  uint32 *argv_types;
+  SilcUInt32 *argv_lens;
+  SilcUInt32 *argv_types;
   int pending;                 /* Command is being re-processed when TRUE */
   int users;                   /* Reference counter */
 };
@@ -62,7 +62,7 @@ typedef struct SilcClientCommandPendingStruct {
   SilcCommand reply_cmd;
   SilcCommandCb callback;
   void *context;
-  uint16 ident;
+  SilcUInt16 ident;
   struct SilcClientCommandPendingStruct *next;
 } SilcClientCommandPending;
 
@@ -100,22 +100,22 @@ bool silc_client_command_register(SilcClient client,
                                  const char *name,
                                  SilcCommandCb command_function,
                                  SilcCommandCb command_reply_function,
-                                 uint8 max_args,
-                                 uint16 ident);
+                                 SilcUInt8 max_args,
+                                 SilcUInt16 ident);
 bool silc_client_command_unregister(SilcClient client,
                                    SilcCommand command,
                                    SilcCommandCb command_function,
                                    SilcCommandCb command_reply_function,
-                                   uint16 ident);
+                                   SilcUInt16 ident);
 void silc_client_commands_register(SilcClient client);
 void silc_client_commands_unregister(SilcClient client);
 void silc_client_command_pending_del(SilcClientConnection conn,
                                     SilcCommand reply_cmd,
-                                    uint16 ident);
+                                    SilcUInt16 ident);
 int silc_client_command_pending_check(SilcClientConnection conn,
                                      SilcClientCommandReplyContext ctx,
                                      SilcCommand command, 
-                                     uint16 ident);
+                                     SilcUInt16 ident);
 
 SILC_CLIENT_CMD_FUNC(whois);
 SILC_CLIENT_CMD_FUNC(whowas);
index 173916a522c3e8582a9b282375aeee52b3db096e..fba3147b535dcdaef6c34867a48a76327b90f49f 100644 (file)
@@ -214,14 +214,14 @@ silc_client_command_reply_whois_save(SilcClientCommandReplyContext cmd,
   SilcClientID *client_id;
   SilcClientEntry client_entry = NULL;
   int argc;
-  uint32 len;
+  SilcUInt32 len;
   unsigned char *id_data, *tmp;
   char *nickname = NULL, *username = NULL;
   char *realname = NULL;
-  uint32 idle = 0, mode = 0;
+  SilcUInt32 idle = 0, mode = 0;
   SilcBuffer channels = NULL;
   unsigned char *fingerprint;
-  uint32 fingerprint_len;
+  SilcUInt32 fingerprint_len;
   
   argc = silc_argument_get_arg_num(cmd->args);
 
@@ -323,7 +323,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(whois)
      have it cached. */
   if (status == SILC_STATUS_ERR_NO_SUCH_CLIENT_ID) {
     SilcClientEntry client_entry;
-    uint32 tmp_len;
+    SilcUInt32 tmp_len;
     unsigned char *tmp =
       silc_argument_get_arg_type(silc_command_get_args(cmd->payload),
                                 2, &tmp_len);
@@ -351,7 +351,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(whowas)
   SilcCommandStatus status;
   SilcClientID *client_id;
   SilcClientEntry client_entry = NULL;
-  uint32 len;
+  SilcUInt32 len;
   unsigned char *id_data;
   char *nickname, *username;
   char *realname = NULL;
@@ -414,7 +414,7 @@ silc_client_command_reply_identify_save(SilcClientCommandReplyContext cmd,
   SilcServerEntry server_entry;
   SilcChannelEntry channel_entry;
   int argc;
-  uint32 len;
+  SilcUInt32 len;
   unsigned char *id_data;
   char *name = NULL, *info = NULL;
   SilcIDPayload idp = NULL;
@@ -554,7 +554,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(identify)
      have it cached. */
   if (status == SILC_STATUS_ERR_NO_SUCH_CLIENT_ID) {
     SilcClientEntry client_entry;
-    uint32 tmp_len;
+    SilcUInt32 tmp_len;
     unsigned char *tmp =
       silc_argument_get_arg_type(silc_command_get_args(cmd->payload),
                                 2, &tmp_len);
@@ -583,7 +583,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(nick)
   SilcCommandStatus status;
   SilcIDPayload idp;
   unsigned char *tmp;
-  uint32 argc, len;
+  SilcUInt32 argc, len;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -630,7 +630,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(list)
   SilcClientCommandReplyContext cmd = (SilcClientCommandReplyContext)context;
   SilcCommandStatus status;
   unsigned char *tmp, *name, *topic;
-  uint32 usercount = 0;
+  SilcUInt32 usercount = 0;
 
   COMMAND_CHECK_STATUS_LIST;
 
@@ -666,7 +666,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(topic)
   SilcChannelID *channel_id = NULL;
   unsigned char *tmp;
   char *topic;
-  uint32 argc, len;
+  SilcUInt32 argc, len;
 
   SILC_GET16_MSB(status, silc_argument_get_arg_type(cmd->args, 1, NULL));
   if (status != SILC_STATUS_OK) {
@@ -722,7 +722,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(invite)
   SilcChannelEntry channel;
   SilcChannelID *channel_id;
   unsigned char *tmp;
-  uint32 len;
+  SilcUInt32 len;
 
   tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
   SILC_GET16_MSB(status, tmp);
@@ -798,7 +798,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(info)
   SilcServerEntry server;
   SilcServerID *server_id = NULL;
   char *server_name, *server_info;
-  uint32 len;
+  SilcUInt32 len;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -922,7 +922,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(join)
   SilcChannelEntry channel;
   SilcChannelUser chu;
   SilcChannelID *channel_id;
-  uint32 argc, mode = 0, len, list_count;
+  SilcUInt32 argc, mode = 0, len, list_count;
   char *topic, *tmp, *channel_name = NULL, *hmac;
   SilcBuffer keyp = NULL, client_id_list = NULL, client_mode_list = NULL;
   int i;
@@ -1036,8 +1036,8 @@ SILC_CLIENT_CMD_REPLY_FUNC(join)
 
   /* Add clients we received in the reply to the channel */
   for (i = 0; i < list_count; i++) {
-    uint16 idp_len;
-    uint32 mode;
+    SilcUInt16 idp_len;
+    SilcUInt32 mode;
     SilcClientID *client_id;
     SilcClientEntry client_entry;
 
@@ -1106,7 +1106,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(motd)
   SilcClientCommandReplyContext cmd = (SilcClientCommandReplyContext)context;
   SilcClientConnection conn = (SilcClientConnection)cmd->sock->user_data;
   SilcCommandStatus status;
-  uint32 argc, i;
+  SilcUInt32 argc, i;
   unsigned char *tmp;
   char *motd = NULL, *cp, line[256];
 
@@ -1168,7 +1168,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(umode)
   SilcClientConnection conn = (SilcClientConnection)cmd->sock->user_data;
   SilcCommandStatus status;
   unsigned char *tmp;
-  uint32 mode;
+  SilcUInt32 mode;
 
   tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
   SILC_GET16_MSB(status, tmp);
@@ -1204,10 +1204,10 @@ SILC_CLIENT_CMD_REPLY_FUNC(cmode)
   SilcClientConnection conn = (SilcClientConnection)cmd->sock->user_data;
   SilcCommandStatus status;
   unsigned char *tmp;
-  uint32 mode;
+  SilcUInt32 mode;
   SilcChannelID *channel_id;
   SilcChannelEntry channel;
-  uint32 len;
+  SilcUInt32 len;
 
   SILC_GET16_MSB(status, silc_argument_get_arg_type(cmd->args, 1, NULL));
   if (status != SILC_STATUS_OK) {
@@ -1268,7 +1268,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(cumode)
   SilcChannelEntry channel;
   SilcChannelUser chu;
   unsigned char *modev, *tmp, *id;
-  uint32 len, mode;
+  SilcUInt32 len, mode;
   
   SILC_GET16_MSB(status, silc_argument_get_arg_type(cmd->args, 1, NULL));
   if (status != SILC_STATUS_OK) {
@@ -1444,7 +1444,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(ban)
   SilcChannelEntry channel;
   SilcChannelID *channel_id;
   unsigned char *tmp;
-  uint32 len;
+  SilcUInt32 len;
 
   tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
   SILC_GET16_MSB(status, tmp);
@@ -1562,7 +1562,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(leave)
 static void silc_client_command_reply_users_cb(SilcClient client,
                                               SilcClientConnection conn,
                                               SilcChannelEntry *channels,
-                                              uint32 channels_count,
+                                              SilcUInt32 channels_count,
                                               void *context)
 {
   if (!channels_count) {
@@ -1596,10 +1596,10 @@ SILC_CLIENT_CMD_REPLY_FUNC(users)
   SilcBuffer client_id_list = NULL;
   SilcBuffer client_mode_list = NULL;
   unsigned char *tmp;
-  uint32 tmp_len, list_count;
+  SilcUInt32 tmp_len, list_count;
   int i;
   unsigned char **res_argv = NULL;
-  uint32 *res_argv_lens = NULL, *res_argv_types = NULL, res_argc = 0;
+  SilcUInt32 *res_argv_lens = NULL, *res_argv_types = NULL, res_argc = 0;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -1671,8 +1671,8 @@ SILC_CLIENT_CMD_REPLY_FUNC(users)
 
   /* Cache the received Client ID's and modes. */
   for (i = 0; i < list_count; i++) {
-    uint16 idp_len;
-    uint32 mode;
+    SilcUInt16 idp_len;
+    SilcUInt32 mode;
     SilcClientID *client_id;
 
     /* Client ID */
@@ -1793,8 +1793,8 @@ SILC_CLIENT_CMD_REPLY_FUNC(getkey)
   SilcServerEntry server_entry;
   SilcSKEPKType type;
   unsigned char *tmp, *pk;
-  uint32 len;
-  uint16 pk_len;
+  SilcUInt32 len;
+  SilcUInt16 pk_len;
   SilcIdType id_type;
   SilcPublicKey public_key = NULL;
 
@@ -1915,7 +1915,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(whois_i)
      have it cached. */
   if (status == SILC_STATUS_ERR_NO_SUCH_CLIENT_ID) {
     SilcClientEntry client_entry;
-    uint32 tmp_len;
+    SilcUInt32 tmp_len;
     unsigned char *tmp =
       silc_argument_get_arg_type(silc_command_get_args(cmd->payload),
                                 2, &tmp_len);
@@ -1971,7 +1971,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(identify_i)
      have it cached. */
   if (status == SILC_STATUS_ERR_NO_SUCH_CLIENT_ID) {
     SilcClientEntry client_entry;
-    uint32 tmp_len;
+    SilcUInt32 tmp_len;
     unsigned char *tmp =
       silc_argument_get_arg_type(silc_command_get_args(cmd->payload),
                                 2, &tmp_len);
@@ -2005,7 +2005,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(info_i)
   SilcServerEntry server;
   SilcServerID *server_id = NULL;
   char *server_name, *server_info;
-  uint32 len;
+  SilcUInt32 len;
 
   SILC_LOG_DEBUG(("Start"));
 
index 63a09e0c0f47e6e40c329444b47dc8081ab99be4..4e5cdbee8178e133c15d7940dfd7c73306bedb3e 100644 (file)
@@ -37,7 +37,7 @@ struct SilcClientCommandReplyContextStruct {
   /* If defined this executes the pending command. */
   SilcCommandCb callback;
   void *context;
-  uint16 ident;
+  SilcUInt16 ident;
 };
 
 /* Macros */
index eba3cc9eaa395f8c03bf035a0ebb6b6bb4a7f6b9..e361a5027c39226a6357ddc12873c97abe9790b4 100644 (file)
@@ -41,7 +41,7 @@ SilcClientEntry *silc_client_get_clients_local(SilcClient client,
                                               SilcClientConnection conn,
                                               const char *nickname,
                                               const char *format,
-                                              uint32 *clients_count)
+                                              SilcUInt32 *clients_count)
 {
   SilcIDCacheEntry id_cache;
   SilcIDCacheList list = NULL;
@@ -123,7 +123,7 @@ SILC_CLIENT_CMD_FUNC(get_client_callback)
 {
   GetClientInternal i = (GetClientInternal)context;
   SilcClientEntry *clients;
-  uint32 clients_count;
+  SilcUInt32 clients_count;
 
   /* Get the clients */
   clients = silc_client_get_clients_local(i->client, i->conn,
@@ -283,7 +283,7 @@ SilcClientEntry silc_idlist_get_client(SilcClient client,
 typedef struct {
   SilcClient client;
   SilcClientConnection conn;
-  uint32 list_count;
+  SilcUInt32 list_count;
   SilcBuffer client_id_list;
   SilcGetClientCallback completion;
   void *context;
@@ -295,14 +295,14 @@ SILC_CLIENT_CMD_FUNC(get_clients_list_callback)
   SilcIDCacheEntry id_cache = NULL;
   SilcBuffer client_id_list = i->client_id_list;
   SilcClientEntry *clients = NULL;
-  uint32 clients_count = 0;
+  SilcUInt32 clients_count = 0;
   bool found = FALSE;
   int c;
 
   SILC_LOG_DEBUG(("Start"));
 
   for (c = 0; c < i->list_count; c++) {
-    uint16 idp_len;
+    SilcUInt16 idp_len;
     SilcClientID *client_id;
 
     /* Get Client ID */
@@ -352,7 +352,7 @@ SILC_CLIENT_CMD_FUNC(get_clients_list_callback)
 
 void silc_client_get_clients_by_list(SilcClient client,
                                     SilcClientConnection conn,
-                                    uint32 list_count,
+                                    SilcUInt32 list_count,
                                     SilcBuffer client_id_list,
                                     SilcGetClientCallback completion,
                                     void *context)
@@ -360,7 +360,7 @@ void silc_client_get_clients_by_list(SilcClient client,
   SilcIDCacheEntry id_cache = NULL;
   int i;
   unsigned char **res_argv = NULL;
-  uint32 *res_argv_lens = NULL, *res_argv_types = NULL, res_argc = 0;
+  SilcUInt32 *res_argv_lens = NULL, *res_argv_types = NULL, res_argc = 0;
   GetClientsByListInternal in;
 
   SILC_LOG_DEBUG(("Start"));
@@ -374,7 +374,7 @@ void silc_client_get_clients_by_list(SilcClient client,
   in->context = context;
 
   for (i = 0; i < list_count; i++) {
-    uint16 idp_len;
+    SilcUInt16 idp_len;
     SilcClientID *client_id;
     SilcClientEntry entry;
 
@@ -567,7 +567,7 @@ void silc_client_get_client_by_id_resolve(SilcClient client,
 SilcClientEntry
 silc_client_add_client(SilcClient client, SilcClientConnection conn,
                       char *nickname, char *username, 
-                      char *userinfo, SilcClientID *id, uint32 mode)
+                      char *userinfo, SilcClientID *id, SilcUInt32 mode)
 {
   SilcClientEntry client_entry;
   char *nick = NULL;
@@ -615,7 +615,7 @@ void silc_client_update_client(SilcClient client,
                               const char *nickname,
                               const char *username,
                               const char *userinfo,
-                              uint32 mode)
+                              SilcUInt32 mode)
 {
   char *nick = NULL;
 
@@ -689,7 +689,7 @@ bool silc_client_del_client(SilcClient client, SilcClientConnection conn,
 SilcChannelEntry silc_client_add_channel(SilcClient client,
                                         SilcClientConnection conn,
                                         const char *channel_name,
-                                        uint32 mode, 
+                                        SilcUInt32 mode, 
                                         SilcChannelID *channel_id)
 {
   SilcChannelEntry channel;
@@ -967,7 +967,7 @@ void silc_client_nickname_format(SilcClient client,
   char *newnick = NULL;
   int i, off = 0, len;
   SilcClientEntry *clients;
-  uint32 clients_count = 0;
+  SilcUInt32 clients_count = 0;
   SilcClientEntry unformatted = NULL;
 
   SILC_LOG_DEBUG(("Start"));
index 636af24c750cc13c32ce06d7257655b1a00a6938..ef48ed54fbdbacf53af102c48af8a412c6b83c5a 100644 (file)
@@ -36,18 +36,18 @@ struct SilcClientEntryStruct {
   char *hostname;              /* hostname */
   char *server;                        /* SILC server name */
   char *realname;              /* Realname (userinfo) */
-  uint32 num;
-  uint32 mode;                 /* User mode in SILC */
+  SilcUInt32 num;
+  SilcUInt32 mode;                     /* User mode in SILC */
   SilcClientID *id;            /* The Client ID */
   unsigned char *fingerprint;  /* Fingerprint of client's public key */
-  uint32 fingerprint_len;      /* Length of the fingerprint */
+  SilcUInt32 fingerprint_len;  /* Length of the fingerprint */
   bool valid;                  /* FALSE if this entry is not valid */
   SilcCipher send_key;         /* Private message key for sending */
   SilcCipher receive_key;      /* Private message key for receiving */
   unsigned char *key;          /* Set only if appliation provided the
                                   key material. NULL if the library 
                                   generated the key. */
-  uint32 key_len;
+  SilcUInt32 key_len;
   bool generated;              /* TRUE if library generated the key */
   SilcClientKeyAgreement ke;   /* Current key agreement context or NULL */
   SilcClientStatus status;     /* Status mask */
@@ -57,7 +57,7 @@ struct SilcClientEntryStruct {
 /* Client and its mode on a channel */
 struct SilcChannelUserStruct {
   SilcClientEntry client;
-  uint32 mode;
+  SilcUInt32 mode;
   SilcChannelEntry channel;
 };
 
@@ -66,7 +66,7 @@ struct SilcChannelPrivateKeyStruct {
   SilcCipher cipher;                 /* The cipher and key */
   SilcHmac hmac;                     /* The HMAC and hmac key */
   unsigned char *key;                /* The key data */
-  uint32 key_len;                    /* The key length */
+  SilcUInt32 key_len;                /* The key length */
 };
 
 /* Channel entry context. This is allocate for every channel client has
@@ -74,7 +74,7 @@ struct SilcChannelPrivateKeyStruct {
 struct SilcChannelEntryStruct {
   char *channel_name;
   SilcChannelID *id;
-  uint32 mode;
+  SilcUInt32 mode;
 
   /* All clients that has joined this channel */
   SilcHashTable user_list;
@@ -82,7 +82,7 @@ struct SilcChannelEntryStruct {
   /* Channel keys */
   SilcCipher channel_key;                    /* The channel key */
   unsigned char *key;                       /* Raw key data */
-  uint32 key_len;
+  SilcUInt32 key_len;
   unsigned char iv[SILC_CIPHER_MAX_IV_SIZE]; /* Current IV */
   SilcHmac hmac;                            /* Current HMAC */
   SilcDList private_keys;                   /* List of private keys or NULL */
@@ -111,14 +111,14 @@ struct SilcServerEntryStruct {
 SilcClientEntry
 silc_client_add_client(SilcClient client, SilcClientConnection conn,
                       char *nickname, char *username, 
-                      char *userinfo, SilcClientID *id, uint32 mode);
+                      char *userinfo, SilcClientID *id, SilcUInt32 mode);
 void silc_client_update_client(SilcClient client,
                               SilcClientConnection conn,
                               SilcClientEntry client_entry,
                               const char *nickname,
                               const char *username,
                               const char *userinfo,
-                              uint32 mode);
+                              SilcUInt32 mode);
 void silc_client_del_client_entry(SilcClient client, 
                                  SilcClientConnection conn,
                                  SilcClientEntry client_entry);
@@ -130,7 +130,7 @@ SilcClientEntry silc_idlist_get_client(SilcClient client,
 SilcChannelEntry silc_client_add_channel(SilcClient client,
                                         SilcClientConnection conn,
                                         const char *channel_name,
-                                        uint32 mode, 
+                                        SilcUInt32 mode, 
                                         SilcChannelID *channel_id);
 bool silc_client_replace_channel_id(SilcClient client,
                                    SilcClientConnection conn,
index df614b95e35a554b404d62dc6db2a9159f87047e..4bf277c8a2e5759eb330a1b1e343fc487a097cf9 100644 (file)
@@ -78,7 +78,7 @@ static void silc_client_verify_key_cb(bool success, void *context)
 
 void silc_client_protocol_ke_verify_key(SilcSKE ske,
                                        unsigned char *pk_data,
-                                       uint32 pk_len,
+                                       SilcUInt32 pk_len,
                                        SilcSKEPKType pk_type,
                                        void *context,
                                        SilcSKEVerifyCbCompletion completion,
@@ -167,7 +167,7 @@ void silc_client_protocol_ke_set_keys(SilcSKE ske,
 /* Checks the version string of the server. */
 
 SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version,
-                                    uint32 len, void *context)
+                                    SilcUInt32 len, void *context)
 {
   SilcClientConnection conn = (SilcClientConnection)ske->sock->user_data;
   SilcClient client = (SilcClient)ske->user_data;
@@ -549,7 +549,7 @@ static int
 silc_client_get_public_key_auth(SilcClient client,
                                SilcClientConnection conn,
                                unsigned char *auth_data,
-                               uint32 *auth_data_len,
+                               SilcUInt32 *auth_data_len,
                                SilcSKE ske)
 {
   int len;
@@ -585,7 +585,7 @@ silc_client_get_public_key_auth(SilcClient client,
 
 static void 
 silc_client_conn_auth_continue(unsigned char *auth_data,
-                              uint32 auth_data_len, void *context)
+                              SilcUInt32 auth_data_len, void *context)
 {
   SilcProtocol protocol = (SilcProtocol)context;
   SilcClientConnAuthInternalContext *ctx = 
@@ -637,7 +637,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_connection_auth)
        * to be authenticated.
        */
       unsigned char *auth_data = NULL;
-      uint32 auth_data_len = 0;
+      SilcUInt32 auth_data_len = 0;
       unsigned char sign[1024];
 
       switch(ctx->auth_meth) {
@@ -799,8 +799,8 @@ silc_client_protocol_rekey_generate(SilcClient client,
 {
   SilcClientConnection conn = (SilcClientConnection)ctx->sock->user_data;
   SilcSKEKeyMaterial *keymat;
-  uint32 key_len = silc_cipher_get_key_len(conn->send_key);
-  uint32 hash_len = conn->hash->hash->hash_len;
+  SilcUInt32 key_len = silc_cipher_get_key_len(conn->send_key);
+  SilcUInt32 hash_len = conn->hash->hash->hash_len;
 
   SILC_LOG_DEBUG(("Generating new %s session keys (no PFS)",
                  send ? "sending" : "receiving"));
@@ -828,10 +828,10 @@ silc_client_protocol_rekey_generate_pfs(SilcClient client,
 {
   SilcClientConnection conn = (SilcClientConnection)ctx->sock->user_data;
   SilcSKEKeyMaterial *keymat;
-  uint32 key_len = silc_cipher_get_key_len(conn->send_key);
-  uint32 hash_len = conn->hash->hash->hash_len;
+  SilcUInt32 key_len = silc_cipher_get_key_len(conn->send_key);
+  SilcUInt32 hash_len = conn->hash->hash->hash_len;
   unsigned char *tmpbuf;
-  uint32 klen;
+  SilcUInt32 klen;
 
   SILC_LOG_DEBUG(("Generating new %s session keys (with PFS)",
                  send ? "sending" : "receiving"));
index c229ff01de542fc48855c1c5996f6cc591c5c73e..9d93709210bd550ea29801218564d2c1b3ec225e 100644 (file)
@@ -68,7 +68,7 @@ typedef struct {
      starting the protocol if we know the authentication data. Otherwise
      these are and remain NULL. */
   unsigned char *auth_data;
-  uint32 auth_data_len;
+  SilcUInt32 auth_data_len;
 
   SilcTask timeout_task;
 } SilcClientConnAuthInternalContext;
@@ -93,7 +93,7 @@ void silc_client_protocol_ke_send_packet(SilcSKE ske,
                                         void *context);
 void silc_client_protocol_ke_verify_key(SilcSKE ske,
                                        unsigned char *pk_data,
-                                       uint32 pk_len,
+                                       SilcUInt32 pk_len,
                                        SilcSKEPKType pk_type,
                                        void *context,
                                        SilcSKEVerifyCbCompletion completion,
index 231347173198f1e0509527e17bf0208ee2a2c55e..b84cdf9bba6f483bb323702dab54107ededab306 100644 (file)
@@ -146,7 +146,7 @@ typedef struct {
                                         provided it. This is NULL if the
                                         library generated the key or if
                                         the SKE key material was used. */
-  uint32 key_len;                    /* The key length */
+  SilcUInt32 key_len;                /* The key length */
 } *SilcPrivateMessageKeys;
 /***/
 
@@ -156,7 +156,7 @@ typedef struct {
  * SYNOPSIS
  *
  *    typedef void (*SilcAskPassphrase)(unsigned char *passphrase,
- *                                     uint32 passphrase_len,
+ *                                     SilcUInt32 passphrase_len,
  *                                     void *context);
  *
  * DESCRIPTION
@@ -167,7 +167,7 @@ typedef struct {
  *
  ***/
 typedef void (*SilcAskPassphrase)(unsigned char *passphrase,
-                                 uint32 passphrase_len,
+                                 SilcUInt32 passphrase_len,
                                  void *context);
 
 /****f* silcclient/SilcClientAPI/SilcVerifyPublicKey
@@ -192,7 +192,7 @@ typedef void (*SilcVerifyPublicKey)(bool success, void *context);
  *    typedef void (*SilcGetAuthMeth)(bool success, 
  *                                    SilcProtocolAuthMeth auth_meth,
  *                                    const unsigned char *auth_data,
- *                                    uint32 auth_data_len, void *context);
+ *                                    SilcUInt32 auth_data_len, void *context);
  * 
  * DESCRIPTION
  *
@@ -209,7 +209,7 @@ typedef void (*SilcVerifyPublicKey)(bool success, void *context);
 typedef void (*SilcGetAuthMeth)(bool success, 
                                SilcProtocolAuthMeth auth_meth,
                                const unsigned char *auth_data,
-                               uint32 auth_data_len, void *context);
+                               SilcUInt32 auth_data_len, void *context);
 
 /****d* silcclient/SilcClientAPI/SilcClientMessageType
  *
@@ -328,7 +328,7 @@ typedef struct {
      authentication method and authentication data is called. The `conn'
      may be NULL. */
   void (*get_auth_method)(SilcClient client, SilcClientConnection conn,
-                         char *hostname, uint16 port,
+                         char *hostname, SilcUInt16 port,
                          SilcGetAuthMeth completion, void *context);
 
   /* Verifies received public key. The `conn_type' indicates which entity
@@ -337,7 +337,7 @@ typedef struct {
      `completion' must be called after the public key has been verified. */
   void (*verify_public_key)(SilcClient client, SilcClientConnection conn,
                            SilcSocketType conn_type, unsigned char *pk, 
-                           uint32 pk_len, SilcSKEPKType pk_type,
+                           SilcUInt32 pk_len, SilcSKEPKType pk_type,
                            SilcVerifyPublicKey completion, void *context);
 
   /* Ask (interact, that is) a passphrase from user. The passphrase is
@@ -365,7 +365,7 @@ typedef struct {
      `completion' and `context' arguments must be set by the application. */
   int (*key_agreement)(SilcClient client, SilcClientConnection conn,
                       SilcClientEntry client_entry, const char *hostname,
-                      uint16 port, SilcKeyAgreementCallback *completion,
+                      SilcUInt16 port, SilcKeyAgreementCallback *completion,
                       void **context);
 
   /* Notifies application that file transfer protocol session is being
@@ -375,8 +375,8 @@ typedef struct {
      transfer request, by calling the silc_client_file_receive or
      silc_client_file_close, respectively. */
   void (*ftp)(SilcClient client, SilcClientConnection conn,
-             SilcClientEntry client_entry, uint32 session_id,
-             const char *hostname, uint16 port);
+             SilcClientEntry client_entry, SilcUInt32 session_id,
+             const char *hostname, SilcUInt16 port);
 } SilcClientOperations;
 /***/
 
@@ -744,7 +744,7 @@ void silc_client_close_connection(SilcClient client,
  *                                          SilcChannelPrivateKey key,
  *                                          SilcMessageFlags flags,
  *                                          unsigned char *data, 
- *                                          uint32 data_len, 
+ *                                          SilcUInt32 data_len, 
  *                                          int force_send);
  *
  * DESCRIPTION
@@ -769,7 +769,7 @@ void silc_client_send_channel_message(SilcClient client,
                                      SilcChannelPrivateKey key,
                                      SilcMessageFlags flags,
                                      unsigned char *data, 
-                                     uint32 data_len, 
+                                     SilcUInt32 data_len, 
                                      int force_send);
 
 /****f* silcclient/SilcClientAPI/silc_client_send_private_message
@@ -781,7 +781,7 @@ void silc_client_send_channel_message(SilcClient client,
  *                                          SilcClientEntry client_entry,
  *                                          SilcMessageFlags flags,
  *                                          unsigned char *data, 
- *                                          uint32 data_len, 
+ *                                          SilcUInt32 data_len, 
  *                                          int force_send);
  *
  * DESCRIPTION
@@ -800,7 +800,7 @@ void silc_client_send_private_message(SilcClient client,
                                      SilcClientEntry client_entry,
                                      SilcMessageFlags flags,
                                      unsigned char *data, 
-                                     uint32 data_len, 
+                                     SilcUInt32 data_len, 
                                      int force_send);
 
 
@@ -813,7 +813,7 @@ void silc_client_send_private_message(SilcClient client,
  *    typedef void (*SilcGetClientCallback)(SilcClient client,
  *                                          SilcClientConnection conn,
  *                                          SilcClientEntry *clients,
- *                                          uint32 clients_count,
+ *                                          SilcUInt32 clients_count,
  *                                          void *context);
  *
  * DESCRIPTION
@@ -827,7 +827,7 @@ void silc_client_send_private_message(SilcClient client,
 typedef void (*SilcGetClientCallback)(SilcClient client,
                                      SilcClientConnection conn,
                                      SilcClientEntry *clients,
-                                     uint32 clients_count,
+                                     SilcUInt32 clients_count,
                                      void *context);
 
 /****f* silcclient/SilcClientAPI/silc_client_get_clients
@@ -872,7 +872,7 @@ void silc_client_get_clients(SilcClient client,
  *                                                   SilcClientConnection conn,
  *                                                   const char *nickname,
  *                                                   const char *format,
- *                                                   uint32 *clients_count);
+ *                                                   SilcUInt32 *clients_count);
  *
  * DESCRIPTION
  *
@@ -891,7 +891,7 @@ SilcClientEntry *silc_client_get_clients_local(SilcClient client,
                                               SilcClientConnection conn,
                                               const char *nickname,
                                               const char *format,
-                                              uint32 *clients_count);
+                                              SilcUInt32 *clients_count);
 
 /****f* silcclient/SilcClientAPI/silc_client_get_clients_by_list
  *
@@ -899,7 +899,7 @@ SilcClientEntry *silc_client_get_clients_local(SilcClient client,
  *
  *    void silc_client_get_clients_by_list(SilcClient client,
  *                                         SilcClientConnection conn,
- *                                         uint32 list_count,
+ *                                         SilcUInt32 list_count,
  *                                         SilcBuffer client_id_list,
  *                                         SilcGetClientCallback completion,
  *                                         void *context);
@@ -918,7 +918,7 @@ SilcClientEntry *silc_client_get_clients_local(SilcClient client,
  ***/
 void silc_client_get_clients_by_list(SilcClient client,
                                     SilcClientConnection conn,
-                                    uint32 list_count,
+                                    SilcUInt32 list_count,
                                     SilcBuffer client_id_list,
                                     SilcGetClientCallback completion,
                                     void *context);
@@ -991,7 +991,7 @@ bool silc_client_del_client(SilcClient client, SilcClientConnection conn,
  *    typedef void (*SilcGetChannelCallback)(SilcClient client,
  *                                           SilcClientConnection conn,
  *                                           SilcChannelEntry *channels,
- *                                           uint32 channels_count,
+ *                                           SilcUInt32 channels_count,
  *                                           void *context);
  *
  * DESCRIPTION
@@ -1005,7 +1005,7 @@ bool silc_client_del_client(SilcClient client, SilcClientConnection conn,
 typedef void (*SilcGetChannelCallback)(SilcClient client,
                                       SilcClientConnection conn,
                                       SilcChannelEntry *channels,
-                                      uint32 channels_count,
+                                      SilcUInt32 channels_count,
                                       void *context);
 
 /****f* silcclient/SilcClientAPI/silc_client_get_channel
@@ -1253,8 +1253,8 @@ void silc_client_command_call(SilcClientCommand command,
  *
  *    void silc_client_command_send(SilcClient client, 
  *                                  SilcClientConnection conn,
- *                                  SilcCommand command, uint16 ident,
- *                                  uint32 argc, ...);
+ *                                  SilcCommand command, SilcUInt16 ident,
+ *                                  SilcUInt32 argc, ...);
  *
  * DESCRIPTION
  *
@@ -1266,8 +1266,8 @@ void silc_client_command_call(SilcClientCommand command,
  *
  ***/
 void silc_client_command_send(SilcClient client, SilcClientConnection conn,
-                             SilcCommand command, uint16 ident,
-                             uint32 argc, ...);
+                             SilcCommand command, SilcUInt16 ident,
+                             SilcUInt32 argc, ...);
 
 /****f* silcclient/SilcClientAPI/silc_client_command_pending
  *
@@ -1275,7 +1275,7 @@ void silc_client_command_send(SilcClient client, SilcClientConnection conn,
  *
  *    void silc_client_command_pending(SilcClientConnection conn,
  *                                     SilcCommand reply_cmd,
- *                                     uint16 ident,
+ *                                     SilcUInt16 ident,
  *                                     SilcCommandCb callback,
  *                                     void *context);
  *
@@ -1294,7 +1294,7 @@ void silc_client_command_send(SilcClient client, SilcClientConnection conn,
  ***/
 void silc_client_command_pending(SilcClientConnection conn,
                                 SilcCommand reply_cmd,
-                                uint16 ident,
+                                SilcUInt16 ident,
                                 SilcCommandCb callback,
                                 void *context);
 
@@ -1310,7 +1310,7 @@ void silc_client_command_pending(SilcClientConnection conn,
  *                                            SilcClientEntry client_entry,
  *                                            char *cipher,
  *                                            unsigned char *key,
- *                                            uint32 key_len,
+ *                                            SilcUInt32 key_len,
  *                                            bool generate_key,
  *                                            bool responder);
  *
@@ -1343,7 +1343,7 @@ int silc_client_add_private_message_key(SilcClient client,
                                        SilcClientEntry client_entry,
                                        char *cipher,
                                        unsigned char *key,
-                                       uint32 key_len,
+                                       SilcUInt32 key_len,
                                        bool generate_key,
                                        bool responder);
 
@@ -1426,7 +1426,7 @@ int silc_client_del_private_message_key(SilcClient client,
  *    SilcPrivateMessageKeys
  *    silc_client_list_private_message_keys(SilcClient client,
  *                                          SilcClientConnection conn,
- *                                          uint32 *key_count);
+ *                                          SilcUInt32 *key_count);
  * 
  * DESCRIPTION
  *
@@ -1442,14 +1442,14 @@ int silc_client_del_private_message_key(SilcClient client,
 SilcPrivateMessageKeys
 silc_client_list_private_message_keys(SilcClient client,
                                      SilcClientConnection conn,
-                                     uint32 *key_count);
+                                     SilcUInt32 *key_count);
 
 /****f* silcclient/SilcClientAPI/silc_client_free_private_message_keys
  *
  * SYNOPSIS
  *
  *    void silc_client_free_private_message_keys(SilcPrivateMessageKeys keys,
- *                                               uint32 key_count);
+ *                                               SilcUInt32 key_count);
  * 
  * DESCRIPTION
  *
@@ -1458,7 +1458,7 @@ silc_client_list_private_message_keys(SilcClient client,
  *
  ***/
 void silc_client_free_private_message_keys(SilcPrivateMessageKeys keys,
-                                          uint32 key_count);
+                                          SilcUInt32 key_count);
 
 
 /* Channel private key management (client_channel.c, 
@@ -1474,7 +1474,7 @@ void silc_client_free_private_message_keys(SilcPrivateMessageKeys keys,
  *                                            char *cipher,
  *                                            char *hmac,
  *                                            unsigned char *key,
- *                                            uint32 key_len);
+ *                                            SilcUInt32 key_len);
  * 
  * DESCRIPTION
  *
@@ -1513,7 +1513,7 @@ int silc_client_add_channel_private_key(SilcClient client,
                                        char *cipher,
                                        char *hmac,
                                        unsigned char *key,
-                                       uint32 key_len);
+                                       SilcUInt32 key_len);
 
 /****f* silcclient/SilcClientAPI/silc_client_del_channel_private_keys
  *
@@ -1566,7 +1566,7 @@ int silc_client_del_channel_private_key(SilcClient client,
  *    silc_client_list_channel_private_keys(SilcClient client,
  *                                          SilcClientConnection conn,
  *                                          SilcChannelEntry channel,
- *                                          uint32 *key_count);
+ *                                          SilcUInt32 *key_count);
  *
  * DESCRIPTION
  *
@@ -1581,14 +1581,14 @@ SilcChannelPrivateKey *
 silc_client_list_channel_private_keys(SilcClient client,
                                      SilcClientConnection conn,
                                      SilcChannelEntry channel,
-                                     uint32 *key_count);
+                                     SilcUInt32 *key_count);
 
 /****f* silcclient/SilcClientAPI/silc_client_free_channel_private_keys
  *
  * SYNOPSIS
  *
  *    void silc_client_free_channel_private_keys(SilcChannelPrivateKey *keys,
- *                                               uint32 key_count);
+ *                                               SilcUInt32 key_count);
  *
  * DESCRIPTION
  *
@@ -1596,7 +1596,7 @@ silc_client_list_channel_private_keys(SilcClient client,
  *
  ***/
 void silc_client_free_channel_private_keys(SilcChannelPrivateKey *keys,
-                                          uint32 key_count);
+                                          SilcUInt32 key_count);
 
 
 /* Key Agreement routines (client_keyagr.c) */
@@ -1610,7 +1610,7 @@ void silc_client_free_channel_private_keys(SilcChannelPrivateKey *keys,
  *                                        SilcClientEntry client_entry,
  *                                        char *hostname,
  *                                        int port,
- *                                        uint32 timeout_secs,
+ *                                        SilcUInt32 timeout_secs,
  *                                        SilcKeyAgreementCallback completion,
  *                                        void *context);
  *
@@ -1663,7 +1663,7 @@ void silc_client_send_key_agreement(SilcClient client,
                                    const char *hostname,
                                    const char *bindhost,
                                    int port,
-                                   uint32 timeout_secs,
+                                   SilcUInt32 timeout_secs,
                                    SilcKeyAgreementCallback completion,
                                    void *context);
 
@@ -1899,10 +1899,10 @@ typedef enum {
  *                                          SilcClientConnection conn,
  *                                          SilcClientMonitorStatus status,
  *                                          SilcClientFileError error,
- *                                          uint64 offset,
- *                                          uint64 filesize,
+ *                                          SilcUInt64 offset,
+ *                                          SilcUInt64 filesize,
  *                                          SilcClientEntry client_entry,
- *                                          uint32 session_id,
+ *                                          SilcUInt32 session_id,
  *                                          const char *filepath,
  *                                          void *context);
  *
@@ -1922,10 +1922,10 @@ typedef void (*SilcClientFileMonitor)(SilcClient client,
                                      SilcClientConnection conn,
                                      SilcClientMonitorStatus status,
                                      SilcClientFileError error,
-                                     uint64 offset,
-                                     uint64 filesize,
+                                     SilcUInt64 offset,
+                                     SilcUInt64 filesize,
                                      SilcClientEntry client_entry,
-                                     uint32 session_id,
+                                     SilcUInt32 session_id,
                                      const char *filepath,
                                      void *context);
 
@@ -1939,10 +1939,10 @@ typedef void (*SilcClientFileMonitor)(SilcClient client,
  *                          SilcClientFileMonitor monitor,
  *                          void *monitor_context,
  *                          const char *local_ip,
- *                          uint32 local_port,
+ *                          SilcUInt32 local_port,
  *                          SilcClientEntry client_entry,
  *                          const char *filepath);
- *                          uint32 *session_id);
+ *                          SilcUInt32 *session_id);
  *
  * DESCRIPTION
  *
@@ -1977,10 +1977,10 @@ silc_client_file_send(SilcClient client,
                      SilcClientFileMonitor monitor,
                      void *monitor_context,
                      const char *local_ip,
-                     uint32 local_port,
+                     SilcUInt32 local_port,
                      SilcClientEntry client_entry,
                      const char *filepath,
-                     uint32 *session_id);
+                     SilcUInt32 *session_id);
 
 /****f* silcclient/SilcClientAPI/silc_client_file_receive
  *
@@ -1991,7 +1991,7 @@ silc_client_file_send(SilcClient client,
  *                             SilcClientConnection conn,
  *                             SilcClientFileMonitor monitor,
  *                             void *monitor_context,
- *                             uint32 session_id);
+ *                             SilcUInt32 session_id);
  *
  * DESCRIPTION
  *
@@ -2013,7 +2013,7 @@ silc_client_file_receive(SilcClient client,
                         SilcClientConnection conn,
                         SilcClientFileMonitor monitor,
                         void *monitor_context,
-                        uint32 session_id);
+                        SilcUInt32 session_id);
 
 /****f* silcclient/SilcClientAPI/silc_client_file_close
  *
@@ -2021,7 +2021,7 @@ silc_client_file_receive(SilcClient client,
  *
  *    SilcClientFileError silc_client_file_close(SilcClient client,
  *                                               SilcClientConnection conn,
- *                                               uint32 session_id);
+ *                                               SilcUInt32 session_id);
  *
  * DESCRIPTION
  *
@@ -2034,7 +2034,7 @@ silc_client_file_receive(SilcClient client,
  ***/
 SilcClientFileError silc_client_file_close(SilcClient client,
                                           SilcClientConnection conn,
-                                          uint32 session_id);
+                                          SilcUInt32 session_id);
 
 #include "client.h"
 #include "command.h"
index 471e92c78fe18130da9bbbd89caac6ad4d7e8394..efd2cafd3d4bbd51b8dc50bca292e6f838e3bd23 100644 (file)
 ******************************************************************************/
 
 struct SilcArgumentPayloadStruct {
-  uint32 argc;
+  SilcUInt32 argc;
   unsigned char **argv;
-  uint32 *argv_lens;
-  uint32 *argv_types;
-  uint32 pos;
+  SilcUInt32 *argv_lens;
+  SilcUInt32 *argv_types;
+  SilcUInt32 pos;
 };
 
 /* Parses arguments and returns them into Argument Payload structure. */
 
 SilcArgumentPayload silc_argument_payload_parse(const unsigned char *payload,
-                                               uint32 payload_len,
-                                               uint32 argc)
+                                               SilcUInt32 payload_len,
+                                               SilcUInt32 argc)
 {
   SilcBufferStruct buffer;
   SilcArgumentPayload new;
-  uint16 p_len = 0;
+  SilcUInt16 p_len = 0;
   unsigned char arg_num = 0;
   unsigned char arg_type = 0;
-  uint32 pull_len = 0;
+  SilcUInt32 pull_len = 0;
   int i = 0, ret;
 
   SILC_LOG_DEBUG(("Parsing argument payload"));
@@ -55,8 +55,8 @@ SilcArgumentPayload silc_argument_payload_parse(const unsigned char *payload,
   silc_buffer_set(&buffer, (unsigned char *)payload, payload_len);
   new = silc_calloc(1, sizeof(*new));
   new->argv = silc_calloc(argc, sizeof(unsigned char *));
-  new->argv_lens = silc_calloc(argc, sizeof(uint32));
-  new->argv_types = silc_calloc(argc, sizeof(uint32));
+  new->argv_lens = silc_calloc(argc, sizeof(SilcUInt32));
+  new->argv_types = silc_calloc(argc, sizeof(SilcUInt32));
     
   /* Get arguments */
   arg_num = 1;
@@ -117,13 +117,13 @@ SilcArgumentPayload silc_argument_payload_parse(const unsigned char *payload,
 
 /* Encodes arguments in to Argument Paylods returning them to SilcBuffer. */
 
-SilcBuffer silc_argument_payload_encode(uint32 argc,
+SilcBuffer silc_argument_payload_encode(SilcUInt32 argc,
                                        unsigned char **argv,
-                                       uint32 *argv_lens,
-                                       uint32 *argv_types)
+                                       SilcUInt32 *argv_lens,
+                                       SilcUInt32 *argv_types)
 {
   SilcBuffer buffer;
-  uint32 len;
+  SilcUInt32 len;
   int i;
 
   SILC_LOG_DEBUG(("Encoding Argument payload"));
@@ -156,7 +156,7 @@ SilcBuffer silc_argument_payload_encode(uint32 argc,
 SilcBuffer silc_argument_payload_encode_payload(SilcArgumentPayload payload)
 {
   SilcBuffer buffer;
-  uint32 len;
+  SilcUInt32 len;
   int i;
 
   SILC_LOG_DEBUG(("Encoding Argument payload"));
@@ -203,7 +203,7 @@ void silc_argument_payload_free(SilcArgumentPayload payload)
 
 /* Returns number of arguments in payload */
 
-uint32 silc_argument_get_arg_num(SilcArgumentPayload payload)
+SilcUInt32 silc_argument_get_arg_num(SilcArgumentPayload payload)
 {
   return payload ? payload->argc : 0;
 }
@@ -211,7 +211,7 @@ uint32 silc_argument_get_arg_num(SilcArgumentPayload payload)
 /* Returns first argument from payload. */
 
 unsigned char *silc_argument_get_first_arg(SilcArgumentPayload payload,
-                                          uint32 *ret_len)
+                                          SilcUInt32 *ret_len)
 {
   if (!payload)
     return NULL;
@@ -227,7 +227,7 @@ unsigned char *silc_argument_get_first_arg(SilcArgumentPayload payload,
 /* Returns next argument from payload or NULL if no more arguments. */
 
 unsigned char *silc_argument_get_next_arg(SilcArgumentPayload payload,
-                                         uint32 *ret_len)
+                                         SilcUInt32 *ret_len)
 {
   if (!payload)
     return NULL;
@@ -244,8 +244,8 @@ unsigned char *silc_argument_get_next_arg(SilcArgumentPayload payload,
 /* Returns argument which type is `type'. */
 
 unsigned char *silc_argument_get_arg_type(SilcArgumentPayload payload,
-                                         uint32 type,
-                                         uint32 *ret_len)
+                                         SilcUInt32 type,
+                                         SilcUInt32 *ret_len)
 {
   int i;
 
index 687c199897a8342d4ec687e260104c5da23f6be8..9f3eebfe6947100bcf4d7795807943bef1907170 100644 (file)
@@ -35,8 +35,8 @@
  *
  *    SilcArgumentPayload 
  *    silc_argument_payload_parse(const unsigned char *payload,
- *                                uint32 payload_len,
- *                                uint32 argc);
+ *                                SilcUInt32 payload_len,
+ *                                SilcUInt32 argc);
  *
  * DESCRIPTION
  *
  *
  ***/
 SilcArgumentPayload silc_argument_payload_parse(const unsigned char *payload,
-                                               uint32 payload_len,
-                                               uint32 argc);
+                                               SilcUInt32 payload_len,
+                                               SilcUInt32 argc);
 
 /****f* silccore/SilcArgumentAPI/silc_argument_payload_encode
  *
  * SYNOPSIS
  *
- *    SilcBuffer silc_argument_payload_encode(uint32 argc,
+ *    SilcBuffer silc_argument_payload_encode(SilcUInt32 argc,
  *                                            unsigned char **argv,
- *                                            uint32 *argv_lens,
- *                                            uint32 *argv_types);
+ *                                            SilcUInt32 *argv_lens,
+ *                                            SilcUInt32 *argv_types);
  *
  * DESCRIPTION
  *
@@ -70,10 +70,10 @@ SilcArgumentPayload silc_argument_payload_parse(const unsigned char *payload,
  *    number of arguments.
  *
  ***/
-SilcBuffer silc_argument_payload_encode(uint32 argc,
+SilcBuffer silc_argument_payload_encode(SilcUInt32 argc,
                                        unsigned char **argv,
-                                       uint32 *argv_lens,
-                                       uint32 *argv_types);
+                                       SilcUInt32 *argv_lens,
+                                       SilcUInt32 *argv_types);
 
 /****f* silccore/SilcArgumentAPI/silc_argument_payload_encode_payload
  *
@@ -107,21 +107,21 @@ void silc_argument_payload_free(SilcArgumentPayload payload);
  *
  * SYNOPSIS
  *
- *    uint32 silc_argument_get_arg_num(SilcArgumentPayload payload);
+ *    SilcUInt32 silc_argument_get_arg_num(SilcArgumentPayload payload);
  *
  * DESCRIPTION
  *
  *    Returns the number of argument in the Argument Payload.
  *
  ***/
-uint32 silc_argument_get_arg_num(SilcArgumentPayload payload);
+SilcUInt32 silc_argument_get_arg_num(SilcArgumentPayload payload);
 
 /****f* silccore/SilcArgumentAPI/silc_argument_get_first_arg
  *
  * SYNOPSIS
  *
  *    unsigned char *silc_argument_get_first_arg(SilcArgumentPayload payload,
- *                                               uint32 *ret_len);
+ *                                               SilcUInt32 *ret_len);
  *
  * DESCRIPTION
  *
@@ -131,14 +131,14 @@ uint32 silc_argument_get_arg_num(SilcArgumentPayload payload);
  *
  ***/
 unsigned char *silc_argument_get_first_arg(SilcArgumentPayload payload,
-                                          uint32 *ret_len);
+                                          SilcUInt32 *ret_len);
 
 /****f* silccore/SilcArgumentAPI/silc_argument_get_next_arg
  *
  * SYNOPSIS
  *
  *    unsigned char *silc_argument_get_next_arg(SilcArgumentPayload payload,
- *                                              uint32 *ret_len);
+ *                                              SilcUInt32 *ret_len);
  *
  * DESCRIPTION
  *
@@ -149,15 +149,15 @@ unsigned char *silc_argument_get_first_arg(SilcArgumentPayload payload,
  *
  ***/
 unsigned char *silc_argument_get_next_arg(SilcArgumentPayload payload,
-                                         uint32 *ret_len);
+                                         SilcUInt32 *ret_len);
 
 /****f* silccore/SilcArgumentAPI/silc_argument_get_arg_type
  *
  * SYNOPSIS
  *
  *    unsigned char *silc_argument_get_arg_type(SilcArgumentPayload payload,
- *                                              uint32 type,
- *                                              uint32 *ret_len);
+ *                                              SilcUInt32 type,
+ *                                              SilcUInt32 *ret_len);
  *
  * DESCRIPTION
  *
@@ -169,7 +169,7 @@ unsigned char *silc_argument_get_next_arg(SilcArgumentPayload payload,
  *
  ***/
 unsigned char *silc_argument_get_arg_type(SilcArgumentPayload payload,
-                                         uint32 type,
-                                         uint32 *ret_len);
+                                         SilcUInt32 type,
+                                         SilcUInt32 *ret_len);
 
 #endif
index 3ee76ca41eccfcf3f2d789a16f0546e1e23c2274..23029640c43bef8f61cfee6248995199dfd04d38 100644 (file)
 
 /* Authentication Payload structure */
 struct SilcAuthPayloadStruct {
-  uint16 len;
-  uint16 auth_method;
-  uint16 random_len;
+  SilcUInt16 len;
+  SilcUInt16 auth_method;
+  SilcUInt16 random_len;
   unsigned char *random_data;
-  uint16 auth_len;
+  SilcUInt16 auth_len;
   unsigned char *auth_data;
 };
 
 /* Parses and returns Authentication Payload */
 
 SilcAuthPayload silc_auth_payload_parse(const unsigned char *data,
-                                       uint32 data_len)
+                                       SilcUInt32 data_len)
 {
   SilcBufferStruct buffer;
   SilcAuthPayload new;
@@ -84,12 +84,12 @@ SilcAuthPayload silc_auth_payload_parse(const unsigned char *data,
 
 SilcBuffer silc_auth_payload_encode(SilcAuthMethod method,
                                    const unsigned char *random_data,
-                                   uint16 random_len,
+                                   SilcUInt16 random_len,
                                    const unsigned char *auth_data,
-                                   uint16 auth_len)
+                                   SilcUInt16 auth_len)
 {
   SilcBuffer buffer;
-  uint32 len;
+  SilcUInt32 len;
 
   SILC_LOG_DEBUG(("Encoding Authentication Payload"));
 
@@ -135,7 +135,7 @@ SilcAuthMethod silc_auth_get_method(SilcAuthPayload payload)
 /* Get the authentication data */
 
 unsigned char *silc_auth_get_data(SilcAuthPayload payload,
-                                 uint32 *auth_len)
+                                 SilcUInt32 *auth_len)
 {
   if (auth_len)
     *auth_len = payload->auth_len;
@@ -155,12 +155,12 @@ unsigned char *silc_auth_get_data(SilcAuthPayload payload,
 static unsigned char *
 silc_auth_public_key_encode_data(SilcPublicKey public_key, 
                                 const unsigned char *random,
-                                uint32 random_len, const void *id,
-                                SilcIdType type, uint32 *ret_len)
+                                SilcUInt32 random_len, const void *id,
+                                SilcIdType type, SilcUInt32 *ret_len)
 {
   SilcBuffer buf;
   unsigned char *pk, *id_data, *ret;
-  uint32 pk_len, id_len;
+  SilcUInt32 pk_len, id_len;
 
   pk = silc_pkcs_public_key_encode(public_key, &pk_len);
   if (!pk)
@@ -204,9 +204,9 @@ SilcBuffer silc_auth_public_key_auth_generate(SilcPublicKey public_key,
 {
   unsigned char *random;
   unsigned char auth_data[1024];
-  uint32 auth_len;
+  SilcUInt32 auth_len;
   unsigned char *tmp;
-  uint32 tmp_len;
+  SilcUInt32 tmp_len;
   SilcBuffer buf;
   SilcPKCS pkcs;
 
@@ -265,7 +265,7 @@ bool silc_auth_public_key_auth_verify(SilcAuthPayload payload,
                                      const void *id, SilcIdType type)
 {
   unsigned char *tmp;
-  uint32 tmp_len;
+  SilcUInt32 tmp_len;
   SilcPKCS pkcs;
 
   SILC_LOG_DEBUG(("Verifying authentication data"));
@@ -310,7 +310,7 @@ bool silc_auth_public_key_auth_verify(SilcAuthPayload payload,
 /* Same as above but the payload is not parsed yet. This will parse it. */
 
 bool silc_auth_public_key_auth_verify_data(const unsigned char *payload,
-                                          uint32 payload_len,
+                                          SilcUInt32 payload_len,
                                           SilcPublicKey public_key, 
                                           SilcHash hash,
                                           const void *id, SilcIdType type)
@@ -340,7 +340,7 @@ bool silc_auth_public_key_auth_verify_data(const unsigned char *payload,
    `auth_data_len' is ignored. */
 
 bool silc_auth_verify(SilcAuthPayload payload, SilcAuthMethod auth_method,
-                     const void *auth_data, uint32 auth_data_len, 
+                     const void *auth_data, SilcUInt32 auth_data_len, 
                      SilcHash hash, const void *id, SilcIdType type)
 {
   SILC_LOG_DEBUG(("Verifying authentication"));
@@ -380,9 +380,9 @@ bool silc_auth_verify(SilcAuthPayload payload, SilcAuthMethod auth_method,
 
 /* Same as above but parses the authentication payload before verify. */
 
-bool silc_auth_verify_data(const unsigned char *payload, uint32 payload_len,
+bool silc_auth_verify_data(const unsigned char *payload, SilcUInt32 payload_len,
                           SilcAuthMethod auth_method, const void *auth_data,
-                          uint32 auth_data_len, SilcHash hash, 
+                          SilcUInt32 auth_data_len, SilcHash hash, 
                           const void *id, SilcIdType type)
 {
   SilcAuthPayload auth_payload;
@@ -408,16 +408,16 @@ bool silc_auth_verify_data(const unsigned char *payload, uint32 payload_len,
 
 /* The Key Agreement protocol structure */
 struct SilcKeyAgreementPayloadStruct {
-  uint16 hostname_len;
+  SilcUInt16 hostname_len;
   unsigned char *hostname;
-  uint32 port;
+  SilcUInt32 port;
 };
 
 /* Parses and returns an allocated Key Agreement payload. */
 
 SilcKeyAgreementPayload 
 silc_key_agreement_payload_parse(const unsigned char *payload,
-                                uint32 payload_len)
+                                SilcUInt32 payload_len)
 {
   SilcBufferStruct buffer;
   SilcKeyAgreementPayload new;
@@ -445,10 +445,10 @@ silc_key_agreement_payload_parse(const unsigned char *payload,
 /* Encodes the Key Agreement protocol and returns the encoded buffer */
 
 SilcBuffer silc_key_agreement_payload_encode(const char *hostname,
-                                            uint32 port)
+                                            SilcUInt32 port)
 {
   SilcBuffer buffer;
-  uint32 len = hostname ? strlen(hostname) : 0;
+  SilcUInt32 len = hostname ? strlen(hostname) : 0;
 
   SILC_LOG_DEBUG(("Encoding Key Agreement Payload"));
 
@@ -482,7 +482,7 @@ char *silc_key_agreement_get_hostname(SilcKeyAgreementPayload payload)
 
 /* Returns the port in the payload */
 
-uint32 silc_key_agreement_get_port(SilcKeyAgreementPayload payload)
+SilcUInt32 silc_key_agreement_get_port(SilcKeyAgreementPayload payload)
 {
   return payload->port;
 }
index 538de11b5941dd97e227e3c0b571a6cd6821b9bf..84d6789c461ca6b3ab14a59ab41dd5bc61e1b1b4 100644 (file)
@@ -75,7 +75,7 @@ typedef struct SilcKeyAgreementPayloadStruct *SilcKeyAgreementPayload;
  *
  * NAME
  * 
- *    typedef uint16 SilcAuthMethod;
+ *    typedef SilcUInt16 SilcAuthMethod;
  *
  * DESCRIPTION
  *
@@ -85,7 +85,7 @@ typedef struct SilcKeyAgreementPayloadStruct *SilcKeyAgreementPayload;
  *
  * SOURCE
  */
-typedef uint16 SilcAuthMethod;
+typedef SilcUInt16 SilcAuthMethod;
 
 #define SILC_AUTH_NONE        0                   /* No authentication */
 #define SILC_AUTH_PASSWORD    1                   /* Passphrase authentication */
@@ -104,7 +104,7 @@ typedef uint16 SilcAuthMethod;
  * SYNOPSIS
  *
  *    SilcAuthPayload silc_auth_payload_parse(const unsigned char *data,
- *                                            uint32 data_len);
+ *                                            SilcUInt32 data_len);
  *
  * DESCRIPTION
  *
@@ -113,7 +113,7 @@ typedef uint16 SilcAuthMethod;
  *
  ***/
 SilcAuthPayload silc_auth_payload_parse(const unsigned char *data,
-                                       uint32 data_len);
+                                       SilcUInt32 data_len);
 
 /****f* silccore/SilcAuthAPI/silc_auth_payload_encode
  *
@@ -121,9 +121,9 @@ SilcAuthPayload silc_auth_payload_parse(const unsigned char *data,
  *
  *    SilcBuffer silc_auth_payload_encode(SilcAuthMethod method,
  *                                        const unsigned char *random_data,
- *                                        uint16 random_len,
+ *                                        SilcUInt16 random_len,
  *                                        const unsigned char *auth_data,
- *                                        uint16 auth_len);
+ *                                        SilcUInt16 auth_len);
  *
  * DESCRIPTION
  *
@@ -134,9 +134,9 @@ SilcAuthPayload silc_auth_payload_parse(const unsigned char *data,
  ***/
 SilcBuffer silc_auth_payload_encode(SilcAuthMethod method,
                                    const unsigned char *random_data,
-                                   uint16 random_len,
+                                   SilcUInt16 random_len,
                                    const unsigned char *auth_data,
-                                   uint16 auth_len);
+                                   SilcUInt16 auth_len);
 
 /****f* silccore/SilcAuthAPI/silc_auth_payload_free
  *
@@ -169,7 +169,7 @@ SilcAuthMethod silc_auth_get_method(SilcAuthPayload payload);
  * SYNOPSIS
  *
  *    unsigned char *silc_auth_get_data(SilcAuthPayload payload,
- *                                      uint32 *auth_len);
+ *                                      SilcUInt32 *auth_len);
  *
  * DESCRIPTION
  *
@@ -177,7 +177,7 @@ SilcAuthMethod silc_auth_get_method(SilcAuthPayload payload);
  *
  ***/
 unsigned char *silc_auth_get_data(SilcAuthPayload payload,
-                                 uint32 *auth_len);
+                                 SilcUInt32 *auth_len);
 
 /****f* silccore/SilcAuthAPI/silc_auth_public_key_auth_generate
  *
@@ -226,7 +226,7 @@ bool silc_auth_public_key_auth_verify(SilcAuthPayload payload,
  * SYNOPSIS
  *
  *    bool silc_auth_public_key_auth_verify_data(const unsigned char *payload,
- *                                               uint32 payload_len,
+ *                                               SilcUInt32 payload_len,
  *                                               SilcPublicKey public_key, 
  *                                               SilcHash hash,
  *                                               const void *id, 
@@ -240,7 +240,7 @@ bool silc_auth_public_key_auth_verify(SilcAuthPayload payload,
  *
  ***/
 bool silc_auth_public_key_auth_verify_data(const unsigned char *payload,
-                                          uint32 payload_len,
+                                          SilcUInt32 payload_len,
                                           SilcPublicKey public_key, 
                                           SilcHash hash,
                                           const void *id, SilcIdType type);
@@ -251,7 +251,7 @@ bool silc_auth_public_key_auth_verify_data(const unsigned char *payload,
  *
  *    bool silc_auth_verify(SilcAuthPayload payload, 
  *                          SilcAuthMethod auth_method,
- *                          const void *auth_data, uint32 auth_data_len, 
+ *                          const void *auth_data, SilcUInt32 auth_data_len, 
  *                          SilcHash hash, const void *id, SilcIdType type);
  *
  * DESCRIPTION
@@ -265,7 +265,7 @@ bool silc_auth_public_key_auth_verify_data(const unsigned char *payload,
  *
  ***/
 bool silc_auth_verify(SilcAuthPayload payload, SilcAuthMethod auth_method,
-                     const void *auth_data, uint32 auth_data_len, 
+                     const void *auth_data, SilcUInt32 auth_data_len, 
                      SilcHash hash, const void *id, SilcIdType type);
 
 /****f* silccore/SilcAuthAPI/silc_auth_verify_data
@@ -273,10 +273,10 @@ bool silc_auth_verify(SilcAuthPayload payload, SilcAuthMethod auth_method,
  * SYNOPSIS
  *
  *    bool silc_auth_verify_data(const unsigned char *payload, 
- *                               uint32 payload_len,
+ *                               SilcUInt32 payload_len,
  *                               SilcAuthMethod auth_method, 
  *                               const void *auth_data,
- *                               uint32 auth_data_len, SilcHash hash, 
+ *                               SilcUInt32 auth_data_len, SilcHash hash, 
  *                               const void *id, SilcIdType type);
  * 
  * DESCRIPTION
@@ -290,9 +290,9 @@ bool silc_auth_verify(SilcAuthPayload payload, SilcAuthMethod auth_method,
  *    `auth_data_len' is ignored.
  *
  ***/
-bool silc_auth_verify_data(const unsigned char *payload, uint32 payload_len,
+bool silc_auth_verify_data(const unsigned char *payload, SilcUInt32 payload_len,
                           SilcAuthMethod auth_method, const void *auth_data,
-                          uint32 auth_data_len, SilcHash hash, 
+                          SilcUInt32 auth_data_len, SilcHash hash, 
                           const void *id, SilcIdType type);
 
 /****f* silccore/SilcAuthAPI/silc_key_agreement_payload_parse
@@ -301,7 +301,7 @@ bool silc_auth_verify_data(const unsigned char *payload, uint32 payload_len,
  *
  *    SilcKeyAgreementPayload 
  *    silc_key_agreement_payload_parse(const unsigned char *payload,
- *                                     uint32 payload_len);
+ *                                     SilcUInt32 payload_len);
  *
  * DESCRIPTION
  *
@@ -310,14 +310,14 @@ bool silc_auth_verify_data(const unsigned char *payload, uint32 payload_len,
  ***/
 SilcKeyAgreementPayload 
 silc_key_agreement_payload_parse(const unsigned char *payload,
-                                uint32 payload_len);
+                                SilcUInt32 payload_len);
 
 /****f* silccore/SilcAuthAPI/silc_key_agreement_payload_encode
  *
  * SYNOPSIS
  *
  *    SilcBuffer silc_key_agreement_payload_encode(char *hostname,
- *                                                 uint32 port);
+ *                                                 SilcUInt32 port);
  *
  * DESCRIPTION
  *
@@ -325,7 +325,7 @@ silc_key_agreement_payload_parse(const unsigned char *payload,
  *
  ***/
 SilcBuffer silc_key_agreement_payload_encode(const char *hostname,
-                                            uint32 port);
+                                            SilcUInt32 port);
 
 /****f* silccore/SilcAuthAPI/silc_key_agreement_payload_free
  *
@@ -359,7 +359,7 @@ char *silc_key_agreement_get_hostname(SilcKeyAgreementPayload payload);
  *
  * SYNOPSIS
  *
- *    uint32 silc_key_agreement_get_port(SilcKeyAgreementPayload payload);
+ *    SilcUInt32 silc_key_agreement_get_port(SilcKeyAgreementPayload payload);
  *
  * DESCRIPTION
  *
@@ -368,6 +368,6 @@ char *silc_key_agreement_get_hostname(SilcKeyAgreementPayload payload);
  *    the SILC Key Exchange protocol.
  *
  ***/
-uint32 silc_key_agreement_get_port(SilcKeyAgreementPayload payload);
+SilcUInt32 silc_key_agreement_get_port(SilcKeyAgreementPayload payload);
 
 #endif
index 0784a3b69ba2cc4d9911a13e4553bcc2e21aae26..ae6ac4be73493973807189e916b875809ddc6176 100644 (file)
 /* Channel Message Payload structure. Contents of this structure is parsed
    from SILC packets. */
 struct SilcChannelPayloadStruct {
-  uint16 name_len;
+  SilcUInt16 name_len;
   unsigned char *channel_name;
-  uint16 id_len;
+  SilcUInt16 id_len;
   unsigned char *channel_id;
-  uint32 mode;
+  SilcUInt32 mode;
 };
 
 /* Parses channel payload returning new channel payload structure. */
 
 SilcChannelPayload silc_channel_payload_parse(const unsigned char *payload,
-                                             uint32 payload_len)
+                                             SilcUInt32 payload_len)
 {
   SilcBufferStruct buffer;
   SilcChannelPayload new;
@@ -81,7 +81,7 @@ SilcChannelPayload silc_channel_payload_parse(const unsigned char *payload,
 /* Parses list of channel payloads returning list of payloads. */
 
 SilcDList silc_channel_payload_parse_list(const unsigned char *payload,
-                                         uint32 payload_len)
+                                         SilcUInt32 payload_len)
 {
   SilcBufferStruct buffer;
   SilcDList list;
@@ -129,10 +129,10 @@ SilcDList silc_channel_payload_parse_list(const unsigned char *payload,
 /* Encode new channel payload and returns it as buffer. */
 
 SilcBuffer silc_channel_payload_encode(const unsigned char *channel_name,
-                                      uint16 channel_name_len,
+                                      SilcUInt16 channel_name_len,
                                       const unsigned char *channel_id,
-                                      uint32 channel_id_len,
-                                      uint32 mode)
+                                      SilcUInt32 channel_id_len,
+                                      SilcUInt32 mode)
 {
   SilcBuffer buffer;
 
@@ -182,7 +182,7 @@ void silc_channel_payload_list_free(SilcDList list)
 /* Return the channel name */
 
 unsigned char *silc_channel_get_name(SilcChannelPayload payload,
-                                    uint32 *channel_name_len)
+                                    SilcUInt32 *channel_name_len)
 {
   if (channel_name_len)
     *channel_name_len = payload->name_len;
@@ -193,7 +193,7 @@ unsigned char *silc_channel_get_name(SilcChannelPayload payload,
 /* Return the channel ID */
 
 unsigned char *silc_channel_get_id(SilcChannelPayload payload,
-                                  uint32 *channel_id_len)
+                                  SilcUInt32 *channel_id_len)
 {
   if (channel_id_len)
     *channel_id_len = payload->id_len;
@@ -213,7 +213,7 @@ SilcChannelID *silc_channel_get_id_parse(SilcChannelPayload payload)
    channel or perhaps the mode of the client on the channel.  The protocol
    dictates what the usage of the mode is in different circumstances. */
 
-uint32 silc_channel_get_mode(SilcChannelPayload payload)
+SilcUInt32 silc_channel_get_mode(SilcChannelPayload payload)
 {
   return payload->mode;
 }
@@ -230,7 +230,7 @@ uint32 silc_channel_get_mode(SilcChannelPayload payload)
    from SILC packets. */
 struct SilcChannelMessagePayloadStruct {
   SilcMessageFlags flags;
-  uint16 data_len;
+  SilcUInt16 data_len;
   unsigned char *data;
   unsigned char *mac;
   unsigned char *iv;
@@ -247,7 +247,7 @@ bool silc_channel_message_payload_decrypt(unsigned char *data,
                                          SilcCipher cipher,
                                          SilcHmac hmac)
 {
-  uint32 iv_len, mac_len;
+  SilcUInt32 iv_len, mac_len;
   unsigned char *end, *mac, mac2[32];
   unsigned char *dst, iv[SILC_CIPHER_MAX_IV_SIZE];
 
@@ -299,14 +299,14 @@ bool silc_channel_message_payload_decrypt(unsigned char *data,
 
 SilcChannelMessagePayload 
 silc_channel_message_payload_parse(unsigned char *payload,
-                                  uint32 payload_len,
+                                  SilcUInt32 payload_len,
                                   SilcCipher cipher,
                                   SilcHmac hmac)
 {
   SilcBufferStruct buffer;
   SilcChannelMessagePayload new;
   int ret;
-  uint32 iv_len, mac_len;
+  SilcUInt32 iv_len, mac_len;
 
   SILC_LOG_DEBUG(("Parsing channel message payload"));
 
@@ -353,17 +353,17 @@ silc_channel_message_payload_parse(unsigned char *payload,
    encrypted separately from other parts of the packet padding must
    be applied to the payload. */
 
-SilcBuffer silc_channel_message_payload_encode(uint16 flags,
-                                              uint16 data_len,
+SilcBuffer silc_channel_message_payload_encode(SilcUInt16 flags,
+                                              SilcUInt16 data_len,
                                               const unsigned char *data,
-                                              uint16 iv_len,
+                                              SilcUInt16 iv_len,
                                               unsigned char *iv,
                                               SilcCipher cipher,
                                               SilcHmac hmac)
 {
   int i;
   SilcBuffer buffer;
-  uint32 len, pad_len, mac_len;
+  SilcUInt32 len, pad_len, mac_len;
   unsigned char pad[16];
   unsigned char mac[32];
 
@@ -436,7 +436,7 @@ silc_channel_message_get_flags(SilcChannelMessagePayload payload)
 /* Return data */
 
 unsigned char *silc_channel_message_get_data(SilcChannelMessagePayload payload,
-                                            uint32 *data_len)
+                                            SilcUInt32 *data_len)
 {
   if (data_len)
     *data_len = payload->data_len;
@@ -467,11 +467,11 @@ unsigned char *silc_channel_message_get_iv(SilcChannelMessagePayload payload)
 /* Channel Key Payload structrue. Channel keys are parsed from SILC
    packets into this structure. */
 struct SilcChannelKeyPayloadStruct {
-  uint16 id_len;
+  SilcUInt16 id_len;
   unsigned char *id;
-  uint16 cipher_len;
+  SilcUInt16 cipher_len;
   unsigned char *cipher;
-  uint16 key_len;
+  SilcUInt16 key_len;
   unsigned char *key;
 };
 
@@ -479,7 +479,7 @@ struct SilcChannelKeyPayloadStruct {
 
 SilcChannelKeyPayload 
 silc_channel_key_payload_parse(const unsigned char *payload,
-                              uint32 payload_len)
+                              SilcUInt32 payload_len)
 {
   SilcBufferStruct buffer;
   SilcChannelKeyPayload new;
@@ -522,15 +522,15 @@ silc_channel_key_payload_parse(const unsigned char *payload,
 /* Encodes channel key payload into a buffer and returns it. This is used 
    to add channel key payload into a packet. */
 
-SilcBuffer silc_channel_key_payload_encode(uint16 id_len,
+SilcBuffer silc_channel_key_payload_encode(SilcUInt16 id_len,
                                           const unsigned char *id,
-                                          uint16 cipher_len,
+                                          SilcUInt16 cipher_len,
                                           const unsigned char *cipher,
-                                          uint16 key_len,
+                                          SilcUInt16 key_len,
                                           const unsigned char *key)
 {
   SilcBuffer buffer;
-  uint32 len;
+  SilcUInt32 len;
 
   SILC_LOG_DEBUG(("Encoding channel key payload"));
 
@@ -572,7 +572,7 @@ void silc_channel_key_payload_free(SilcChannelKeyPayload payload)
 /* Return ID */
 
 unsigned char *silc_channel_key_get_id(SilcChannelKeyPayload payload, 
-                                      uint32 *id_len)
+                                      SilcUInt32 *id_len)
 {
   if (id_len)
     *id_len = payload->id_len;
@@ -583,7 +583,7 @@ unsigned char *silc_channel_key_get_id(SilcChannelKeyPayload payload,
 /* Return cipher name */
 
 unsigned char *silc_channel_key_get_cipher(SilcChannelKeyPayload payload,
-                                          uint32 *cipher_len)
+                                          SilcUInt32 *cipher_len)
 {
   if (cipher_len)
     *cipher_len = payload->cipher_len;
@@ -594,7 +594,7 @@ unsigned char *silc_channel_key_get_cipher(SilcChannelKeyPayload payload,
 /* Return key */
 
 unsigned char *silc_channel_key_get_key(SilcChannelKeyPayload payload,
-                                       uint32 *key_len)
+                                       SilcUInt32 *key_len)
 {
   if (key_len)
     *key_len = payload->key_len;
index 1db0c7b0e491fcbb911e38272c3bbb08e007bac2..792c31c83627f2ecc7b02be8b92f40c9ed86f4dc 100644 (file)
@@ -91,7 +91,7 @@ typedef struct SilcChannelKeyPayloadStruct *SilcChannelKeyPayload;
  *
  * NAME
  * 
- *    typedef uint16 SilcMessageFlags;
+ *    typedef SilcUInt16 SilcMessageFlags;
  *
  * DESCRIPTION
  *
@@ -101,7 +101,7 @@ typedef struct SilcChannelKeyPayloadStruct *SilcChannelKeyPayload;
  *
  * SOURCE
  */
-typedef uint16 SilcMessageFlags;
+typedef SilcUInt16 SilcMessageFlags;
 
 /* The message flags (shared by both channel and private messages) */
 #define SILC_MESSAGE_FLAG_NONE        0x0000
@@ -123,7 +123,7 @@ typedef uint16 SilcMessageFlags;
  *
  *    SilcChannelPayload 
  *    silc_channel_payload_parse(const unsigned char *payload,
- *                               uint32 payload_len);
+ *                               SilcUInt32 payload_len);
  *
  * DESCRIPTION
  *
@@ -132,7 +132,7 @@ typedef uint16 SilcMessageFlags;
  *
  ***/
 SilcChannelPayload silc_channel_payload_parse(const unsigned char *payload,
-                                             uint32 payload_len);
+                                             SilcUInt32 payload_len);
 
 /****f* silccore/SilcChannelAPI/silc_channel_payload_parse_list
  *
@@ -140,7 +140,7 @@ SilcChannelPayload silc_channel_payload_parse(const unsigned char *payload,
  *
  *    SilcDList
  *    silc_channel_payload_parse_list(const unsigned char *payload,
- *                                    uint32 payload_len);
+ *                                    SilcUInt32 payload_len);
  *
  * DESCRIPTION
  *
@@ -150,17 +150,17 @@ SilcChannelPayload silc_channel_payload_parse(const unsigned char *payload,
  *
  ***/
 SilcDList silc_channel_payload_parse_list(const unsigned char *payload,
-                                         uint32 payload_len);
+                                         SilcUInt32 payload_len);
 
 /****f* silccore/SilcChannelAPI/silc_channel_payload_encode
  *
  * SYNOPSIS
  *
  *    SilcBuffer silc_channel_payload_encode(const unsigned char *channel_name,
- *                                           uint16 channel_name_len,
+ *                                           SilcUInt16 channel_name_len,
  *                                           const unsigned char *channel_id,
- *                                           uint32 channel_id_len,
- *                                           uint32 mode);
+ *                                           SilcUInt32 channel_id_len,
+ *                                           SilcUInt32 mode);
  *
  * DESCRIPTION
  *
@@ -168,10 +168,10 @@ SilcDList silc_channel_payload_parse_list(const unsigned char *payload,
  *
  ***/
 SilcBuffer silc_channel_payload_encode(const unsigned char *channel_name,
-                                      uint16 channel_name_len,
+                                      SilcUInt16 channel_name_len,
                                       const unsigned char *channel_id,
-                                      uint32 channel_id_len,
-                                      uint32 mode);
+                                      SilcUInt32 channel_id_len,
+                                      SilcUInt32 mode);
 
 /****f* silccore/SilcChannelAPI/silc_channel_payload_free
  *
@@ -204,7 +204,7 @@ void silc_channel_payload_list_free(SilcDList list);
  * SYNOPSIS
  *
  *    unsigned char *silc_channel_get_name(SilcChannelPayload payload,
- *                                         uint32 *channel_name_len);
+ *                                         SilcUInt32 *channel_name_len);
  *
  * DESCRIPTION
  *
@@ -212,14 +212,14 @@ void silc_channel_payload_list_free(SilcDList list);
  *
  ***/
 unsigned char *silc_channel_get_name(SilcChannelPayload payload,
-                                    uint32 *channel_name_len);
+                                    SilcUInt32 *channel_name_len);
 
 /****f* silccore/SilcChannelAPI/silc_channel_get_id
  *
  * SYNOPSIS
  *
  *    unsigned char *silc_channel_get_id(SilcChannelPayload payload,
- *                                       uint32 *channel_id_len);
+ *                                       SilcUInt32 *channel_id_len);
  *
  * DESCRIPTION
  *
@@ -227,7 +227,7 @@ unsigned char *silc_channel_get_name(SilcChannelPayload payload,
  *
  ***/
 unsigned char *silc_channel_get_id(SilcChannelPayload payload,
-                                  uint32 *channel_id_len);
+                                  SilcUInt32 *channel_id_len);
 
 /****f* silccore/SilcChannelAPI/silc_channel_get_id_parse
  *
@@ -248,7 +248,7 @@ SilcChannelID *silc_channel_get_id_parse(SilcChannelPayload payload);
  *
  * SYNOPSIS
  *
- *    uint32 silc_channel_get_mode(SilcChannelPayload payload);
+ *    SilcUInt32 silc_channel_get_mode(SilcChannelPayload payload);
  *
  * DESCRIPTION
  *
@@ -257,7 +257,7 @@ SilcChannelID *silc_channel_get_id_parse(SilcChannelPayload payload);
  *    dictates what the usage of the mode is in different circumstances.
  *
  ***/
-uint32 silc_channel_get_mode(SilcChannelPayload payload);
+SilcUInt32 silc_channel_get_mode(SilcChannelPayload payload);
 
 /****f* silccore/SilcChannelAPI/silc_channel_message_payload_decrypt
  *
@@ -296,7 +296,7 @@ bool silc_channel_message_payload_decrypt(unsigned char *data,
  *
  *    SilcChannelMessagePayload 
  *    silc_channel_message_payload_parse(const unsigned char *payload,
- *                                       uint32 payload_len,
+ *                                       SilcUInt32 payload_len,
  *                                       SilcCipher cipher,
  *                                       SilcHmac hmac);
  *
@@ -312,7 +312,7 @@ bool silc_channel_message_payload_decrypt(unsigned char *data,
  ***/
 SilcChannelMessagePayload 
 silc_channel_message_payload_parse(unsigned char *payload,
-                                  uint32 payload_len,
+                                  SilcUInt32 payload_len,
                                   SilcCipher cipher,
                                   SilcHmac hmac);
 
@@ -320,10 +320,10 @@ silc_channel_message_payload_parse(unsigned char *payload,
  *
  * SYNOPSIS
  *
- *    SilcBuffer silc_channel_message_payload_encode(uint16 flags,
- *                                                   uint16 data_len,
+ *    SilcBuffer silc_channel_message_payload_encode(SilcUInt16 flags,
+ *                                                   SilcUInt16 data_len,
  *                                                   const unsigned char *data,
- *                                                   uint16 iv_len,
+ *                                                   SilcUInt16 iv_len,
  *                                                   unsigned char *iv,
  *                                                   SilcCipher cipher,
  *                                                   SilcHmac hmac);
@@ -339,10 +339,10 @@ silc_channel_message_payload_parse(unsigned char *payload,
  *    payload.
  *
  ***/
-SilcBuffer silc_channel_message_payload_encode(uint16 flags,
-                                              uint16 data_len,
+SilcBuffer silc_channel_message_payload_encode(SilcUInt16 flags,
+                                              SilcUInt16 data_len,
                                               const unsigned char *data,
-                                              uint16 iv_len,
+                                              SilcUInt16 iv_len,
                                               unsigned char *iv,
                                               SilcCipher cipher,
                                               SilcHmac hmac);
@@ -382,7 +382,7 @@ silc_channel_message_get_flags(SilcChannelMessagePayload payload);
  *
  *    unsigned char *
  *    silc_channel_message_get_data(SilcChannelMessagePayload payload,
- *                                  uint32 *data_len);
+ *                                  SilcUInt32 *data_len);
  *
  * DESCRIPTION
  *
@@ -391,7 +391,7 @@ silc_channel_message_get_flags(SilcChannelMessagePayload payload);
  *
  ***/
 unsigned char *silc_channel_message_get_data(SilcChannelMessagePayload payload,
-                                            uint32 *data_len);
+                                            SilcUInt32 *data_len);
 
 /****f* silccore/SilcChannelAPI/silc_channel_message_get_mac
  *
@@ -439,17 +439,17 @@ unsigned char *silc_channel_message_get_iv(SilcChannelMessagePayload payload);
  ***/
 SilcChannelKeyPayload 
 silc_channel_key_payload_parse(const unsigned char *payload,
-                              uint32 payload_len);
+                              SilcUInt32 payload_len);
 
 /****f* silccore/SilcChannelAPI/silc_channel_key_payload_encode
  *
  * SYNOPSIS
  *
- *    SilcBuffer silc_channel_key_payload_encode(uint16 id_len,
+ *    SilcBuffer silc_channel_key_payload_encode(SilcUInt16 id_len,
  *                                               const unsigned char *id,
- *                                               uint16 cipher_len,
+ *                                               SilcUInt16 cipher_len,
  *                                               const unsigned char *cipher,
- *                                               uint16 key_len,
+ *                                               SilcUInt16 key_len,
  *                                               const unsigned char *key);
  *
  * DESCRIPTION
@@ -458,11 +458,11 @@ silc_channel_key_payload_parse(const unsigned char *payload,
  *    to add channel key payload into a packet.
  *
  ***/
-SilcBuffer silc_channel_key_payload_encode(uint16 id_len,
+SilcBuffer silc_channel_key_payload_encode(SilcUInt16 id_len,
                                           const unsigned char *id,
-                                          uint16 cipher_len,
+                                          SilcUInt16 cipher_len,
                                           const unsigned char *cipher,
-                                          uint16 key_len,
+                                          SilcUInt16 key_len,
                                           const unsigned char *key);
 
 /****f* silccore/SilcChannelAPI/silc_channel_key_payload_free
@@ -483,7 +483,7 @@ void silc_channel_key_payload_free(SilcChannelKeyPayload payload);
  * SYNOPSIS
  *
  *    unsigned char *silc_channel_key_get_id(SilcChannelKeyPayload payload, 
- *                                           uint32 *id_len);
+ *                                           SilcUInt32 *id_len);
  *
  * DESCRIPTION
  *
@@ -492,14 +492,14 @@ void silc_channel_key_payload_free(SilcChannelKeyPayload payload);
  *
  ***/
 unsigned char *silc_channel_key_get_id(SilcChannelKeyPayload payload, 
-                                      uint32 *id_len);
+                                      SilcUInt32 *id_len);
 
 /****f* silccore/SilcChannelAPI/silc_channel_key_get_cipher
  *
  * SYNOPSIS
  *
  *    unsigned char *silc_channel_key_get_cipher(SilcChannelKeyPayload payload,
- *                                               uint32 *cipher_len);
+ *                                               SilcUInt32 *cipher_len);
  *
  * DESCRIPTION
  *
@@ -508,14 +508,14 @@ unsigned char *silc_channel_key_get_id(SilcChannelKeyPayload payload,
  *
  ***/
 unsigned char *silc_channel_key_get_cipher(SilcChannelKeyPayload payload,
-                                          uint32 *cipher_len);
+                                          SilcUInt32 *cipher_len);
 
 /****f* silccore/SilcChannelAPI/silc_channel_key_get_key
  *
  * SYNOPSIS
  *
  *    unsigned char *silc_channel_key_get_key(SilcChannelKeyPayload payload,
- *                                            uint32 *key_len);
+ *                                            SilcUInt32 *key_len);
  *
  * DESCRIPTION
  *
@@ -524,6 +524,6 @@ unsigned char *silc_channel_key_get_cipher(SilcChannelKeyPayload payload,
  *
  ***/
 unsigned char *silc_channel_key_get_key(SilcChannelKeyPayload payload,
-                                       uint32 *key_len);
+                                       SilcUInt32 *key_len);
 
 #endif
index 04f03d6b6a6d1acc02fcbd7e4c22cc50cb6f24fc..50d96200eddc547736e9604514524af7479de95a 100644 (file)
@@ -32,7 +32,7 @@
    from SILC packets. */
 struct SilcCommandPayloadStruct {
   SilcCommand cmd;
-  uint16 ident;
+  SilcUInt16 ident;
   SilcArgumentPayload args;
 };
 
@@ -42,12 +42,12 @@ struct SilcCommandPayloadStruct {
 /* Parses command payload returning new command payload structure */
 
 SilcCommandPayload silc_command_payload_parse(const unsigned char *payload,
-                                             uint32 payload_len)
+                                             SilcUInt32 payload_len)
 {
   SilcBufferStruct buffer;
   SilcCommandPayload new;
   unsigned char args_num;
-  uint16 p_len;
+  SilcUInt16 p_len;
   int ret;
 
   SILC_LOG_DEBUG(("Parsing command payload"));
@@ -94,15 +94,15 @@ SilcCommandPayload silc_command_payload_parse(const unsigned char *payload,
 /* Encodes Command Payload returning it to SilcBuffer. */
 
 SilcBuffer silc_command_payload_encode(SilcCommand cmd,
-                                      uint32 argc,
+                                      SilcUInt32 argc,
                                       unsigned char **argv,
-                                      uint32 *argv_lens,
-                                      uint32 *argv_types,
-                                      uint16 ident)
+                                      SilcUInt32 *argv_lens,
+                                      SilcUInt32 *argv_types,
+                                      SilcUInt16 ident)
 {
   SilcBuffer buffer;
   SilcBuffer args = NULL;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
 
   SILC_LOG_DEBUG(("Encoding command payload"));
 
@@ -143,8 +143,8 @@ SilcBuffer silc_command_payload_encode_payload(SilcCommandPayload payload)
 {
   SilcBuffer buffer;
   SilcBuffer args = NULL;
-  uint32 len = 0;
-  uint32 argc = 0;
+  SilcUInt32 len = 0;
+  SilcUInt32 argc = 0;
 
   SILC_LOG_DEBUG(("Encoding command payload"));
 
@@ -180,16 +180,16 @@ SilcBuffer silc_command_payload_encode_payload(SilcCommandPayload payload)
 }
 
 /* Encodes Command payload with variable argument list. The arguments
-   must be: uint32, unsigned char *, unsigned int, ... One 
-   {uint32, unsigned char * and unsigned int} forms one argument, 
-   thus `argc' in case when sending one {uint32, unsigned char * 
-   and uint32} equals one (1) and when sending two of those it
+   must be: SilcUInt32, unsigned char *, unsigned int, ... One 
+   {SilcUInt32, unsigned char * and unsigned int} forms one argument, 
+   thus `argc' in case when sending one {SilcUInt32, unsigned char * 
+   and SilcUInt32} equals one (1) and when sending two of those it
    equals two (2), and so on. This has to be preserved or bad things
    will happen. The variable arguments is: {type, data, data_len}. */
 
 SilcBuffer silc_command_payload_encode_va(SilcCommand cmd, 
-                                         uint16 ident, 
-                                         uint32 argc, ...)
+                                         SilcUInt16 ident, 
+                                         SilcUInt32 argc, ...)
 {
   va_list ap;
   SilcBuffer buffer;
@@ -204,26 +204,26 @@ SilcBuffer silc_command_payload_encode_va(SilcCommand cmd,
 /* Same as above but with va_list. */
 
 SilcBuffer silc_command_payload_encode_vap(SilcCommand cmd, 
-                                          uint16 ident, 
-                                          uint32 argc, va_list ap)
+                                          SilcUInt16 ident, 
+                                          SilcUInt32 argc, va_list ap)
 {
   unsigned char **argv = NULL;
-  uint32 *argv_lens = NULL, *argv_types = NULL;
+  SilcUInt32 *argv_lens = NULL, *argv_types = NULL;
   unsigned char *x;
-  uint32 x_len;
-  uint32 x_type;
+  SilcUInt32 x_len;
+  SilcUInt32 x_type;
   SilcBuffer buffer;
   int i, k = 0;
 
   if (argc) {
     argv = silc_calloc(argc, sizeof(unsigned char *));
-    argv_lens = silc_calloc(argc, sizeof(uint32));
-    argv_types = silc_calloc(argc, sizeof(uint32));
+    argv_lens = silc_calloc(argc, sizeof(SilcUInt32));
+    argv_types = silc_calloc(argc, sizeof(SilcUInt32));
 
     for (i = 0, k = 0; i < argc; i++) {
-      x_type = va_arg(ap, uint32);
+      x_type = va_arg(ap, SilcUInt32);
       x = va_arg(ap, unsigned char *);
-      x_len = va_arg(ap, uint32);
+      x_len = va_arg(ap, SilcUInt32);
       
       if (!x_type || !x || !x_len)
        continue;
@@ -255,8 +255,8 @@ SilcBuffer silc_command_payload_encode_vap(SilcCommand cmd,
 SilcBuffer 
 silc_command_reply_payload_encode_va(SilcCommand cmd, 
                                     SilcCommandStatus status,
-                                    uint16 ident,
-                                    uint32 argc, ...)
+                                    SilcUInt16 ident,
+                                    SilcUInt32 argc, ...)
 {
   va_list ap;
   SilcBuffer buffer;
@@ -271,22 +271,22 @@ silc_command_reply_payload_encode_va(SilcCommand cmd,
 SilcBuffer 
 silc_command_reply_payload_encode_vap(SilcCommand cmd, 
                                      SilcCommandStatus status,
-                                     uint16 ident, uint32 argc, 
+                                     SilcUInt16 ident, SilcUInt32 argc, 
                                      va_list ap)
 {
   unsigned char **argv;
-  uint32 *argv_lens = NULL, *argv_types = NULL;
+  SilcUInt32 *argv_lens = NULL, *argv_types = NULL;
   unsigned char status_data[2];
   unsigned char *x;
-  uint32 x_len;
-  uint32 x_type;
+  SilcUInt32 x_len;
+  SilcUInt32 x_type;
   SilcBuffer buffer;
   int i, k;
 
   argc++;
   argv = silc_calloc(argc, sizeof(unsigned char *));
-  argv_lens = silc_calloc(argc, sizeof(uint32));
-  argv_types = silc_calloc(argc, sizeof(uint32));
+  argv_lens = silc_calloc(argc, sizeof(SilcUInt32));
+  argv_types = silc_calloc(argc, sizeof(SilcUInt32));
 
   SILC_PUT16_MSB(status, status_data);
   argv[0] = silc_memdup(status_data, sizeof(status_data));
@@ -294,9 +294,9 @@ silc_command_reply_payload_encode_vap(SilcCommand cmd,
   argv_types[0] = 1;
 
   for (i = 1, k = 1; i < argc; i++) {
-    x_type = va_arg(ap, uint32);
+    x_type = va_arg(ap, SilcUInt32);
     x = va_arg(ap, unsigned char *);
-    x_len = va_arg(ap, uint32);
+    x_len = va_arg(ap, SilcUInt32);
 
     if (!x_type || !x || !x_len)
       continue;
@@ -345,7 +345,7 @@ SilcArgumentPayload silc_command_get_args(SilcCommandPayload payload)
 
 /* Returns identifier */
 
-uint16 silc_command_get_ident(SilcCommandPayload payload)
+SilcUInt16 silc_command_get_ident(SilcCommandPayload payload)
 {
   return payload->ident;
 }
@@ -354,7 +354,7 @@ uint16 silc_command_get_ident(SilcCommandPayload payload)
    payloads are frequentlly resent in SILC and thusly this makes it easy
    to set the identifier. */
 
-void silc_command_set_ident(SilcCommandPayload payload, uint16 ident)
+void silc_command_set_ident(SilcCommandPayload payload, SilcUInt16 ident)
 {
   payload->ident = ident;
 }
index 65ed46a2f5b652de0bd14a45009de2e5aa71e1ea..bbd1fcf46f8589e8a0a6f2469beb1a1bde4be407 100644 (file)
@@ -159,7 +159,7 @@ typedef unsigned char SilcCommand;
  *
  * NAME
  * 
- *    typedef uint16 SilcCommandStatus;
+ *    typedef SilcUInt16 SilcCommandStatus;
  *
  * DESCRIPTION
  *
@@ -169,7 +169,7 @@ typedef unsigned char SilcCommand;
  *
  * SOURCE
  */
-typedef uint16 SilcCommandStatus;
+typedef SilcUInt16 SilcCommandStatus;
 
 /* Command Status messages */
 #define SILC_STATUS_OK                      0
@@ -224,7 +224,7 @@ typedef uint16 SilcCommandStatus;
  *
  *    SilcCommandPayload 
  *    silc_command_payload_parse(const unsigned char *payload,
- *                               uint32 payload_len);
+ *                               SilcUInt32 payload_len);
  *
  * DESCRIPTION
  *
@@ -233,18 +233,18 @@ typedef uint16 SilcCommandStatus;
  *
  ***/
 SilcCommandPayload silc_command_payload_parse(const unsigned char *payload,
-                                             uint32 payload_len);
+                                             SilcUInt32 payload_len);
 
 /****f* silccore/SilcCommandAPI/silc_command_payload_encode
  *
  * SYNOPSIS
  *
  *    SilcBuffer silc_command_payload_encode(SilcCommand cmd,
- *                                           uint32 argc,
+ *                                           SilcUInt32 argc,
  *                                           unsigned char **argv,
- *                                           uint32 *argv_lens,
- *                                           uint32 *argv_types,
- *                                           uint16 ident);
+ *                                           SilcUInt32 *argv_lens,
+ *                                           SilcUInt32 *argv_types,
+ *                                           SilcUInt16 ident);
  *
  * DESCRIPTION
  *
@@ -252,11 +252,11 @@ SilcCommandPayload silc_command_payload_parse(const unsigned char *payload,
  *
  ***/
 SilcBuffer silc_command_payload_encode(SilcCommand cmd,
-                                      uint32 argc,
+                                      SilcUInt32 argc,
                                       unsigned char **argv,
-                                      uint32 *argv_lens,
-                                      uint32 *argv_types,
-                                      uint16 ident);
+                                      SilcUInt32 *argv_lens,
+                                      SilcUInt32 *argv_types,
+                                      SilcUInt16 ident);
 
 /****f* silccore/SilcCommandAPI/silc_command_payload_encode_payload
  *
@@ -278,31 +278,31 @@ SilcBuffer silc_command_payload_encode_payload(SilcCommandPayload payload);
  * SYNOPSIS
  *
  *    SilcBuffer silc_command_payload_encode_va(SilcCommand cmd, 
- *                                              uint16 ident, 
- *                                              uint32 argc, ...);
+ *                                              SilcUInt16 ident, 
+ *                                              SilcUInt32 argc, ...);
  *
  * DESCRIPTION
  *
  *    Encodes Command payload with variable argument list. The arguments
- *    must be: uint32, unsigned char *, unsigned int, ... One 
- *    {uint32, unsigned char * and unsigned int} forms one argument, 
- *    thus `argc' in case when sending one {uint32, unsigned char * 
- *    and uint32} equals one (1) and when sending two of those it
+ *    must be: SilcUInt32, unsigned char *, unsigned int, ... One 
+ *    {SilcUInt32, unsigned char * and unsigned int} forms one argument, 
+ *    thus `argc' in case when sending one {SilcUInt32, unsigned char * 
+ *    and SilcUInt32} equals one (1) and when sending two of those it
  *    equals two (2), and so on. This has to be preserved or bad things
  *    will happen. The variable arguments is: {type, data, data_len}.
  *
  ***/
 SilcBuffer silc_command_payload_encode_va(SilcCommand cmd, 
-                                         uint16 ident, 
-                                         uint32 argc, ...);
+                                         SilcUInt16 ident, 
+                                         SilcUInt32 argc, ...);
 
 /****f* silccore/SilcCommandAPI/silc_command_payload_encode_vap
  *
  * SYNOPSIS
  *
  *    SilcBuffer silc_command_payload_encode_vap(SilcCommand cmd, 
- *                                               uint16 ident, 
- *                                               uint32 argc, va_list ap);
+ *                                               SilcUInt16 ident, 
+ *                                               SilcUInt32 argc, va_list ap);
  *
  * DESCRIPTION
  *
@@ -311,8 +311,8 @@ SilcBuffer silc_command_payload_encode_va(SilcCommand cmd,
  *
  ***/
 SilcBuffer silc_command_payload_encode_vap(SilcCommand cmd, 
-                                          uint16 ident, 
-                                          uint32 argc, va_list ap);
+                                          SilcUInt16 ident, 
+                                          SilcUInt32 argc, va_list ap);
 
 /****f* silccore/SilcCommandAPI/silc_command_reply_payload_encode_va
  *
@@ -321,8 +321,8 @@ SilcBuffer silc_command_payload_encode_vap(SilcCommand cmd,
  *    SilcBuffer 
  *    silc_command_reply_payload_encode_va(SilcCommand cmd, 
  *                                         SilcCommandStatus status,
- *                                         uint16 ident,
- *                                         uint32 argc, ...);
+ *                                         SilcUInt16 ident,
+ *                                         SilcUInt32 argc, ...);
  *
  * DESCRIPTION
  *
@@ -335,8 +335,8 @@ SilcBuffer silc_command_payload_encode_vap(SilcCommand cmd,
 SilcBuffer 
 silc_command_reply_payload_encode_va(SilcCommand cmd, 
                                     SilcCommandStatus status,
-                                    uint16 ident,
-                                    uint32 argc, ...);
+                                    SilcUInt16 ident,
+                                    SilcUInt32 argc, ...);
 
 /****f* silccore/SilcCommandAPI/silc_command_reply_payload_encode_vap
  *
@@ -345,7 +345,7 @@ silc_command_reply_payload_encode_va(SilcCommand cmd,
  *    SilcBuffer 
  *    silc_command_reply_payload_encode_vap(SilcCommand cmd, 
  *                                          SilcCommandStatus status,
- *                                          uint16 ident, uint32 argc,
+ *                                          SilcUInt16 ident, SilcUInt32 argc,
  *                                          va_list ap);
  *
  * DESCRIPTION
@@ -357,7 +357,7 @@ silc_command_reply_payload_encode_va(SilcCommand cmd,
 SilcBuffer 
 silc_command_reply_payload_encode_vap(SilcCommand cmd, 
                                      SilcCommandStatus status,
-                                     uint16 ident, uint32 argc, 
+                                     SilcUInt16 ident, SilcUInt32 argc, 
                                      va_list ap);
 
 /****f* silccore/SilcCommandAPI/silc_command_free
@@ -404,7 +404,7 @@ SilcArgumentPayload silc_command_get_args(SilcCommandPayload payload);
  *
  * SYNOPSIS
  *
- *    uint16 silc_command_get_ident(SilcCommandPayload payload);
+ *    SilcUInt16 silc_command_get_ident(SilcCommandPayload payload);
  *
  * DESCRIPTION
  *
@@ -414,13 +414,13 @@ SilcArgumentPayload silc_command_get_args(SilcCommandPayload payload);
  *    the same identifier in the command reply.
  *
  ***/
-uint16 silc_command_get_ident(SilcCommandPayload payload);
+SilcUInt16 silc_command_get_ident(SilcCommandPayload payload);
 
 /****f* silccore/SilcCommandAPI/silc_command_set_ident
  *
  * SYNOPSIS
  *
- *    void silc_command_set_ident(SilcCommandPayload payload, uint16 ident);
+ *    void silc_command_set_ident(SilcCommandPayload payload, SilcUInt16 ident);
  *
  * DESCRIPTION
  *
@@ -429,7 +429,7 @@ uint16 silc_command_get_ident(SilcCommandPayload payload);
  *    to set the identifier without encoding new Command Payload. 
  *
  ***/
-void silc_command_set_ident(SilcCommandPayload payload, uint16 ident);
+void silc_command_set_ident(SilcCommandPayload payload, SilcUInt16 ident);
 
 /****f* silccore/SilcCommandAPI/silc_command_set_command
  *
index e3a37d8e99d91c312b1a7ba316eda11933c0af4d..655601efffc5ce0ff65afd0b3b6cacc9da204b8c 100644 (file)
 
 struct SilcIDPayloadStruct {
   SilcIdType type;
-  uint16 len;
+  SilcUInt16 len;
   unsigned char *id;
 };
 
 /* Parses buffer and return ID payload into payload structure */
 
 SilcIDPayload silc_id_payload_parse(const unsigned char *payload,
-                                   uint32 payload_len)
+                                   SilcUInt32 payload_len)
 {
   SilcBufferStruct buffer;
   SilcIDPayload new;
@@ -82,11 +82,11 @@ SilcIDPayload silc_id_payload_parse(const unsigned char *payload,
 
 /* Return the ID directly from the raw payload data. */
 
-void *silc_id_payload_parse_id(const unsigned char *data, uint32 len)
+void *silc_id_payload_parse_id(const unsigned char *data, SilcUInt32 len)
 {
   SilcBufferStruct buffer;
   SilcIdType type;
-  uint16 idlen;
+  SilcUInt16 idlen;
   unsigned char *id_data = NULL;
   int ret;
   void *id;
@@ -124,7 +124,7 @@ SilcBuffer silc_id_payload_encode(const void *id, SilcIdType type)
 {
   SilcBuffer buffer;
   unsigned char *id_data;
-  uint32 len;
+  SilcUInt32 len;
 
   id_data = silc_id_id2str(id, type);
   len = silc_id_get_len(id, type);
@@ -135,7 +135,7 @@ SilcBuffer silc_id_payload_encode(const void *id, SilcIdType type)
 }
 
 SilcBuffer silc_id_payload_encode_data(const unsigned char *id,
-                                      uint32 id_len, SilcIdType type)
+                                      SilcUInt32 id_len, SilcIdType type)
 {
   SilcBuffer buffer;
 
@@ -190,7 +190,7 @@ unsigned char *silc_id_payload_get_data(SilcIDPayload payload)
 
 /* Get length of ID */
 
-uint32 silc_id_payload_get_len(SilcIDPayload payload)
+SilcUInt32 silc_id_payload_get_len(SilcIDPayload payload)
 {
   return payload ? payload->len : 0;
 }
@@ -203,7 +203,7 @@ unsigned char *silc_id_id2str(const void *id, SilcIdType type)
   SilcServerID *server_id;
   SilcClientID *client_id;
   SilcChannelID *channel_id;
-  uint32 id_len = silc_id_get_len(id, type);
+  SilcUInt32 id_len = silc_id_get_len(id, type);
 
   switch(type) {
   case SILC_ID_SERVER:
@@ -237,7 +237,7 @@ unsigned char *silc_id_id2str(const void *id, SilcIdType type)
 
 /* Converts string to a ID */
 
-void *silc_id_str2id(const unsigned char *id, uint32 id_len, SilcIdType type)
+void *silc_id_str2id(const unsigned char *id, SilcUInt32 id_len, SilcIdType type)
 {
 
   switch(type) {
@@ -299,7 +299,7 @@ void *silc_id_str2id(const unsigned char *id, uint32 id_len, SilcIdType type)
 
 /* Returns length of the ID */
 
-uint32 silc_id_get_len(const void *id, SilcIdType type)
+SilcUInt32 silc_id_get_len(const void *id, SilcIdType type)
 {
   switch(type) {
   case SILC_ID_SERVER:
index 975d19d7ef2812a12dec8b38b6f686c272320ea0..821285ee044408e2ecff05887514d7fdc1107a7f 100644 (file)
@@ -44,7 +44,7 @@
  *
  * NAME
  * 
- *    typedef uint16 SilcIdType;
+ *    typedef SilcUInt16 SilcIdType;
  *
  * DESCRIPTION
  *
@@ -52,7 +52,7 @@
  *
  * SOURCE
  */
-typedef uint16 SilcIdType;
+typedef SilcUInt16 SilcIdType;
 
 /* The SILC ID Types */
 #define SILC_ID_NONE        0
@@ -108,7 +108,7 @@ typedef struct SilcArgumentPayloadStruct *SilcArgumentPayload;
  * SYNOPSIS
  *
  *    SilcIDPayload silc_id_payload_parse(const unsigned char *payload,
- *                                        uint32 payload_len);
+ *                                        SilcUInt32 payload_len);
  *
  * DESCRIPTION
  *
@@ -117,13 +117,13 @@ typedef struct SilcArgumentPayloadStruct *SilcArgumentPayload;
  *
  ***/
 SilcIDPayload silc_id_payload_parse(const unsigned char *payload,
-                                   uint32 payload_len);
+                                   SilcUInt32 payload_len);
 
 /****f* silccore/SilcIDAPI/silc_id_payload_parse_id
  *
  * SYNOPSIS
  *
- *    void *silc_id_payload_parse_id(const unsigned char *data, uint32 len);
+ *    void *silc_id_payload_parse_id(const unsigned char *data, SilcUInt32 len);
  *
  * DESCRIPTION
  *
@@ -131,7 +131,7 @@ SilcIDPayload silc_id_payload_parse(const unsigned char *payload,
  *    caller must free the returned ID.
  *
  ***/
-void *silc_id_payload_parse_id(const unsigned char *data, uint32 len);
+void *silc_id_payload_parse_id(const unsigned char *data, SilcUInt32 len);
 
 /****f* silccore/SilcIDAPI/silc_id_payload_encode
  *
@@ -161,7 +161,7 @@ SilcBuffer silc_id_payload_encode(const void *id, SilcIdType type);
  *
  ***/
 SilcBuffer silc_id_payload_encode_data(const unsigned char *id,
-                                      uint32 id_len, SilcIdType type);
+                                      SilcUInt32 id_len, SilcIdType type);
 
 /****f* silccore/SilcIDAPI/silc_id_payload_free
  *
@@ -222,14 +222,14 @@ unsigned char *silc_id_payload_get_data(SilcIDPayload payload);
  *
  * SYNOPSIS
  *
- *    uint32 silc_id_payload_get_len(SilcIDPayload payload);
+ *    SilcUInt32 silc_id_payload_get_len(SilcIDPayload payload);
  *
  * DESCRIPTION
  *
  *    Returns the length of the ID in the ID Payload.
  *
  ***/
-uint32 silc_id_payload_get_len(SilcIDPayload payload);
+SilcUInt32 silc_id_payload_get_len(SilcIDPayload payload);
 
 /****s* silccore/SilcIDAPI/SilcIDIP
  *
@@ -247,7 +247,7 @@ uint32 silc_id_payload_get_len(SilcIDPayload payload);
  */
 typedef struct {
   unsigned char data[16];      /* IP data (in MSB first order) */
-  uint8 data_len;              /* Length of the data (4 or 16) */
+  SilcUInt8 data_len;          /* Length of the data (4 or 16) */
 } SilcIDIP;
 /***/
 
@@ -269,8 +269,8 @@ typedef struct {
  */
 typedef struct {
   SilcIDIP ip;                 /* n bit IP address */
-  uint16 port;                 /* 16 bit port */
-  uint16 rnd;                  /* 16 bit random number */
+  SilcUInt16 port;                     /* 16 bit port */
+  SilcUInt16 rnd;                      /* 16 bit random number */
 } SilcServerID;
 /***/
 
@@ -315,8 +315,8 @@ typedef struct {
  */
 typedef struct {
   SilcIDIP ip;                                 /* n bit IP address */
-  uint16 port;                                 /* 16 bit port */
-  uint16 rnd;                                  /* 16 bit random number */
+  SilcUInt16 port;                                     /* 16 bit port */
+  SilcUInt16 rnd;                                      /* 16 bit random number */
 } SilcChannelID;
 /***/
 
@@ -443,7 +443,7 @@ unsigned char *silc_id_id2str(const void *id, SilcIdType type);
  *
  * SYNOPSIS
  *
- *    void *silc_id_str2id(const unsigned char *id, uint32 id_len, 
+ *    void *silc_id_str2id(const unsigned char *id, SilcUInt32 id_len, 
  *                         SilcIdType type);
  *
  * DESCRIPTION
@@ -452,20 +452,20 @@ unsigned char *silc_id_id2str(const void *id, SilcIdType type);
  *    ID out of data that has been taken for example from packet.
  *
  ***/
-void *silc_id_str2id(const unsigned char *id, uint32 id_len, SilcIdType type);
+void *silc_id_str2id(const unsigned char *id, SilcUInt32 id_len, SilcIdType type);
 
 /****f* silccore/SilcIDAPI/silc_id_get_len
  *
  * SYNOPSIS
  *
- *    uint32 silc_id_get_len(const void *id, SilcIdType type);
+ *    SilcUInt32 silc_id_get_len(const void *id, SilcIdType type);
  *
  * DESCRIPTION
  *
  *    Returns the true length of the ID of the type `type'.
  *
  ***/
-uint32 silc_id_get_len(const void *id, SilcIdType type);
+SilcUInt32 silc_id_get_len(const void *id, SilcIdType type);
 
 /****f* silccore/SilcIDAPI/silc_id_dup
  *
index 5cf2533af07d99bf5fae68e32c14b6a9f43f9952..a28c6833034bc19cc92c0d2073593b1612f6cb94 100644 (file)
@@ -87,9 +87,9 @@ struct SilcIDCacheStruct {
 struct SilcIDCacheListStruct {
   SilcIDCacheEntry cache[64];
   SilcIDCacheEntry *cache_dyn;
-  uint32 cache_dyn_count;
-  uint32 cache_count;
-  uint32 pos;
+  SilcUInt32 cache_dyn_count;
+  SilcUInt32 cache_count;
+  SilcUInt32 pos;
   bool dyn;
 };
 
@@ -98,7 +98,7 @@ struct SilcIDCacheListStruct {
    The `id_type' defines the types of the ID's that will be saved to the
    cache. */
 
-SilcIDCache silc_idcache_alloc(uint32 count, SilcIdType id_type,
+SilcIDCache silc_idcache_alloc(SilcUInt32 count, SilcIdType id_type,
                               SilcIDCacheDestructor destructor)
 {
   SilcIDCache cache;
@@ -107,9 +107,9 @@ SilcIDCache silc_idcache_alloc(uint32 count, SilcIdType id_type,
 
   cache = silc_calloc(1, sizeof(*cache));
   cache->id_table = silc_hash_table_alloc(count, silc_hash_id, 
-                                         (void *)(uint32)id_type,
+                                         (void *)(SilcUInt32)id_type,
                                          silc_hash_id_compare, 
-                                         (void *)(uint32)id_type, 
+                                         (void *)(SilcUInt32)id_type, 
                                          silc_idcache_destructor, NULL, 
                                          FALSE);
   cache->name_table = silc_hash_table_alloc(count, silc_hash_string, NULL,
@@ -296,7 +296,7 @@ static void silc_idcache_purge_foreach(void *key, void *context,
                                       void *user_context)
 {
   SilcIDCache cache = (SilcIDCache)user_context;
-  uint32 curtime = time(NULL);
+  SilcUInt32 curtime = time(NULL);
   SilcIDCacheEntry c = (SilcIDCacheEntry)context;
 
   if (c->expire && c->expire < curtime) {
index e5c86a513e5c394adb970c7d425efd03fdf14300..64c8bf9c6b038cd9f032e4259f706483f70d7b1c 100644 (file)
@@ -52,7 +52,7 @@
  *
  *      A name associated with the ID.
  *
- *    uint32 expire
+ *    SilcUInt32 expire
  *
  *      Time when this cache entry expires.  This is normal time() value
  *      plus the validity.  Cache entry has expired if current time is
@@ -68,7 +68,7 @@
 typedef struct {
   void *id;
   char *name;
-  uint32 expire;
+  SilcUInt32 expire;
   void *context;
 } *SilcIDCacheEntry;
 /***/
@@ -133,7 +133,7 @@ typedef void (*SilcIDCacheDestructor)(SilcIDCache cache,
  *
  * SYNOPSIS
  *
- *    SilcIDCache silc_idcache_alloc(uint32 count, SilcIdType id_type,
+ *    SilcIDCache silc_idcache_alloc(SilcUInt32 count, SilcIdType id_type,
  *                                   SilcIDCacheDestructor destructor);
  *
  * DESCRIPTION
@@ -144,7 +144,7 @@ typedef void (*SilcIDCacheDestructor)(SilcIDCache cache,
  *    cache.
  *
  ***/
-SilcIDCache silc_idcache_alloc(uint32 count, SilcIdType id_type,
+SilcIDCache silc_idcache_alloc(SilcUInt32 count, SilcIdType id_type,
                               SilcIDCacheDestructor destructor);
 
 /****f* silccore/SilcIDCacheAPI/silc_idcache_free
index c3600c52eefcfe428a40bd0ccefe700c4788f7c2..44552d564d1b2352030cb96b5f1dd4c819826eb3 100644 (file)
@@ -37,11 +37,11 @@ struct SilcNotifyPayloadStruct {
 /* Parse notify payload buffer and return data into payload structure */
 
 SilcNotifyPayload silc_notify_payload_parse(const unsigned char *payload,
-                                           uint32 payload_len)
+                                           SilcUInt32 payload_len)
 {
   SilcBufferStruct buffer;
   SilcNotifyPayload new;
-  uint16 len;
+  SilcUInt16 len;
   int ret;
 
   SILC_LOG_DEBUG(("Parsing Notify payload"));
@@ -76,27 +76,27 @@ SilcNotifyPayload silc_notify_payload_parse(const unsigned char *payload,
 
 /* Encode notify payload with variable argument list. If `argc' is > 0
    argument payloads will be associated to the notify payload. Variable
-   arguments must be {usigned char *, uint32 (len)}. */
+   arguments must be {usigned char *, SilcUInt32 (len)}. */
 
-SilcBuffer silc_notify_payload_encode(SilcNotifyType type, uint32 argc, 
+SilcBuffer silc_notify_payload_encode(SilcNotifyType type, SilcUInt32 argc, 
                                      va_list ap)
 {
   SilcBuffer buffer;
   SilcBuffer args = NULL;
   unsigned char **argv;
-  uint32 *argv_lens = NULL, *argv_types = NULL;
+  SilcUInt32 *argv_lens = NULL, *argv_types = NULL;
   unsigned char *x;
-  uint32 x_len;
+  SilcUInt32 x_len;
   int i, k = 0, len = 0;
 
   if (argc) {
     argv = silc_calloc(argc, sizeof(unsigned char *));
-    argv_lens = silc_calloc(argc, sizeof(uint32));
-    argv_types = silc_calloc(argc, sizeof(uint32));
+    argv_lens = silc_calloc(argc, sizeof(SilcUInt32));
+    argv_types = silc_calloc(argc, sizeof(SilcUInt32));
     
     for (i = 0, k = 0; i < argc; i++) {
       x = va_arg(ap, unsigned char *);
-      x_len = va_arg(ap, uint32);
+      x_len = va_arg(ap, SilcUInt32);
 
       if (!x || !x_len)
        continue;
@@ -141,7 +141,7 @@ SilcBuffer silc_notify_payload_encode(SilcNotifyType type, uint32 argc,
 /* Same as above but takes argument from the `args' Argument Payload. */
 
 SilcBuffer silc_notify_payload_encode_args(SilcNotifyType type, 
-                                          uint32 argc,
+                                          SilcUInt32 argc,
                                           SilcBuffer args)
 {
   SilcBuffer buffer;
@@ -186,7 +186,7 @@ SilcNotifyType silc_notify_get_type(SilcNotifyPayload payload)
 
 /* Return argument nums */
 
-uint32 silc_notify_get_arg_num(SilcNotifyPayload payload)
+SilcUInt32 silc_notify_get_arg_num(SilcNotifyPayload payload)
 {
   return payload->argc;
 }
index f00772b1b26f1cfe456ed8c9089bd1d1b3b25baf..67e8894f34b8ee1f70f19842a56448dda41bea52 100644 (file)
@@ -51,7 +51,7 @@ typedef struct SilcNotifyPayloadStruct *SilcNotifyPayload;
  *
  * NAME
  * 
- *    typedef uint16 SilcNotifyType;
+ *    typedef SilcUInt16 SilcNotifyType;
  *
  * DESCRIPTION
  *
@@ -59,7 +59,7 @@ typedef struct SilcNotifyPayloadStruct *SilcNotifyPayload;
  *
  * SOURCE
  */
-typedef uint16 SilcNotifyType;
+typedef SilcUInt16 SilcNotifyType;
 
 /* SILC notify types. Server may send these notify types to client to
    notify of some action. */
@@ -89,7 +89,7 @@ typedef uint16 SilcNotifyType;
  *
  *    SilcNotifyPayload 
  *    silc_notify_payload_parse(const unsigned char *payload,
- *                              uint32 payload_len);
+ *                              SilcUInt32 payload_len);
  *
  * DESCRIPTION
  *
@@ -98,23 +98,23 @@ typedef uint16 SilcNotifyType;
  *
  ***/
 SilcNotifyPayload silc_notify_payload_parse(const unsigned char *payload,
-                                           uint32 payload_len);
+                                           SilcUInt32 payload_len);
 
 /****f* silccore/SilcNotifyAPI/silc_notify_payload_encode
  *
  * SYNOPSIS
  *
- *    SilcBuffer silc_notify_payload_encode(SilcNotifyType type, uint32 argc, 
+ *    SilcBuffer silc_notify_payload_encode(SilcNotifyType type, SilcUInt32 argc, 
  *                                          va_list ap);
  *
  * DESCRIPTION
  *
  *    Encode notify payload with variable argument list. If `argc' is > 0
  *    argument payloads will be associated to the notify payload. Variable
- *    arguments must be {usigned char *, uint32 (len)}.
+ *    arguments must be {usigned char *, SilcUInt32 (len)}.
  *
  ***/
-SilcBuffer silc_notify_payload_encode(SilcNotifyType type, uint32 argc, 
+SilcBuffer silc_notify_payload_encode(SilcNotifyType type, SilcUInt32 argc, 
                                      va_list ap);
 
 /****f* silccore/SilcNotifyAPI/silc_notify_payload_encode_args
@@ -122,7 +122,7 @@ SilcBuffer silc_notify_payload_encode(SilcNotifyType type, uint32 argc,
  * SYNOPSIS
  *
  *    SilcBuffer silc_notify_payload_encode_args(SilcNotifyType type, 
- *                                               uint32 argc,
+ *                                               SilcUInt32 argc,
  *                                               SilcBuffer args);
  *
  * DESCRIPTION
@@ -132,7 +132,7 @@ SilcBuffer silc_notify_payload_encode(SilcNotifyType type, uint32 argc,
  *
  ***/
 SilcBuffer silc_notify_payload_encode_args(SilcNotifyType type, 
-                                          uint32 argc,
+                                          SilcUInt32 argc,
                                           SilcBuffer args);
 
 /****f* silccore/SilcNotifyAPI/silc_notify_payload_free
@@ -165,14 +165,14 @@ SilcNotifyType silc_notify_get_type(SilcNotifyPayload payload);
  *
  * SYNOPSIS
  *
- *    uint32 silc_notify_get_arg_num(SilcNotifyPayload payload);
+ *    SilcUInt32 silc_notify_get_arg_num(SilcNotifyPayload payload);
  *
  * DESCRIPTION
  *
  *    Return the number of the arguments associated with the Notify Payload.
  *
  ***/
-uint32 silc_notify_get_arg_num(SilcNotifyPayload payload);
+SilcUInt32 silc_notify_get_arg_num(SilcNotifyPayload payload);
 
 /****f* silccore/SilcNotifyAPI/silc_notify_get_args
  *
index 76c36ff886c23bf95448b85eda1dc6d9d8de568d..7f72922b5d6c4aac3de4ecbde37d0dfaa933c16e 100644 (file)
@@ -77,11 +77,11 @@ int silc_packet_send(SilcSocketConnection sock, bool force_send)
    other process of HMAC computing and encryption is needed this function
    cannot be used. */
 
-void silc_packet_encrypt(SilcCipher cipher, SilcHmac hmac, uint32 sequence,
-                        SilcBuffer buffer, uint32 len)
+void silc_packet_encrypt(SilcCipher cipher, SilcHmac hmac, SilcUInt32 sequence,
+                        SilcBuffer buffer, SilcUInt32 len)
 {
   unsigned char mac[32];
-  uint32 mac_len;
+  SilcUInt32 mac_len;
 
   /* Compute HMAC. This assumes that HMAC is created from the entire
      data area thus this uses the length found in buffer, not the length
@@ -224,9 +224,9 @@ void silc_packet_assemble(SilcPacketContext *ctx, SilcCipher cipher)
    outgoing buffer in SilcSocketConnection object. */
 
 void silc_packet_send_prepare(SilcSocketConnection sock,
-                             uint32 header_len,
-                             uint32 padlen,
-                             uint32 data_len)
+                             SilcUInt32 header_len,
+                             SilcUInt32 padlen,
+                             SilcUInt32 data_len)
 {
   int totlen, oldlen;
 
@@ -284,7 +284,7 @@ void silc_packet_send_prepare(SilcSocketConnection sock,
 ******************************************************************************/
 
 static int silc_packet_decrypt(SilcCipher cipher, SilcHmac hmac, 
-                              uint32 sequence, SilcBuffer buffer, 
+                              SilcUInt32 sequence, SilcBuffer buffer, 
                               bool normal);
 
 /* Receives packet from network and reads the data into connection's
@@ -327,7 +327,7 @@ int silc_packet_receive(SilcSocketConnection sock)
 bool silc_packet_receive_process(SilcSocketConnection sock,
                                 bool local_is_router,
                                 SilcCipher cipher, SilcHmac hmac,
-                                uint32 sequence,
+                                SilcUInt32 sequence,
                                 SilcPacketParserCallback parser,
                                 void *parser_context)
 {
@@ -445,12 +445,12 @@ bool silc_packet_receive_process(SilcSocketConnection sock,
    after packet has been totally decrypted and parsed. */
 
 static int silc_packet_check_mac(SilcHmac hmac, SilcBuffer buffer,
-                                uint32 sequence)
+                                SilcUInt32 sequence)
 {
   /* Check MAC */
   if (hmac) {
     unsigned char mac[32], psn[4];
-    uint32 mac_len;
+    SilcUInt32 mac_len;
     
     SILC_LOG_DEBUG(("Verifying MAC"));
 
@@ -523,7 +523,7 @@ static int silc_packet_decrypt_rest_special(SilcCipher cipher,
 {
   /* Decrypt rest of the header plus padding */
   if (cipher) {
-    uint16 len;
+    SilcUInt16 len;
 
     /* Pull MAC from packet before decryption */
     if (hmac) {
@@ -539,8 +539,8 @@ static int silc_packet_decrypt_rest_special(SilcCipher cipher,
 
     /* padding length + src id len + dst id len + header length - 16
        bytes already decrypted, gives the rest of the encrypted packet */
-    len = (((uint8)buffer->data[4] + (uint8)buffer->data[6] + 
-          (uint8)buffer->data[7] + SILC_PACKET_HEADER_LEN) -
+    len = (((SilcUInt8)buffer->data[4] + (SilcUInt8)buffer->data[6] + 
+          (SilcUInt8)buffer->data[7] + SILC_PACKET_HEADER_LEN) -
           SILC_PACKET_MIN_HEADER_LEN);
 
     silc_buffer_pull(buffer, SILC_PACKET_MIN_HEADER_LEN);
@@ -573,7 +573,7 @@ static int silc_packet_decrypt_rest_special(SilcCipher cipher,
    is special and requires special procesing. */
 
 static int silc_packet_decrypt(SilcCipher cipher, SilcHmac hmac,
-                              uint32 sequence, SilcBuffer buffer, 
+                              SilcUInt32 sequence, SilcBuffer buffer, 
                               bool normal)
 {
   /* If the packet type is not any special type lets decrypt rest
@@ -611,7 +611,7 @@ static int silc_packet_decrypt(SilcCipher cipher, SilcHmac hmac,
 SilcPacketType silc_packet_parse(SilcPacketContext *ctx, SilcCipher cipher)
 {
   SilcBuffer buffer = ctx->buffer;
-  uint8 tmp;
+  SilcUInt8 tmp;
   int len, ret;
 
   SILC_LOG_DEBUG(("Parsing incoming packet"));
@@ -679,7 +679,7 @@ SilcPacketType silc_packet_parse_special(SilcPacketContext *ctx,
                                         SilcCipher cipher)
 {
   SilcBuffer buffer = ctx->buffer;
-  uint8 tmp;
+  SilcUInt8 tmp;
   int len, ret;
 
   SILC_LOG_DEBUG(("Parsing incoming packet"));
index 87eee1408ae2562b4e36696c9af541b4449cdbc4..b4f1a8e4a1a58fa39b080faa68fa12c7fdc2bf74 100644 (file)
@@ -174,21 +174,21 @@ typedef unsigned char SilcPacketFlags;
  *      Packet flags. Flags are defined above.
  *
  *    unsigned char *src_id
- *    uint8 src_id_len
+ *    SilcUInt8 src_id_len
  *    unsigned char src_id_type
  *
  *      Source ID, its length and type. On packet reception retuned ID's
  *      are always the hash values of the ID's from the packet.
  *
  *    unsigned char *dst_id;
- *    uint8 dst_id_len;
+ *    SilcUInt8 dst_id_len;
  *    unsigned char src_id_type;
  *
  *      Destination ID, its length and type. On packet reception retuned
  *      ID's are always the hash values of the ID's from the packet.
  *
- *    uint16 truelen
- *    uint8 padlen
+ *    SilcUInt16 truelen
+ *    SilcUInt8 padlen
  *
  *      The true lenght of the packet and the padded length of the packet.
  *      These may be set by the caller before calling any of the 
@@ -202,7 +202,7 @@ typedef unsigned char SilcPacketFlags;
  *      calling silc_packet_context_dup and decreased by calling the
  *      silc_packet_context_free.
  *
- *    uint32 sequence;
+ *    SilcUInt32 sequence;
  *
  *      Packet sequence number.
  *
@@ -210,24 +210,24 @@ typedef unsigned char SilcPacketFlags;
 typedef struct {
   SilcBuffer buffer;
 
-  uint16 truelen;
+  SilcUInt16 truelen;
   SilcPacketFlags flags;
   SilcPacketType type;
-  uint8 padlen;
+  SilcUInt8 padlen;
 
   unsigned char *src_id;
-  uint8 src_id_len;
-  uint8 src_id_type;
+  SilcUInt8 src_id_len;
+  SilcUInt8 src_id_type;
 
   unsigned char *dst_id;
-  uint8 dst_id_len;
-  uint8 dst_id_type;
+  SilcUInt8 dst_id_len;
+  SilcUInt8 dst_id_type;
 
   int users;
   bool long_pad;               /* Set to TRUE to use maximum padding
                                   in packet (up to 256 bytes). */
 
-  uint32 sequence;
+  SilcUInt32 sequence;
 } SilcPacketContext;
 
 /****s* silccore/SilcPacketAPI/SilcPacketParserContext
@@ -389,7 +389,7 @@ int silc_packet_send(SilcSocketConnection sock, bool force_send);
  * SYNOPSIS
  *
  *    void silc_packet_encrypt(SilcCipher cipher, SilcHmac hmac, 
- *                             SilcBuffer buffer, uint32 len);
+ *                             SilcBuffer buffer, SilcUInt32 len);
  *
  * DESCRIPTION
  *
@@ -401,8 +401,8 @@ int silc_packet_send(SilcSocketConnection sock, bool force_send);
  *    cannot be used. 
  *
  ***/
-void silc_packet_encrypt(SilcCipher cipher, SilcHmac hmac, uint32 sequence,
-                        SilcBuffer buffer, uint32 len);
+void silc_packet_encrypt(SilcCipher cipher, SilcHmac hmac, SilcUInt32 sequence,
+                        SilcBuffer buffer, SilcUInt32 len);
 
 /****f* silccore/SilcPacketAPI/silc_packet_assemble
  *
@@ -464,9 +464,9 @@ void silc_packet_assemble(SilcPacketContext *ctx, SilcCipher cipher);
  * SYNOPSIS
  *
  *    void silc_packet_send_prepare(SilcSocketConnection sock,
- *                                  uint32 header_len,
- *                                  uint32 padlen,
- *                                  uint32 data_len);
+ *                                  SilcUInt32 header_len,
+ *                                  SilcUInt32 padlen,
+ *                                  SilcUInt32 data_len);
  *
  * DESCRIPTION
  *
@@ -477,9 +477,9 @@ void silc_packet_assemble(SilcPacketContext *ctx, SilcCipher cipher);
  *
  ***/
 void silc_packet_send_prepare(SilcSocketConnection sock,
-                             uint32 header_len,
-                             uint32 padlen,
-                             uint32 data_len);
+                             SilcUInt32 header_len,
+                             SilcUInt32 padlen,
+                             SilcUInt32 data_len);
 
 /****f* silccore/SilcPacketAPI/silc_packet_receive
  *
@@ -528,7 +528,7 @@ int silc_packet_receive(SilcSocketConnection sock);
 bool silc_packet_receive_process(SilcSocketConnection sock,
                                 bool local_is_router,
                                 SilcCipher cipher, SilcHmac hmac,
-                                uint32 sequence,
+                                SilcUInt32 sequence,
                                 SilcPacketParserCallback parser,
                                 void *parser_context);
 
index ac56c1d03d864cbe7294231e2eebfb358797acc8..26a064297028477ee2dba73f94da60fce0220509 100644 (file)
@@ -34,8 +34,8 @@
 /* Private Message Payload structure. Contents of this structure is parsed
    from SILC packets. */
 struct SilcPrivateMessagePayloadStruct {
-  uint16 flags;
-  uint16 message_len;
+  SilcUInt16 flags;
+  SilcUInt16 message_len;
   unsigned char *message;
 };
 
@@ -44,7 +44,7 @@ struct SilcPrivateMessagePayloadStruct {
 
 SilcPrivateMessagePayload 
 silc_private_message_payload_parse(unsigned char *payload,
-                                  uint32 payload_len,
+                                  SilcUInt32 payload_len,
                                   SilcCipher cipher)
 {
   SilcBufferStruct buffer;
@@ -90,14 +90,14 @@ silc_private_message_payload_parse(unsigned char *payload,
    the cipher is provided the packet is also encrypted here.  It is provided
    if the private message private keys are used. */
 
-SilcBuffer silc_private_message_payload_encode(uint16 flags,
-                                              uint16 data_len,
+SilcBuffer silc_private_message_payload_encode(SilcUInt16 flags,
+                                              SilcUInt16 data_len,
                                               const unsigned char *data,
                                               SilcCipher cipher)
 {
   int i;
   SilcBuffer buffer;
-  uint32 len, pad_len = 0;
+  SilcUInt32 len, pad_len = 0;
   unsigned char pad[16];
 
   SILC_LOG_DEBUG(("Encoding private message payload"));
@@ -148,7 +148,7 @@ void silc_private_message_payload_free(SilcPrivateMessagePayload payload)
 
 /* Return flags */
 
-uint16 
+SilcUInt16 
 silc_private_message_get_flags(SilcPrivateMessagePayload payload)
 {
   return payload->flags;
@@ -158,7 +158,7 @@ silc_private_message_get_flags(SilcPrivateMessagePayload payload)
 
 unsigned char *
 silc_private_message_get_message(SilcPrivateMessagePayload payload,
-                                uint32 *message_len)
+                                SilcUInt32 *message_len)
 {
   if (message_len)
     *message_len = payload->message_len;
index f8beca27e4c418f96b6e1486aa4311b9abb1df5f..e5da22eab400bee1672536f7b75df2d24feb1234 100644 (file)
@@ -56,7 +56,7 @@ typedef struct SilcPrivateMessagePayloadStruct *SilcPrivateMessagePayload;
  *
  *    SilcPrivateMessagePayload 
  *    silc_private_message_payload_parse(unsigned char *payload,
- *                                       uint32 payload_len,
+ *                                       SilcUInt32 payload_len,
  *                                       SilcCipher cipher);
  *
  * DESCRIPTION
@@ -67,15 +67,15 @@ typedef struct SilcPrivateMessagePayloadStruct *SilcPrivateMessagePayload;
  ***/
 SilcPrivateMessagePayload 
 silc_private_message_payload_parse(unsigned char *payload,
-                                  uint32 payload_len,
+                                  SilcUInt32 payload_len,
                                   SilcCipher cipher);
 
 /****f* silccore/SilcPrivateAPI/silc_private_message_payload_encode
  *
  * SYNOPSIS
  *
- *    SilcBuffer silc_private_message_payload_encode(uint16 flags,
- *                                                   uint16 data_len,
+ *    SilcBuffer silc_private_message_payload_encode(SilcUInt16 flags,
+ *                                                   SilcUInt16 data_len,
  *                                                   const unsigned char *data,
  *                                                   SilcCipher cipher);
  *
@@ -86,8 +86,8 @@ silc_private_message_payload_parse(unsigned char *payload,
  *    if the private message private keys are used.
  *
  ***/
-SilcBuffer silc_private_message_payload_encode(uint16 flags,
-                                              uint16 data_len,
+SilcBuffer silc_private_message_payload_encode(SilcUInt16 flags,
+                                              SilcUInt16 data_len,
                                               const unsigned char *data,
                                               SilcCipher cipher);
 
@@ -109,7 +109,7 @@ void silc_private_message_payload_free(SilcPrivateMessagePayload payload);
  *
  * SYNOPSIS
  *
- *    uint16 
+ *    SilcUInt16 
  *    silc_private_message_get_flags(SilcPrivateMessagePayload payload);
  *
  * DESCRIPTION
@@ -119,7 +119,7 @@ void silc_private_message_payload_free(SilcPrivateMessagePayload payload);
  *    channel message flags.
  *
  ***/
-uint16 
+SilcUInt16 
 silc_private_message_get_flags(SilcPrivateMessagePayload payload);
 
 /****f* silccore/SilcPrivateAPI/silc_private_message_get_message
@@ -128,7 +128,7 @@ silc_private_message_get_flags(SilcPrivateMessagePayload payload);
  *
  *    unsigned char *
  *    silc_private_message_get_nickname(SilcPrivateMessagePayload payload,
- *                                      uint32 *nickname_len);
+ *                                      SilcUInt32 *nickname_len);
  *
  * DESCRIPTION
  *
@@ -137,6 +137,6 @@ silc_private_message_get_flags(SilcPrivateMessagePayload payload);
  ***/
 unsigned char *
 silc_private_message_get_message(SilcPrivateMessagePayload payload,
-                                uint32 *message_len);
+                                SilcUInt32 *message_len);
 
 #endif
index 840dfdde8f26986434b1b8ff637a81192f558d75..32bfc5c687b2ba5bd4ef9a0e4dc0f0befd786cff 100644 (file)
@@ -51,7 +51,7 @@ Mean:          500 cycles =    51.2 mbits/sec
 
 SILC_CIPHER_API_SET_KEY(aes)
 {
-  uint32 k[8];
+  SilcUInt32 k[8];
 
   SILC_GET_WORD_KEY(key, k, keylen);
   rijndael_set_key((RijndaelContext *)context, k, keylen);
@@ -87,7 +87,7 @@ SILC_CIPHER_API_CONTEXT_LEN(aes)
 
 SILC_CIPHER_API_ENCRYPT_CBC(aes)
 {
-  uint32 tiv[4];
+  SilcUInt32 tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
@@ -112,7 +112,7 @@ SILC_CIPHER_API_ENCRYPT_CBC(aes)
 
 SILC_CIPHER_API_DECRYPT_CBC(aes)
 {
-  uint32 tmp[4], tmp2[4], tiv[4];
+  SilcUInt32 tmp[4], tmp2[4], tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
index 1bea03106d4050ea5e5a119c3ee8f8a9c92d0bb2..fb3d8c8b65a8830cfeb728952225ad2f70bd27e1 100644 (file)
@@ -77,7 +77,7 @@ SILC_CIPHER_API_CONTEXT_LEN(blowfish)
 
 SILC_CIPHER_API_ENCRYPT_CBC(blowfish)
 {
-  uint32 tiv[4];
+  SilcUInt32 tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
@@ -102,7 +102,7 @@ SILC_CIPHER_API_ENCRYPT_CBC(blowfish)
 
 SILC_CIPHER_API_DECRYPT_CBC(blowfish)
 {
-  uint32 tmp[4], tmp2[4], tiv[4];
+  SilcUInt32 tmp[4], tmp2[4], tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
@@ -393,7 +393,7 @@ static u32 bf_sbox[256 * 4] =
 
 /* 
  * Round loop unrolling macros, S is a pointer to a S-Box array
- * organized in 4 uint32s at a row.
+ * organized in 4 SilcUInt32s at a row.
  */
 
 #define GET32_3(x) (((x) & 0xff))
index b3428cb2301e0fe5712227d42b2d11541dcfdd78..036a0dc88915d580863187b89fb7f880ee0f04c7 100644 (file)
@@ -72,7 +72,7 @@ Mean:          674 cycles =    38.0 mbits/sec
 
 SILC_CIPHER_API_SET_KEY(cast)
 {
-  uint32 k[8];
+  SilcUInt32 k[8];
 
   SILC_GET_WORD_KEY(key, k, keylen);
   cast_set_key((CastContext *)context, k, keylen);
@@ -108,7 +108,7 @@ SILC_CIPHER_API_CONTEXT_LEN(cast)
 
 SILC_CIPHER_API_ENCRYPT_CBC(cast)
 {
-  uint32 tiv[4];
+  SilcUInt32 tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
@@ -133,7 +133,7 @@ SILC_CIPHER_API_ENCRYPT_CBC(cast)
 
 SILC_CIPHER_API_DECRYPT_CBC(cast)
 {
-  uint32 tmp[4], tmp2[4], tiv[4];
+  SilcUInt32 tmp[4], tmp2[4], tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
index 12f455312dda90b78c70e5b8e6ac49cf55b76952..98e445c400c605055e0cd7a625685c1a1e559777 100644 (file)
@@ -23,8 +23,8 @@
 
 /* General definitions for algorithms */
 typedef unsigned char u1byte;
-typedef uint32 u4byte;
-typedef uint32 u32;
+typedef SilcUInt32 u4byte;
+typedef SilcUInt32 u32;
 
 #define rotr(x, nr) (((x) >> ((int)(nr))) | ((x) << (32 - (int)(nr))))
 #define rotl(x, nr) (((x) << ((int)(nr))) | ((x) >> (32 - (int)(nr))))
index 73af702f194e3fd070e111a5640d49fe8f7d749d..e3c93d682d69e3ca3a1c12819c582971533f0e49 100644 (file)
@@ -50,7 +50,7 @@ Mean:          373 cycles =    68.7 mbits/sec
 
 SILC_CIPHER_API_SET_KEY(mars)
 {
-  uint32 k[8];
+  SilcUInt32 k[8];
 
   SILC_GET_WORD_KEY(key, k, keylen);
   mars_set_key((MarsContext *)context, k, keylen);
@@ -85,7 +85,7 @@ SILC_CIPHER_API_CONTEXT_LEN(mars)
 
 SILC_CIPHER_API_ENCRYPT_CBC(mars)
 {
-  uint32 tiv[4];
+  SilcUInt32 tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
@@ -110,7 +110,7 @@ SILC_CIPHER_API_ENCRYPT_CBC(mars)
 
 SILC_CIPHER_API_DECRYPT_CBC(mars)
 {
-  uint32 tmp[4], tmp2[4], tiv[4];
+  SilcUInt32 tmp[4], tmp2[4], tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
index 63514cd10f3c9684640d30e826aa1d47bd245d70..910939be1b091cc6f72fb28e1ee720007e0c8aa5 100644 (file)
@@ -54,19 +54,19 @@ SILC_HASH_API_CONTEXT_LEN(md5)
 #ifndef HIGHFIRST
 #define byteReverse(buf, len)  /* Nothing */
 #else
-void byteReverse(unsigned char *buf, uint32s);
+void byteReverse(unsigned char *buf, SilcUInt32s);
 
 #ifndef ASM_MD5
 /*
  * Note: this code is harmless on little-endian machines.
  */
-void byteReverse(unsigned char *buf, uint32s)
+void byteReverse(unsigned char *buf, SilcUInt32s)
 {
-       uint32 t;
+       SilcUInt32 t;
        do {
-               t = (uint32)((unsigned)buf[3]<<8 | buf[2]) << 16 |
+               t = (SilcUInt32)((unsigned)buf[3]<<8 | buf[2]) << 16 |
                            ((unsigned)buf[1]<<8 | buf[0]);
-               *(uint32 *)buf = t;
+               *(SilcUInt32 *)buf = t;
                buf += 4;
        } while (--longs);
 }
@@ -96,12 +96,12 @@ MD5Init(struct MD5Context *ctx)
 void
 MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
 {
-       uint32 t;
+       SilcUInt32 t;
 
        /* Update bitcount */
 
        t = ctx->bits[0];
-       if ((ctx->bits[0] = t + ((uint32)len << 3)) < t)
+       if ((ctx->bits[0] = t + ((SilcUInt32)len << 3)) < t)
                ctx->bits[1]++; /* Carry from low to high */
        ctx->bits[1] += len >> 29;
 
@@ -176,8 +176,8 @@ MD5Final(unsigned char digest[16], struct MD5Context *ctx)
        byteReverse(ctx->in, 14);
 
        /* Append length in bits and transform */
-       ((uint32 *)ctx->in)[ 14 ] = ctx->bits[0];
-       ((uint32 *)ctx->in)[ 15 ] = ctx->bits[1];
+       ((SilcUInt32 *)ctx->in)[ 14 ] = ctx->bits[0];
+       ((SilcUInt32 *)ctx->in)[ 15 ] = ctx->bits[1];
 
        MD5Transform(ctx->buf, ctx->in);
        byteReverse((unsigned char *)ctx->buf, 4);
@@ -205,10 +205,10 @@ MD5Final(unsigned char digest[16], struct MD5Context *ctx)
  * the data and converts bytes into longwords for this routine.
  */
 void
-MD5Transform(uint32 buf[4], const unsigned char kbuf[64])
+MD5Transform(SilcUInt32 buf[4], const unsigned char kbuf[64])
 {
-       register uint32 a, b, c, d, i;
-       uint32 in[16];
+       register SilcUInt32 a, b, c, d, i;
+       SilcUInt32 in[16];
 
        for (i = 0; i < 16; i++)
            SILC_GET32_MSB(in[i], kbuf + 4 * i);
index c48e8d2ba0c1b8fa8a3967264e1fadfd2732cb7c..71f1603c1c3ce9f7bb1fc1793d98c718db970183 100644 (file)
@@ -4,15 +4,15 @@
 #define MD5_INTERNAL_H
 
 struct MD5Context {
-       uint32 buf[4];
-       uint32 bits[2];
+       SilcUInt32 buf[4];
+       SilcUInt32 bits[2];
        unsigned char in[64];
 };
 
 void MD5Init(struct MD5Context *context);
 void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len);
 void MD5Final(unsigned char digest[16], struct MD5Context *context);
-void MD5Transform(uint32 buf[4], const unsigned char kbuf[64]);
+void MD5Transform(SilcUInt32 buf[4], const unsigned char kbuf[64]);
 
 /*
  * This is needed to make RSAREF happy on some MS-DOS compilers.
index b6a982ddad5527490fb58460ad93ee9063f9d6a0..6e5a6a4a560b181774b0ab82364fb5e5503458dd 100644 (file)
@@ -105,8 +105,8 @@ typedef enum {
  * the rules defined in PKCS #1.
  */
 static unsigned char *
-RSA_FormatOneBlock(uint32 modulusLen, RSA_BlockType blockType,
-                  unsigned char *data, uint32 data_len)
+RSA_FormatOneBlock(SilcUInt32 modulusLen, RSA_BlockType blockType,
+                  unsigned char *data, SilcUInt32 data_len)
 {
     unsigned char *block;
     unsigned char *bp;
@@ -181,10 +181,10 @@ RSA_FormatOneBlock(uint32 modulusLen, RSA_BlockType blockType,
 }
 
 static int
-RSA_FormatBlock(unsigned char **result, uint32 *result_len,
-               uint32 modulusLen,
+RSA_FormatBlock(unsigned char **result, SilcUInt32 *result_len,
+               SilcUInt32 modulusLen,
                RSA_BlockType blockType, unsigned char *data,
-               uint32 data_len)
+               SilcUInt32 data_len)
 {
     /*
      * XXX For now assume that the data length fits in a single
@@ -238,14 +238,14 @@ RSA_FormatBlock(unsigned char **result, uint32 *result_len,
  */
 unsigned char *
 RSA_DecodeOneBlock(unsigned char *data,
-                  uint32 modulusLen,
-                  uint32 expectedLen,
+                  SilcUInt32 modulusLen,
+                  SilcUInt32 expectedLen,
                   RSA_BlockType bt,
-                  uint32 *pResultLen)
+                  SilcUInt32 *pResultLen)
 {
     RSA_BlockType blockType;
     unsigned char *dp, *res;
-    uint32 i, len = 0;
+    SilcUInt32 i, len = 0;
 
     dp = data;
     if (dp[0] != RSA_BLOCK_FIRST_OCTET) {
@@ -317,7 +317,7 @@ SILC_PKCS_API_ENCRYPT(pkcs1)
   SilcMPInt mp_tmp;
   SilcMPInt mp_dst;
   unsigned char *padded;
-  uint32 padded_len, len = key->bits / 8;
+  SilcUInt32 padded_len, len = key->bits / 8;
 
   /* Pad data */
   if (!RSA_FormatBlock(&padded, &padded_len, len,
@@ -353,7 +353,7 @@ SILC_PKCS_API_DECRYPT(pkcs1)
   SilcMPInt mp_tmp;
   SilcMPInt mp_dst;
   unsigned char *padded, *unpadded;
-  uint32 padded_len;
+  SilcUInt32 padded_len;
 
   silc_mp_init(&mp_tmp);
   silc_mp_init(&mp_dst);
@@ -400,8 +400,8 @@ SILC_PKCS_API_SIGN(pkcs1)
   SilcMPInt mp_tmp;
   SilcMPInt mp_dst;
   unsigned char *padded;
-  uint32 padded_len;
-  uint32 len = key->bits / 8;
+  SilcUInt32 padded_len;
+  SilcUInt32 len = key->bits / 8;
 
   /* Pad data */
   if (!RSA_FormatBlock(&padded, &padded_len, len, RSA_BlockPrivate, 
@@ -438,7 +438,7 @@ SILC_PKCS_API_VERIFY(pkcs1)
   SilcMPInt mp_tmp2;
   SilcMPInt mp_dst;
   unsigned char *verify, *unpadded;
-  uint32 verify_len, len = key->bits / 8;
+  SilcUInt32 verify_len, len = key->bits / 8;
 
   silc_mp_init(&mp_tmp2);
   silc_mp_init(&mp_dst);
index 34afc43fac0064b0dd8448ab8050330378f4939e..645c88dd8182c70e6f991923fe5c92e32e33e994 100644 (file)
@@ -50,7 +50,7 @@
 
 SILC_CIPHER_API_SET_KEY(rc5)
 {
-  uint32 k[8];
+  SilcUInt32 k[8];
 
   SILC_GET_WORD_KEY(key, k, keylen);
   rc5_set_key((RC5Context *)context, k, keylen);
@@ -78,7 +78,7 @@ SILC_CIPHER_API_CONTEXT_LEN(rc5)
 
 SILC_CIPHER_API_ENCRYPT_CBC(rc5)
 {
-  uint32 tiv[4];
+  SilcUInt32 tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
@@ -103,7 +103,7 @@ SILC_CIPHER_API_ENCRYPT_CBC(rc5)
 
 SILC_CIPHER_API_DECRYPT_CBC(rc5)
 {
-  uint32 tmp[4], tmp2[4], tiv[4];
+  SilcUInt32 tmp[4], tmp2[4], tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
@@ -139,7 +139,7 @@ SILC_CIPHER_API_DECRYPT_CBC(rc5)
 
 /* Sets RC5 key */
 
-int rc5_set_key(RC5Context *ctx, const uint32 in_key[], int key_len)
+int rc5_set_key(RC5Context *ctx, const SilcUInt32 in_key[], int key_len)
 {
        u32 i, j, k, A, B, L[c];
        u32 *out_key = ctx->out_key;
index c493fdc519d8160664b1269238d11887db7e9e69..23dc8cf86bb0df27e23f11ff9904d7486ef5ddd3 100644 (file)
@@ -36,7 +36,7 @@ typedef struct {
 } RC5Context;
 
 /* Prototypes */
-int rc5_set_key(RC5Context *ctx, const uint32 in_key[], int key_len);
+int rc5_set_key(RC5Context *ctx, const SilcUInt32 in_key[], int key_len);
 int rc5_encrypt(RC5Context *ctx, u32 *in, u32 *out);
 int rc5_decrypt(RC5Context *ctx, u32 *in, u32 *out);
 
index 7939b2888e5af1ce0cb975a24843c451b936a348..2ca7c83cecdecd7a70d24552d894c5eb4e7cceb8 100644 (file)
@@ -48,7 +48,7 @@ Mean:          249 cycles =   103.0 mbits/sec
 
 SILC_CIPHER_API_SET_KEY(rc6)
 {
-  uint32 k[8];
+  SilcUInt32 k[8];
 
   SILC_GET_WORD_KEY(key, k, keylen);
   rc6_set_key((RC6Context *)context, k, keylen);
@@ -69,7 +69,7 @@ SILC_CIPHER_API_SET_KEY_WITH_STRING(rc6)
 
 SILC_CIPHER_API_ENCRYPT_CBC(rc6)
 {
-  uint32 tiv[4];
+  SilcUInt32 tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
@@ -94,7 +94,7 @@ SILC_CIPHER_API_ENCRYPT_CBC(rc6)
 
 SILC_CIPHER_API_DECRYPT_CBC(rc6)
 {
-  uint32 tmp[4], tmp2[4], tiv[4];
+  SilcUInt32 tmp[4], tmp2[4], tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
index ec47e6ddd3e0fdbe7295410fa20ed94d056f40eb..b0b7bf50cde27c2fe68c108360dfa511df3e0503 100644 (file)
@@ -75,7 +75,7 @@
 
 SILC_PKCS_API_INIT(rsa)
 {
-  uint32 prime_bits = keylen / 2;
+  SilcUInt32 prime_bits = keylen / 2;
   SilcMPInt p, q;
   bool found = FALSE;
 
@@ -132,7 +132,7 @@ SILC_PKCS_API_GET_PUBLIC_KEY(rsa)
 {
   RsaKey *key = (RsaKey *)context;
   unsigned char *e, *n, *ret;
-  uint32 e_len, n_len;
+  SilcUInt32 e_len, n_len;
   unsigned char tmp[4];
 
   e = silc_mp_mp2bin(&key->e, 0, &e_len);
@@ -171,7 +171,7 @@ SILC_PKCS_API_GET_PRIVATE_KEY(rsa)
 {
   RsaKey *key = (RsaKey *)context;
   unsigned char *e, *n, *d, *ret;
-  uint32 e_len, n_len, d_len;
+  SilcUInt32 e_len, n_len, d_len;
   unsigned char tmp[4];
 
   e = silc_mp_mp2bin(&key->e, 0, &e_len);
@@ -218,7 +218,7 @@ SILC_PKCS_API_SET_PUBLIC_KEY(rsa)
 {
   RsaKey *key = (RsaKey *)context;
   unsigned char tmp[4];
-  uint32 e_len, n_len;
+  SilcUInt32 e_len, n_len;
 
   if (key->pub_set) {
     silc_mp_uninit(&key->e);
@@ -263,7 +263,7 @@ SILC_PKCS_API_SET_PRIVATE_KEY(rsa)
 {
   RsaKey *key = (RsaKey *)context;
   unsigned char tmp[4];
-  uint32 e_len, n_len, d_len;
+  SilcUInt32 e_len, n_len, d_len;
 
   if (key->prv_set) {
     silc_mp_uninit(&key->d);
@@ -479,7 +479,7 @@ SILC_PKCS_API_VERIFY(rsa)
    to compute the modulus n has to be generated before calling this. They
    are then sent as argument for the function. */
 
-void rsa_generate_keys(RsaKey *key, uint32 bits, 
+void rsa_generate_keys(RsaKey *key, SilcUInt32 bits, 
                       SilcMPInt *p, SilcMPInt *q)
 {
   SilcMPInt phi, hlp;
index c4feb3158d341d773f545269d1c4ff900f995597..22904bbfd1e70efa475cd59eae187c0efc0c980c 100644 (file)
@@ -31,7 +31,7 @@ typedef struct {
   SilcMPInt d;                 /* private exponent */
 } RsaKey;
 
-void rsa_generate_keys(RsaKey *key, uint32 bits, 
+void rsa_generate_keys(RsaKey *key, SilcUInt32 bits, 
                       SilcMPInt *p, SilcMPInt *q);
 void rsa_clear_keys(RsaKey *key);
 void rsa_en_de_crypt(SilcMPInt *cm, SilcMPInt *mc, 
index 2b7577e1c4478eb669f662774e691f790cbae52d..9c6465c67dda095f4284135e0e74ef76a75b2ca6 100644 (file)
@@ -49,12 +49,12 @@ void SHA1Init(SHA1_CTX* context)
   context->count[0] = context->count[1] = 0;
 }
 
-#define rol(x, nr) (((x) << ((uint32)(nr))) | ((x) >> (32 - (uint32)(nr))))
+#define rol(x, nr) (((x) << ((SilcUInt32)(nr))) | ((x) >> (32 - (SilcUInt32)(nr))))
 
-#define GET_WORD(cp) ((uint32)(uint8)(cp)[0]) << 24    \
-                   | ((uint32)(uint8)(cp)[1] << 16)    \
-                   | ((uint32)(uint8)(cp)[2] << 8)     \
-                   | ((uint32)(uint8)(cp)[3])
+#define GET_WORD(cp) ((SilcUInt32)(SilcUInt8)(cp)[0]) << 24    \
+                   | ((SilcUInt32)(SilcUInt8)(cp)[1] << 16)    \
+                   | ((SilcUInt32)(SilcUInt8)(cp)[2] << 8)     \
+                   | ((SilcUInt32)(SilcUInt8)(cp)[3])
 
 #define blk0(i) (W[i] = GET_WORD(data))
 #define blk1(i) (W[i&15] = rol(W[(i+13)&15]^W[(i+8)&15]^W[(i+2)&15]^W[i&15],1))
@@ -71,16 +71,16 @@ void SHA1Init(SHA1_CTX* context)
 #define R3(v,w,x,y,z,i) z+=f3(w,x,y)+blk1(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
 #define R4(v,w,x,y,z,i) z+=f4(w,x,y)+blk1(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);
 
-void SHA1Transform(uint32 *state, const unsigned char *data)
+void SHA1Transform(SilcUInt32 *state, const unsigned char *data)
 {
-  uint32 W[16];
+  SilcUInt32 W[16];
   
   /* Copy context->state[] to working vars */
-  uint32 a = state[0];
-  uint32 b = state[1];
-  uint32 c = state[2];
-  uint32 d = state[3];
-  uint32 e = state[4];
+  SilcUInt32 a = state[0];
+  SilcUInt32 b = state[1];
+  SilcUInt32 c = state[2];
+  SilcUInt32 d = state[3];
+  SilcUInt32 e = state[4];
   
   /* 4 rounds of 20 operations each. Loop unrolled. */
   R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
@@ -118,9 +118,9 @@ void SHA1Transform(uint32 *state, const unsigned char *data)
 
 /* Run your data through this. */
 
-void SHA1Update(SHA1_CTX* context, unsigned char* data, uint32 len)
+void SHA1Update(SHA1_CTX* context, unsigned char* data, SilcUInt32 len)
 {
-  uint32 i, j;
+  SilcUInt32 i, j;
 
   j = (context->count[0] >> 3) & 63;
   if ((context->count[0] += len << 3) < (len << 3)) context->count[1]++;
@@ -141,7 +141,7 @@ void SHA1Update(SHA1_CTX* context, unsigned char* data, uint32 len)
 
 void SHA1Final(unsigned char digest[20], SHA1_CTX* context)
 {
-  uint32 i, j;
+  SilcUInt32 i, j;
   unsigned char finalcount[8];
   
   for (i = 0; i < 8; i++) {
index ae970448abcbcf332d7967c70f1bc9610c89082d..62b9789315dfd9e6d120c3904ce8ec6af6204297 100644 (file)
@@ -20,15 +20,15 @@ A million repetitions of "a"
 
 /* Context declaration */
 typedef struct {
-    uint32 state[5];
-    uint32 count[2];
+    SilcUInt32 state[5];
+    SilcUInt32 count[2];
     unsigned char buffer[64];
 } SHA1_CTX;
 
 /* Function forward declerations */
-void SHA1Transform(uint32 *state, const unsigned char *data);
+void SHA1Transform(SilcUInt32 *state, const unsigned char *data);
 void SHA1Init(SHA1_CTX* context);
-void SHA1Update(SHA1_CTX* context, unsigned char* data, uint32 len);
+void SHA1Update(SHA1_CTX* context, unsigned char* data, SilcUInt32 len);
 void SHA1Final(unsigned char digest[20], SHA1_CTX* context);
 
 #endif
index 3517317ec5c352a99eee7bd41417e1d372d8f84e..35155c5103379a048a8063340d4aba7892129a0c 100644 (file)
@@ -253,7 +253,7 @@ char *silc_cipher_get_supported(void)
 /* Encrypts */
 
 bool silc_cipher_encrypt(SilcCipher cipher, const unsigned char *src,
-                        unsigned char *dst, uint32 len, 
+                        unsigned char *dst, SilcUInt32 len, 
                         unsigned char *iv)
 {
   return cipher->cipher->encrypt(cipher->context, src, dst, len, iv);
@@ -262,7 +262,7 @@ bool silc_cipher_encrypt(SilcCipher cipher, const unsigned char *src,
 /* Decrypts */
 
 bool silc_cipher_decrypt(SilcCipher cipher, const unsigned char *src,
-                        unsigned char *dst, uint32 len, 
+                        unsigned char *dst, SilcUInt32 len, 
                         unsigned char *iv)
 {
   return cipher->cipher->decrypt(cipher->context, src, dst, len, iv);
@@ -271,7 +271,7 @@ bool silc_cipher_decrypt(SilcCipher cipher, const unsigned char *src,
 /* Sets the key for the cipher */
 
 bool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key,
-                        uint32 keylen)
+                        SilcUInt32 keylen)
 {
   return cipher->cipher->set_key(cipher->context, key, keylen);
 }
@@ -294,14 +294,14 @@ void silc_cipher_get_iv(SilcCipher cipher, unsigned char *iv)
 
 /* Returns the key length of the cipher. */
 
-uint32 silc_cipher_get_key_len(SilcCipher cipher)
+SilcUInt32 silc_cipher_get_key_len(SilcCipher cipher)
 {
   return cipher->cipher->key_len;
 }
 
 /* Returns the block size of the cipher. */
 
-uint32 silc_cipher_get_block_len(SilcCipher cipher)
+SilcUInt32 silc_cipher_get_block_len(SilcCipher cipher)
 {
   return cipher->cipher->block_len;
 }
index 47cfd3e03f12375b3bb379c5845f5465d59258a5..205adb8340d5f9e2a5c035189ed513f898a5d1c6 100644 (file)
 
        Logical name of the cipher.
 
-   uint32 block_len
+   SilcUInt32 block_len
 
        Block size of the cipher.
 
-   uint32 key_len
+   SilcUInt32 key_len
 
        Length of the key of the cipher (in bits).
 
 */
 typedef struct {
   char *name;
-  uint32 block_len;
-  uint32 key_len;
+  SilcUInt32 block_len;
+  SilcUInt32 key_len;
 
-  bool (*set_key)(void *, const unsigned char *, uint32);
-  bool (*set_key_with_string)(void *, const unsigned char *, uint32);
+  bool (*set_key)(void *, const unsigned char *, SilcUInt32);
+  bool (*set_key_with_string)(void *, const unsigned char *, SilcUInt32);
   bool (*encrypt)(void *, const unsigned char *, unsigned char *,
-                 uint32, unsigned char *);
+                 SilcUInt32, unsigned char *);
   bool (*decrypt)(void *, const unsigned char *, unsigned char *, 
-                 uint32, unsigned char *);
-  uint32 (*context_len)();
+                 SilcUInt32, unsigned char *);
+  SilcUInt32 (*context_len)();
 } SilcCipherObject;
 
 #define SILC_CIPHER_MAX_IV_SIZE 16
@@ -65,8 +65,8 @@ typedef struct SilcCipherStruct {
   unsigned char iv[SILC_CIPHER_MAX_IV_SIZE];
   void (*set_iv)(struct SilcCipherStruct *, const unsigned char *);
   void (*get_iv)(struct SilcCipherStruct *, unsigned char *);
-  uint32 (*get_key_len)(struct SilcCipherStruct *);
-  uint32 (*get_block_len)(struct SilcCipherStruct *);
+  SilcUInt32 (*get_key_len)(struct SilcCipherStruct *);
+  SilcUInt32 (*get_block_len)(struct SilcCipherStruct *);
 } *SilcCipher;
 
 /* Marks for all ciphers in silc. This can be used in silc_cipher_unregister
@@ -96,25 +96,25 @@ extern DLLAPI SilcCipherObject silc_default_ciphers[];
 #define SILC_CIPHER_API_SET_KEY(cipher)                        \
 bool silc_##cipher##_set_key(void *context,            \
                             const unsigned char *key,  \
-                            uint32 keylen)
+                            SilcUInt32 keylen)
 #define SILC_CIPHER_API_SET_KEY_WITH_STRING(cipher)                    \
 bool silc_##cipher##_set_key_with_string(void *context,                        \
                                         const unsigned char *string,   \
-                                        uint32 stringlen)
+                                        SilcUInt32 stringlen)
 #define SILC_CIPHER_API_ENCRYPT_CBC(cipher)                    \
 bool silc_##cipher##_encrypt_cbc(void *context,                        \
                                 const unsigned char *src,      \
                                 unsigned char *dst,            \
-                                uint32 len,            \
+                                SilcUInt32 len,                \
                                 unsigned char *iv)
 #define SILC_CIPHER_API_DECRYPT_CBC(cipher)                    \
 bool silc_##cipher##_decrypt_cbc(void *context,                        \
                                 const unsigned char *src,      \
                                 unsigned char *dst,            \
-                                uint32 len,            \
+                                SilcUInt32 len,                \
                                 unsigned char *iv)
 #define SILC_CIPHER_API_CONTEXT_LEN(cipher)                    \
-uint32 silc_##cipher##_context_len()
+SilcUInt32 silc_##cipher##_context_len()
 
 /* Prototypes */
 bool silc_cipher_register(SilcCipherObject *cipher);
@@ -125,16 +125,16 @@ void silc_cipher_free(SilcCipher cipher);
 bool silc_cipher_is_supported(const unsigned char *name);
 char *silc_cipher_get_supported(void);
 bool silc_cipher_encrypt(SilcCipher cipher, const unsigned char *src,
-                        unsigned char *dst, uint32 len, 
+                        unsigned char *dst, SilcUInt32 len, 
                         unsigned char *iv);
 bool silc_cipher_decrypt(SilcCipher cipher, const unsigned char *src,
-                        unsigned char *dst, uint32 len, 
+                        unsigned char *dst, SilcUInt32 len, 
                         unsigned char *iv);
 bool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key,
-                        uint32 keylen);
+                        SilcUInt32 keylen);
 void silc_cipher_set_iv(SilcCipher cipher, const unsigned char *iv);
 void silc_cipher_get_iv(SilcCipher cipher, unsigned char *iv);
-uint32 silc_cipher_get_key_len(SilcCipher cipher);
-uint32 silc_cipher_get_block_len(SilcCipher cipher);
+SilcUInt32 silc_cipher_get_key_len(SilcCipher cipher);
+SilcUInt32 silc_cipher_get_block_len(SilcCipher cipher);
 
 #endif
index 1f90ba3d51855f93ebf417ee2bfbd2bee4bc5d65..6b04b3bfcf862bae1ef50790e4a5e66b44732fdb 100644 (file)
@@ -159,7 +159,7 @@ bool silc_dh_compute_key(SilcDH dh, const SilcMPInt **z);
  * SYNOPSIS
  *
  *    bool silc_dh_compute_key_data(SilcDH dh, unsigned char **z, 
- *                                  uint32 *z_len);
+ *                                  SilcUInt32 *z_len);
  *
  * DESCRIPTION
  *
@@ -168,6 +168,6 @@ bool silc_dh_compute_key(SilcDH dh, const SilcMPInt **z);
  *
  ***/
 bool silc_dh_compute_key_data(SilcDH dh, unsigned char **z, 
-                             uint32 *z_len);
+                             SilcUInt32 *z_len);
 
 #endif
index d50374c1bfa3910211a678dba9e8ff515913dd11..4bb91087de51a278d8478aefd2cbc773f54a221c 100644 (file)
@@ -154,7 +154,7 @@ void silc_hash_free(SilcHash hash)
 
 /* Returns the length of the hash digest. */
 
-uint32 silc_hash_len(SilcHash hash)
+SilcUInt32 silc_hash_len(SilcHash hash)
 {
   return hash->hash->hash_len;
 }
@@ -205,7 +205,7 @@ char *silc_hash_get_supported(void)
 /* Creates the hash value and returns it to the return_hash argument. */
 
 void silc_hash_make(SilcHash hash, const unsigned char *data, 
-                   uint32 len, unsigned char *return_hash)
+                   SilcUInt32 len, unsigned char *return_hash)
 {
   hash->hash->init(hash->context);
   hash->hash->update(hash->context, (unsigned char *)data, len);
@@ -217,7 +217,7 @@ void silc_hash_make(SilcHash hash, const unsigned char *data,
    caller. */
 
 char *silc_hash_fingerprint(SilcHash hash, const unsigned char *data,
-                           uint32 data_len)
+                           SilcUInt32 data_len)
 {
   SilcHash new_hash = NULL;
   unsigned char h[32];
@@ -245,7 +245,7 @@ static const char co[]= "bcdfghklmnprstvzx";
    fingerprint to the babbleprint. */
 
 char *silc_hash_babbleprint(SilcHash hash, const unsigned char *data,
-                           uint32 data_len)
+                           SilcUInt32 data_len)
 {
   SilcHash new_hash = NULL;
   char *babbleprint;
index 26e1c0de589e9fdfd4a9808963498f0fdb39b220..8de3e5eb8db07bab37319c8efb44addef2c69df2 100644 (file)
 /* The default Silc hash object to represent any hash function in SILC. */
 typedef struct {
   char *name;
-  uint32 hash_len;
-  uint32 block_len;
+  SilcUInt32 hash_len;
+  SilcUInt32 block_len;
 
   void (*init)(void *);
-  void (*update)(void *, unsigned char *, uint32);
+  void (*update)(void *, unsigned char *, SilcUInt32);
   void (*final)(void *, unsigned char *);
-  void (*transform)(uint32 *, unsigned char *);
-  uint32 (*context_len)();
+  void (*transform)(SilcUInt32 *, unsigned char *);
+  SilcUInt32 (*context_len)();
 } SilcHashObject;
 
 /* The main SILC hash structure. Use SilcHash instead of SilcHashStruct.
@@ -41,7 +41,7 @@ typedef struct SilcHashStruct {
   void *context;
 
   void (*make_hash)(struct SilcHashStruct *, const unsigned char *, 
-                   uint32, unsigned char *);
+                   SilcUInt32, unsigned char *);
 } *SilcHash;
 
 /* Marks for all hash functions. This can be used in silc_hash_unregister
@@ -74,14 +74,14 @@ extern DLLAPI SilcHashObject silc_default_hash[];
 void silc_##hash##_init(void *context)
 #define SILC_HASH_API_UPDATE(hash)                             \
 void silc_##hash##_update(void *context, unsigned char *data,  \
-                                       uint32 len)
+                                       SilcUInt32 len)
 #define SILC_HASH_API_FINAL(hash)                              \
 void silc_##hash##_final(void *context, unsigned char *digest)
 #define SILC_HASH_API_TRANSFORM(hash)                                  \
-void silc_##hash##_transform(uint32 *state,                    \
+void silc_##hash##_transform(SilcUInt32 *state,                        \
                                          unsigned char *buffer)
 #define SILC_HASH_API_CONTEXT_LEN(hash)                \
-uint32 silc_##hash##_context_len()
+SilcUInt32 silc_##hash##_context_len()
 
 /* Prototypes */
 bool silc_hash_register(SilcHashObject *hash);
@@ -89,14 +89,14 @@ bool silc_hash_unregister(SilcHashObject *hash);
 bool silc_hash_register_default(void);
 bool silc_hash_alloc(const unsigned char *name, SilcHash *new_hash);
 void silc_hash_free(SilcHash hash);
-uint32 silc_hash_len(SilcHash hash);
+SilcUInt32 silc_hash_len(SilcHash hash);
 bool silc_hash_is_supported(const unsigned char *name);
 char *silc_hash_get_supported(void);
 void silc_hash_make(SilcHash hash, const unsigned char *data,
-                   uint32 len, unsigned char *return_hash);
+                   SilcUInt32 len, unsigned char *return_hash);
 char *silc_hash_fingerprint(SilcHash hash, const unsigned char *data,
-                           uint32 data_len);
+                           SilcUInt32 data_len);
 char *silc_hash_babbleprint(SilcHash hash, const unsigned char *data,
-                           uint32 data_len);
+                           SilcUInt32 data_len);
 
 #endif
index 1a00970e7f720f11dc8b386ef2f4353b09b209d0..babadd05788bb6a4aac42eced701b0a0d147fb18 100644 (file)
@@ -27,7 +27,7 @@ struct SilcHmacStruct {
   bool allocated_hash;         /* TRUE if the hash was allocated */
 
   unsigned char *key;
-  uint32 key_len;
+  SilcUInt32 key_len;
 
   unsigned char inner_pad[64];
   unsigned char outer_pad[64];
@@ -49,7 +49,7 @@ SilcHmacObject silc_default_hmacs[] =
 };
 
 static void silc_hmac_init_internal(SilcHmac hmac, unsigned char *key,
-                                   uint32 key_len)
+                                   SilcUInt32 key_len)
 {
   SilcHash hash = hmac->hash;
   unsigned char hvalue[20];
@@ -221,7 +221,7 @@ void silc_hmac_free(SilcHmac hmac)
 
 /* Returns the length of the MAC that the HMAC will produce. */
 
-uint32 silc_hmac_len(SilcHmac hmac)
+SilcUInt32 silc_hmac_len(SilcHmac hmac)
 {
   return hmac->hmac->len;
 }
@@ -289,7 +289,7 @@ char *silc_hmac_get_supported()
 /* Sets the HMAC key used in the HMAC creation */
 
 void silc_hmac_set_key(SilcHmac hmac, const unsigned char *key,
-                      uint32 key_len)
+                      SilcUInt32 key_len)
 {
   if (hmac->key) {
     memset(hmac->key, 0, hmac->key_len);
@@ -304,8 +304,8 @@ void silc_hmac_set_key(SilcHmac hmac, const unsigned char *key,
    uses the internal key set with silc_hmac_set_key. */
 
 void silc_hmac_make(SilcHmac hmac, unsigned char *data,
-                   uint32 data_len, unsigned char *return_hash,
-                   uint32 *return_len)
+                   SilcUInt32 data_len, unsigned char *return_hash,
+                   SilcUInt32 *return_len)
 {
   SILC_LOG_DEBUG(("Making HMAC for message"));
 
@@ -318,10 +318,10 @@ void silc_hmac_make(SilcHmac hmac, unsigned char *data,
    key. The key is sent as argument to the function. */
 
 void silc_hmac_make_with_key(SilcHmac hmac, unsigned char *data,
-                            uint32 data_len, 
-                            unsigned char *key, uint32 key_len,
+                            SilcUInt32 data_len, 
+                            unsigned char *key, SilcUInt32 key_len,
                             unsigned char *return_hash,
-                            uint32 *return_len)
+                            SilcUInt32 *return_len)
 {
   SILC_LOG_DEBUG(("Making HMAC for message"));
 
@@ -336,8 +336,8 @@ void silc_hmac_make_with_key(SilcHmac hmac, unsigned char *data,
    routine allows these dangerous truncations. */
 
 void silc_hmac_make_truncated(SilcHmac hmac, unsigned char *data,
-                             uint32 data_len,
-                             uint32 truncated_len,
+                             SilcUInt32 data_len,
+                             SilcUInt32 truncated_len,
                              unsigned char *return_hash)
 {
   unsigned char hvalue[20];
@@ -361,7 +361,7 @@ void silc_hmac_init(SilcHmac hmac)
 /* Same as above but with specific key */
 
 void silc_hmac_init_with_key(SilcHmac hmac, const unsigned char *key,
-                            uint32 key_len)
+                            SilcUInt32 key_len)
 {
   SilcHash hash = hmac->hash;
 
@@ -378,7 +378,7 @@ void silc_hmac_init_with_key(SilcHmac hmac, const unsigned char *key,
 /* Add data to be used in the MAC computation. */
 
 void silc_hmac_update(SilcHmac hmac, const unsigned char *data,
-                     uint32 data_len)
+                     SilcUInt32 data_len)
 {
   SilcHash hash = hmac->hash;
   hash->hash->update(hmac->hash_context, (unsigned char *)data, data_len);
@@ -387,7 +387,7 @@ void silc_hmac_update(SilcHmac hmac, const unsigned char *data,
 /* Compute the final MAC. */
 
 void silc_hmac_final(SilcHmac hmac, unsigned char *return_hash,
-                    uint32 *return_len)
+                    SilcUInt32 *return_len)
 {
   SilcHash hash = hmac->hash;
   unsigned char mac[20];
index 888014884657b0b9bfe230090dde927e4bf73ea2..a317a3f56830e9c41edecb54ef0dd34a28788b85 100644 (file)
@@ -65,7 +65,7 @@ typedef struct SilcHmacStruct *SilcHmac;
  ***/
 typedef struct {
   char *name;
-  uint32 len;
+  SilcUInt32 len;
 } SilcHmacObject;
 
 /* Marks for all hmacs. This can be used in silc_hmac_unregister
@@ -197,14 +197,14 @@ char *silc_hmac_get_supported(void);
  *
  * SYNOPSIS
  *
- *    uint32 silc_hmac_len(SilcHmac hmac);
+ *    SilcUInt32 silc_hmac_len(SilcHmac hmac);
  *
  * DESCRIPTION
  *
  *    Returns the length of the MAC that the HMAC will produce.
  *
  ***/
-uint32 silc_hmac_len(SilcHmac hmac);
+SilcUInt32 silc_hmac_len(SilcHmac hmac);
 
 /****f* silccrypt/SilcHMACAPI/silc_hmac_get_hash
  *
@@ -238,7 +238,7 @@ const char *silc_hmac_get_name(SilcHmac hmac);
  * SYNOPSIS
  *
  *    void silc_hmac_set_key(SilcHmac hmac, const unsigned char *key,
- *                           uint32 key_len);
+ *                           SilcUInt32 key_len);
  *
  * DESCRIPTION
  *
@@ -250,15 +250,15 @@ const char *silc_hmac_get_name(SilcHmac hmac);
  *
  ***/
 void silc_hmac_set_key(SilcHmac hmac, const unsigned char *key,
-                      uint32 key_len);
+                      SilcUInt32 key_len);
 
 /****f* silccrypt/SilcHMACAPI/silc_hmac_make
  *
  * SYNOPSIS
  *
  *    void silc_hmac_make(SilcHmac hmac, unsigned char *data,
- *                        uint32 data_len, unsigned char *return_hash,
- *                        uint32 *return_len);
+ *                        SilcUInt32 data_len, unsigned char *return_hash,
+ *                        SilcUInt32 *return_len);
  *
  * DESCRIPTION
  *
@@ -270,18 +270,18 @@ void silc_hmac_set_key(SilcHmac hmac, const unsigned char *key,
  *
  ***/
 void silc_hmac_make(SilcHmac hmac, unsigned char *data,
-                   uint32 data_len, unsigned char *return_hash,
-                   uint32 *return_len);
+                   SilcUInt32 data_len, unsigned char *return_hash,
+                   SilcUInt32 *return_len);
 
 /****f* silccrypt/SilcHMACAPI/silc_hmac_make_with_key
  *
  * SYNOPSIS
  *
  *    void silc_hmac_make_with_key(SilcHmac hmac, unsigned char *data,
- *                                 uint32 data_len, 
- *                                 unsigned char *key, uint32 key_len,
+ *                                 SilcUInt32 data_len, 
+ *                                 unsigned char *key, SilcUInt32 key_len,
  *                                 unsigned char *return_hash,
- *                                 uint32 *return_len);
+ *                                 SilcUInt32 *return_len);
  *
  * DESCRIPTION
  *
@@ -291,10 +291,10 @@ void silc_hmac_make(SilcHmac hmac, unsigned char *data,
  *
  ***/
 void silc_hmac_make_with_key(SilcHmac hmac, unsigned char *data,
-                            uint32 data_len, 
-                            unsigned char *key, uint32 key_len,
+                            SilcUInt32 data_len, 
+                            unsigned char *key, SilcUInt32 key_len,
                             unsigned char *return_hash,
-                            uint32 *return_len);
+                            SilcUInt32 *return_len);
 
 /****f* silccrypt/SilcHMACAPI/silc_hmac_make_truncated
  *
@@ -302,8 +302,8 @@ void silc_hmac_make_with_key(SilcHmac hmac, unsigned char *data,
  *
  *    void silc_hmac_make_truncated(SilcHmac hmac, 
  *                                  unsigned char *data, 
- *                                  uint32 data_len,
- *                                  uint32 truncated_len,
+ *                                  SilcUInt32 data_len,
+ *                                  SilcUInt32 truncated_len,
  *                                  unsigned char *return_hash);
  *
  * DESCRIPTION
@@ -323,8 +323,8 @@ void silc_hmac_make_with_key(SilcHmac hmac, unsigned char *data,
  ***/
 void silc_hmac_make_truncated(SilcHmac hmac, 
                              unsigned char *data, 
-                             uint32 data_len,
-                             uint32 truncated_len,
+                             SilcUInt32 data_len,
+                             SilcUInt32 truncated_len,
                              unsigned char *return_hash);
 
 /****f* silccrypt/SilcHMACAPI/silc_hmac_init
@@ -355,7 +355,7 @@ void silc_hmac_init(SilcHmac hmac);
  * SYNOPSIS
  *
  *    void silc_hmac_init_with_key(SilcHmac hmac, const unsigned char *key,
- *                                 uint32 key_len);
+ *                                 SilcUInt32 key_len);
  *
  * DESCRIPTION
  *
@@ -364,14 +364,14 @@ void silc_hmac_init(SilcHmac hmac);
  *
  ***/
 void silc_hmac_init_with_key(SilcHmac hmac, const unsigned char *key,
-                            uint32 key_len);
+                            SilcUInt32 key_len);
 
 /****f* silccrypt/SilcHMACAPI/silc_hmac_update
  *
  * SYNOPSIS
  *
  *    void silc_hmac_update(SilcHmac hmac, const unsigned char *data,
- *                          uint32 data_len);
+ *                          SilcUInt32 data_len);
  *
  * DESCRIPTION
  *
@@ -384,7 +384,7 @@ void silc_hmac_init_with_key(SilcHmac hmac, const unsigned char *key,
  * EXAMPLE
  *
  *    unsigned char mac[20];
- *    uint32 mac_len;
+ *    SilcUInt32 mac_len;
  *
  *    silc_hmac_init(hmac);
  *    silc_hmac_update(hmac, data, data_len);
@@ -393,14 +393,14 @@ void silc_hmac_init_with_key(SilcHmac hmac, const unsigned char *key,
  *
  ***/
 void silc_hmac_update(SilcHmac hmac, const unsigned char *data,
-                     uint32 data_len);
+                     SilcUInt32 data_len);
 
 /****f* silccrypt/SilcHMACAPI/silc_hmac_final
  *
  * SYNOPSIS
  *
  *    void silc_hmac_final(SilcHmac hmac, unsigned char *return_hash,
- *                         uint32 *return_len);
+ *                         SilcUInt32 *return_len);
  *
  * DESCRIPTION
  *
@@ -413,6 +413,6 @@ void silc_hmac_update(SilcHmac hmac, const unsigned char *data,
  *
  ***/
 void silc_hmac_final(SilcHmac hmac, unsigned char *return_hash,
-                    uint32 *return_len);
+                    SilcUInt32 *return_len);
 
 #endif
index 2f9699bb064bdeb51674a554f13b12f9c839d129..21821257fe37114a1692dba24683174f72d778c5 100644 (file)
@@ -204,28 +204,28 @@ char *silc_pkcs_get_supported(void)
 
 /* Returns the length of the key */
 
-uint32 silc_pkcs_get_key_len(SilcPKCS pkcs)
+SilcUInt32 silc_pkcs_get_key_len(SilcPKCS pkcs)
 {
   return pkcs->key_len;
 }
 
 /* Returns SILC style public key */
 
-unsigned char *silc_pkcs_get_public_key(SilcPKCS pkcs, uint32 *len)
+unsigned char *silc_pkcs_get_public_key(SilcPKCS pkcs, SilcUInt32 *len)
 {
   return pkcs->pkcs->get_public_key(pkcs->context, len);
 }
 
 /* Returns SILC style private key */
 
-unsigned char *silc_pkcs_get_private_key(SilcPKCS pkcs, uint32 *len)
+unsigned char *silc_pkcs_get_private_key(SilcPKCS pkcs, SilcUInt32 *len)
 {
   return pkcs->pkcs->get_private_key(pkcs->context, len);
 }
 
 /* Sets public key from SilcPublicKey. */
 
-uint32 silc_pkcs_public_key_set(SilcPKCS pkcs, SilcPublicKey public_key)
+SilcUInt32 silc_pkcs_public_key_set(SilcPKCS pkcs, SilcPublicKey public_key)
 {
   pkcs->key_len = pkcs->pkcs->set_public_key(pkcs->context, public_key->pk, 
                                             public_key->pk_len);
@@ -234,8 +234,8 @@ uint32 silc_pkcs_public_key_set(SilcPKCS pkcs, SilcPublicKey public_key)
 
 /* Sets public key from data. */
 
-uint32 silc_pkcs_public_key_data_set(SilcPKCS pkcs, unsigned char *pk,
-                                    uint32 pk_len)
+SilcUInt32 silc_pkcs_public_key_data_set(SilcPKCS pkcs, unsigned char *pk,
+                                    SilcUInt32 pk_len)
 {
   pkcs->key_len = pkcs->pkcs->set_public_key(pkcs->context, pk, pk_len);
   return pkcs->key_len;
@@ -252,31 +252,31 @@ int silc_pkcs_private_key_set(SilcPKCS pkcs, SilcPrivateKey private_key)
 /* Sets private key from data. */
 
 int silc_pkcs_private_key_data_set(SilcPKCS pkcs, unsigned char *prv,
-                                  uint32 prv_len)
+                                  SilcUInt32 prv_len)
 {
   return pkcs->pkcs->set_private_key(pkcs->context, prv, prv_len);
 }
 
 /* Encrypts */
 
-int silc_pkcs_encrypt(SilcPKCS pkcs, unsigned char *src, uint32 src_len,
-                     unsigned char *dst, uint32 *dst_len)
+int silc_pkcs_encrypt(SilcPKCS pkcs, unsigned char *src, SilcUInt32 src_len,
+                     unsigned char *dst, SilcUInt32 *dst_len)
 {
   return pkcs->pkcs->encrypt(pkcs->context, src, src_len, dst, dst_len);
 }
 
 /* Decrypts */
 
-int silc_pkcs_decrypt(SilcPKCS pkcs, unsigned char *src, uint32 src_len,
-                     unsigned char *dst, uint32 *dst_len)
+int silc_pkcs_decrypt(SilcPKCS pkcs, unsigned char *src, SilcUInt32 src_len,
+                     unsigned char *dst, SilcUInt32 *dst_len)
 {
   return pkcs->pkcs->decrypt(pkcs->context, src, src_len, dst, dst_len);
 }
 
 /* Generates signature */
 
-int silc_pkcs_sign(SilcPKCS pkcs, unsigned char *src, uint32 src_len,
-                  unsigned char *dst, uint32 *dst_len)
+int silc_pkcs_sign(SilcPKCS pkcs, unsigned char *src, SilcUInt32 src_len,
+                  unsigned char *dst, SilcUInt32 *dst_len)
 {
   return pkcs->pkcs->sign(pkcs->context, src, src_len, dst, dst_len);
 }
@@ -284,8 +284,8 @@ int silc_pkcs_sign(SilcPKCS pkcs, unsigned char *src, uint32 src_len,
 /* Verifies signature */
 
 int silc_pkcs_verify(SilcPKCS pkcs, unsigned char *signature, 
-                    uint32 signature_len, unsigned char *data, 
-                    uint32 data_len)
+                    SilcUInt32 signature_len, unsigned char *data, 
+                    SilcUInt32 data_len)
 {
   return pkcs->pkcs->verify(pkcs->context, signature, signature_len, 
                            data, data_len);
@@ -294,11 +294,11 @@ int silc_pkcs_verify(SilcPKCS pkcs, unsigned char *signature,
 /* Generates signature with hash. The hash is signed. */
 
 int silc_pkcs_sign_with_hash(SilcPKCS pkcs, SilcHash hash,
-                            unsigned char *src, uint32 src_len,
-                            unsigned char *dst, uint32 *dst_len)
+                            unsigned char *src, SilcUInt32 src_len,
+                            unsigned char *dst, SilcUInt32 *dst_len)
 {
   unsigned char hashr[32];
-  uint32 hash_len;
+  SilcUInt32 hash_len;
   int ret;
 
   silc_hash_make(hash, src, src_len, hashr);
@@ -317,12 +317,12 @@ int silc_pkcs_sign_with_hash(SilcPKCS pkcs, SilcHash hash,
 
 int silc_pkcs_verify_with_hash(SilcPKCS pkcs, SilcHash hash, 
                               unsigned char *signature, 
-                              uint32 signature_len, 
+                              SilcUInt32 signature_len, 
                               unsigned char *data, 
-                              uint32 data_len)
+                              SilcUInt32 data_len)
 {
   unsigned char hashr[32];
-  uint32 hash_len;
+  SilcUInt32 hash_len;
   int ret;
 
   silc_hash_make(hash, data, data_len, hashr);
@@ -346,7 +346,7 @@ char *silc_pkcs_encode_identifier(char *username, char *host, char *realname,
 {
   SilcBuffer buf;
   char *identifier;
-  uint32 len, tlen = 0;
+  SilcUInt32 len, tlen = 0;
 
   if (!username || !host)
     return NULL;
@@ -503,7 +503,7 @@ void silc_pkcs_free_identifier(SilcPublicKeyIdentifier identifier)
 
 SilcPublicKey silc_pkcs_public_key_alloc(char *name, char *identifier,
                                         unsigned char *pk, 
-                                        uint32 pk_len)
+                                        SilcUInt32 pk_len)
 {
   SilcPublicKey public_key;
 
@@ -534,7 +534,7 @@ void silc_pkcs_public_key_free(SilcPublicKey public_key)
    duplicated. */
 
 SilcPrivateKey silc_pkcs_private_key_alloc(char *name, unsigned char *prv,
-                                          uint32 prv_len)
+                                          SilcUInt32 prv_len)
 {
   SilcPrivateKey private_key;
 
@@ -562,7 +562,7 @@ void silc_pkcs_private_key_free(SilcPrivateKey private_key)
    data. */
 
 unsigned char *
-silc_pkcs_public_key_encode(SilcPublicKey public_key, uint32 *len)
+silc_pkcs_public_key_encode(SilcPublicKey public_key, SilcUInt32 *len)
 {
   SilcBuffer buf;
   unsigned char *ret;
@@ -592,13 +592,13 @@ silc_pkcs_public_key_encode(SilcPublicKey public_key, uint32 *len)
 /* Encodes SILC style public key. Returns the encoded data. */
 
 unsigned char *
-silc_pkcs_public_key_data_encode(unsigned char *pk, uint32 pk_len,
+silc_pkcs_public_key_data_encode(unsigned char *pk, SilcUInt32 pk_len,
                                 char *pkcs, char *identifier, 
-                                uint32 *len)
+                                SilcUInt32 *len)
 {
   SilcBuffer buf;
   unsigned char *ret;
-  uint32 totlen;
+  SilcUInt32 totlen;
 
   totlen = 4 + 2 + strlen(pkcs) + 2 + strlen(identifier) + pk_len;
   buf = silc_buffer_alloc(totlen);
@@ -625,13 +625,13 @@ silc_pkcs_public_key_data_encode(unsigned char *pk, uint32 pk_len,
 /* Decodes SILC style public key. Returns TRUE if the decoding was
    successful. Allocates new public key as well. */
 
-int silc_pkcs_public_key_decode(unsigned char *data, uint32 data_len,
+int silc_pkcs_public_key_decode(unsigned char *data, SilcUInt32 data_len,
                                SilcPublicKey *public_key)
 {
   SilcBuffer buf;
   SilcPKCS alg;
-  uint16 pkcs_len, identifier_len;
-  uint32 totlen, key_len;
+  SilcUInt16 pkcs_len, identifier_len;
+  SilcUInt32 totlen, key_len;
   unsigned char *pkcs_name = NULL, *ident = NULL, *key_data = NULL;
   int ret;
 
@@ -745,11 +745,11 @@ bool silc_pkcs_public_key_compare(SilcPublicKey key1, SilcPublicKey key2)
 /* Encodes SILC private key from SilcPrivateKey. Returns the encoded data. */
 
 unsigned char *
-silc_pkcs_private_key_encode(SilcPrivateKey private_key, uint32 *len)
+silc_pkcs_private_key_encode(SilcPrivateKey private_key, SilcUInt32 *len)
 {
   SilcBuffer buf;
   unsigned char *ret;
-  uint32 totlen;
+  SilcUInt32 totlen;
 
   totlen = 2 + strlen(private_key->name) + private_key->prv_len;
   buf = silc_buffer_alloc(totlen);
@@ -774,12 +774,12 @@ silc_pkcs_private_key_encode(SilcPrivateKey private_key, uint32 *len)
 /* Encodes SILC private key. Returns the encoded data. */
 
 unsigned char *
-silc_pkcs_private_key_data_encode(unsigned char *prv, uint32 prv_len,
-                                 char *pkcs, uint32 *len)
+silc_pkcs_private_key_data_encode(unsigned char *prv, SilcUInt32 prv_len,
+                                 char *pkcs, SilcUInt32 *len)
 {
   SilcBuffer buf;
   unsigned char *ret;
-  uint32 totlen;
+  SilcUInt32 totlen;
 
   totlen = 2 + strlen(pkcs) + prv_len;
   buf = silc_buffer_alloc(totlen);
@@ -803,13 +803,13 @@ silc_pkcs_private_key_data_encode(unsigned char *prv, uint32 prv_len,
 /* Decodes SILC style public key. Returns TRUE if the decoding was
    successful. Allocates new private key as well. */
 
-int silc_pkcs_private_key_decode(unsigned char *data, uint32 data_len,
+int silc_pkcs_private_key_decode(unsigned char *data, SilcUInt32 data_len,
                                 SilcPrivateKey *private_key)
 {
   SilcBuffer buf;
   SilcPKCS alg;
-  uint16 pkcs_len;
-  uint32 key_len;
+  SilcUInt16 pkcs_len;
+  SilcUInt32 key_len;
   unsigned char *pkcs_name = NULL, *key_data = NULL;
   int ret;
 
@@ -876,11 +876,11 @@ int silc_pkcs_private_key_decode(unsigned char *data, uint32 data_len,
 
 static int silc_pkcs_save_public_key_internal(char *filename,
                                              unsigned char *data,
-                                             uint32 data_len,
-                                             uint32 encoding)
+                                             SilcUInt32 data_len,
+                                             SilcUInt32 encoding)
 {
   SilcBuffer buf;
-  uint32 len;
+  SilcUInt32 len;
 
   switch(encoding) {
   case SILC_PKCS_FILE_BIN:
@@ -915,10 +915,10 @@ static int silc_pkcs_save_public_key_internal(char *filename,
 /* Saves public key into file */
 
 int silc_pkcs_save_public_key(char *filename, SilcPublicKey public_key,
-                             uint32 encoding)
+                             SilcUInt32 encoding)
 {
   unsigned char *data;
-  uint32 data_len;
+  SilcUInt32 data_len;
 
   data = silc_pkcs_public_key_encode(public_key, &data_len);
   return silc_pkcs_save_public_key_internal(filename, data, data_len,
@@ -928,8 +928,8 @@ int silc_pkcs_save_public_key(char *filename, SilcPublicKey public_key,
 /* Saves public key into file */
 
 int silc_pkcs_save_public_key_data(char *filename, unsigned char *data,
-                                  uint32 data_len,
-                                  uint32 encoding)
+                                  SilcUInt32 data_len,
+                                  SilcUInt32 encoding)
 {
   return silc_pkcs_save_public_key_internal(filename, data, data_len,
                                            encoding);
@@ -939,11 +939,11 @@ int silc_pkcs_save_public_key_data(char *filename, unsigned char *data,
 
 static int silc_pkcs_save_private_key_internal(char *filename,
                                               unsigned char *data,
-                                              uint32 data_len,
-                                              uint32 encoding)
+                                              SilcUInt32 data_len,
+                                              SilcUInt32 encoding)
 {
   SilcBuffer buf;
-  uint32 len;
+  SilcUInt32 len;
 
   switch(encoding) {
   case SILC_PKCS_FILE_BIN:
@@ -980,10 +980,10 @@ static int silc_pkcs_save_private_key_internal(char *filename,
 
 int silc_pkcs_save_private_key(char *filename, SilcPrivateKey private_key, 
                               unsigned char *passphrase,
-                              uint32 encoding)
+                              SilcUInt32 encoding)
 {
   unsigned char *data;
-  uint32 data_len;
+  SilcUInt32 data_len;
 
   data = silc_pkcs_private_key_encode(private_key, &data_len);
   return silc_pkcs_save_private_key_internal(filename, data, data_len,
@@ -994,9 +994,9 @@ int silc_pkcs_save_private_key(char *filename, SilcPrivateKey private_key,
 /* XXX The buffer should be encrypted if passphrase is provided. */
 
 int silc_pkcs_save_private_key_data(char *filename, unsigned char *data, 
-                                   uint32 data_len,
+                                   SilcUInt32 data_len,
                                    unsigned char *passphrase,
-                                   uint32 encoding)
+                                   SilcUInt32 encoding)
 {
   return silc_pkcs_save_private_key_internal(filename, data, data_len,
                                             encoding);
@@ -1006,10 +1006,10 @@ int silc_pkcs_save_private_key_data(char *filename, unsigned char *data,
    is loading was successful. */
 
 int silc_pkcs_load_public_key(char *filename, SilcPublicKey *public_key,
-                             uint32 encoding)
+                             SilcUInt32 encoding)
 {
   unsigned char *cp, *old, *data, byte;
-  uint32 i, data_len, len;
+  SilcUInt32 i, data_len, len;
 
   old = data = silc_file_readfile(filename, &data_len);
   if (!data)
@@ -1063,10 +1063,10 @@ int silc_pkcs_load_public_key(char *filename, SilcPublicKey *public_key,
 /* XXX Should support encrypted private key files */
 
 int silc_pkcs_load_private_key(char *filename, SilcPrivateKey *private_key,
-                              uint32 encoding)
+                              SilcUInt32 encoding)
 {
   unsigned char *cp, *old, *data, byte;
-  uint32 i, data_len, len;
+  SilcUInt32 i, data_len, len;
 
   old = data = silc_file_readfile(filename, &data_len);
   if (!data)
index 57968af9deff967e081a52bebb14cee0eb138d5d..97fc45c142ce1ffc6fba7e5c92b2919507e01205 100644 (file)
    any PKCS in SILC. */
 typedef struct SilcPKCSObjectStruct {
   char *name;
-  int (*init)(void *, uint32, SilcRng);
+  int (*init)(void *, SilcUInt32, SilcRng);
   void (*clear_keys)(void *);
-  unsigned char *(*get_public_key)(void *, uint32 *);
-  unsigned char *(*get_private_key)(void *, uint32 *);
-  uint32 (*set_public_key)(void *, unsigned char *, uint32);
-  int (*set_private_key)(void *, unsigned char *, uint32);
-  uint32 (*context_len)();
-  int (*encrypt)(void *, unsigned char *, uint32,
-                unsigned char *, uint32 *);
-  int (*decrypt)(void *, unsigned char *, uint32,
-                unsigned char *, uint32 *);
-  int (*sign)(void *, unsigned char *, uint32,
-             unsigned char *, uint32 *);
-  int (*verify)(void *, unsigned char *, uint32,
-               unsigned char *, uint32);
+  unsigned char *(*get_public_key)(void *, SilcUInt32 *);
+  unsigned char *(*get_private_key)(void *, SilcUInt32 *);
+  SilcUInt32 (*set_public_key)(void *, unsigned char *, SilcUInt32);
+  int (*set_private_key)(void *, unsigned char *, SilcUInt32);
+  SilcUInt32 (*context_len)();
+  int (*encrypt)(void *, unsigned char *, SilcUInt32,
+                unsigned char *, SilcUInt32 *);
+  int (*decrypt)(void *, unsigned char *, SilcUInt32,
+                unsigned char *, SilcUInt32 *);
+  int (*sign)(void *, unsigned char *, SilcUInt32,
+             unsigned char *, SilcUInt32 *);
+  int (*verify)(void *, unsigned char *, SilcUInt32,
+               unsigned char *, SilcUInt32);
 } SilcPKCSObject;
 
 /* The main SILC PKCS structure. Use SilcPKCS instead of SilcPKCSStruct.
@@ -47,20 +47,20 @@ typedef struct SilcPKCSObjectStruct {
 typedef struct SilcPKCSStruct {
   void *context;
   SilcPKCSObject *pkcs;
-  uint32 key_len;
+  SilcUInt32 key_len;
 
-  uint32 (*get_key_len)(struct SilcPKCSStruct *);
+  SilcUInt32 (*get_key_len)(struct SilcPKCSStruct *);
 } *SilcPKCS;
 
 /* SILC style public key object. Public key is read from file to this
    object. Public keys received from network must be in this format as 
    well. */
 typedef struct {
-  uint32 len;
+  SilcUInt32 len;
   char *name;
   char *identifier;
   unsigned char *pk;
-  uint32 pk_len;
+  SilcUInt32 pk_len;
 } *SilcPublicKey;
 
 /* SILC style private key object. Private key is read from file to this
@@ -68,7 +68,7 @@ typedef struct {
 typedef struct {
   char *name;
   unsigned char *prv;
-  uint32 prv_len;
+  SilcUInt32 prv_len;
 } *SilcPrivateKey;
 
 /* Decoded SILC Public Key identifier. Note that some of the fields 
@@ -116,7 +116,7 @@ extern DLLAPI SilcPKCSObject silc_default_pkcs[];
    would look something like this:
 
    #define SILC_PKCS_API_INIT(pkcs) \
-   inline int silc_##pkcs##_init(void *context, uint32 keylen, \
+   inline int silc_##pkcs##_init(void *context, SilcUInt32 keylen, \
                                  void *p1, void *p2)
 
    Now we wouldn't have to send the SilcRng object since the primes are 
@@ -128,48 +128,48 @@ extern DLLAPI SilcPKCSObject silc_default_pkcs[];
 */
 
 #define SILC_PKCS_API_INIT(pkcs) \
-int silc_##pkcs##_init(void *context, uint32 keylen, \
+int silc_##pkcs##_init(void *context, SilcUInt32 keylen, \
                       SilcRng rng)
 #define SILC_PKCS_API_CLEAR_KEYS(pkcs) \
 void silc_##pkcs##_clear_keys(void *context)
 #define SILC_PKCS_API_GET_PUBLIC_KEY(pkcs) \
 unsigned char *silc_##pkcs##_get_public_key(void *context, \
-                                            uint32 *ret_len)
+                                            SilcUInt32 *ret_len)
 #define SILC_PKCS_API_GET_PRIVATE_KEY(pkcs) \
 unsigned char *silc_##pkcs##_get_private_key(void *context, \
-                                             uint32 *ret_len)
+                                             SilcUInt32 *ret_len)
 #define SILC_PKCS_API_SET_PUBLIC_KEY(pkcs) \
-uint32 silc_##pkcs##_set_public_key(void *context, unsigned char *key_data, \
-                                    uint32 key_len)
+SilcUInt32 silc_##pkcs##_set_public_key(void *context, unsigned char *key_data, \
+                                    SilcUInt32 key_len)
 #define SILC_PKCS_API_SET_PRIVATE_KEY(pkcs) \
 int silc_##pkcs##_set_private_key(void *context, unsigned char *key_data, \
-                                  uint32 key_len)
+                                  SilcUInt32 key_len)
 #define SILC_PKCS_API_CONTEXT_LEN(pkcs) \
-uint32 silc_##pkcs##_context_len()
+SilcUInt32 silc_##pkcs##_context_len()
 #define SILC_PKCS_API_ENCRYPT(pkcs) \
 int silc_##pkcs##_encrypt(void *context, \
                          unsigned char *src, \
-                         uint32 src_len, \
+                         SilcUInt32 src_len, \
                          unsigned char *dst, \
-                         uint32 *dst_len)
+                         SilcUInt32 *dst_len)
 #define SILC_PKCS_API_DECRYPT(pkcs) \
 int silc_##pkcs##_decrypt(void *context, \
                          unsigned char *src, \
-                         uint32 src_len, \
+                         SilcUInt32 src_len, \
                          unsigned char *dst, \
-                         uint32 *dst_len)
+                         SilcUInt32 *dst_len)
 #define SILC_PKCS_API_SIGN(pkcs) \
 int silc_##pkcs##_sign(void *context, \
                       unsigned char *src, \
-                      uint32 src_len, \
+                      SilcUInt32 src_len, \
                       unsigned char *dst, \
-                      uint32 *dst_len)
+                      SilcUInt32 *dst_len)
 #define SILC_PKCS_API_VERIFY(pkcs) \
 int silc_##pkcs##_verify(void *context, \
                         unsigned char *signature, \
-                        uint32 signature_len, \
+                        SilcUInt32 signature_len, \
                         unsigned char *data, \
-                        uint32 data_len)
+                        SilcUInt32 data_len)
 
 /* Prototypes */
 bool silc_pkcs_register(SilcPKCSObject *pkcs);
@@ -179,74 +179,74 @@ bool silc_pkcs_alloc(const unsigned char *name, SilcPKCS *new_pkcs);
 void silc_pkcs_free(SilcPKCS pkcs);
 int silc_pkcs_is_supported(const unsigned char *name);
 char *silc_pkcs_get_supported(void);
-uint32 silc_pkcs_get_key_len(SilcPKCS self);
-unsigned char *silc_pkcs_get_public_key(SilcPKCS pkcs, uint32 *len);
-unsigned char *silc_pkcs_get_private_key(SilcPKCS pkcs, uint32 *len);
-uint32 silc_pkcs_public_key_set(SilcPKCS pkcs, SilcPublicKey public_key);
-uint32 silc_pkcs_public_key_data_set(SilcPKCS pkcs, unsigned char *pk,
-                                    uint32 pk_len);
+SilcUInt32 silc_pkcs_get_key_len(SilcPKCS self);
+unsigned char *silc_pkcs_get_public_key(SilcPKCS pkcs, SilcUInt32 *len);
+unsigned char *silc_pkcs_get_private_key(SilcPKCS pkcs, SilcUInt32 *len);
+SilcUInt32 silc_pkcs_public_key_set(SilcPKCS pkcs, SilcPublicKey public_key);
+SilcUInt32 silc_pkcs_public_key_data_set(SilcPKCS pkcs, unsigned char *pk,
+                                    SilcUInt32 pk_len);
 int silc_pkcs_private_key_set(SilcPKCS pkcs, SilcPrivateKey private_key);
 int silc_pkcs_private_key_data_set(SilcPKCS pkcs, unsigned char *prv,
-                                  uint32 prv_len);
-int silc_pkcs_encrypt(SilcPKCS pkcs, unsigned char *src, uint32 src_len,
-                     unsigned char *dst, uint32 *dst_len);
-int silc_pkcs_decrypt(SilcPKCS pkcs, unsigned char *src, uint32 src_len,
-                     unsigned char *dst, uint32 *dst_len);
-int silc_pkcs_sign(SilcPKCS pkcs, unsigned char *src, uint32 src_len,
-                  unsigned char *dst, uint32 *dst_len);
+                                  SilcUInt32 prv_len);
+int silc_pkcs_encrypt(SilcPKCS pkcs, unsigned char *src, SilcUInt32 src_len,
+                     unsigned char *dst, SilcUInt32 *dst_len);
+int silc_pkcs_decrypt(SilcPKCS pkcs, unsigned char *src, SilcUInt32 src_len,
+                     unsigned char *dst, SilcUInt32 *dst_len);
+int silc_pkcs_sign(SilcPKCS pkcs, unsigned char *src, SilcUInt32 src_len,
+                  unsigned char *dst, SilcUInt32 *dst_len);
 int silc_pkcs_verify(SilcPKCS pkcs, unsigned char *signature, 
-                    uint32 signature_len, unsigned char *data, 
-                    uint32 data_len);
+                    SilcUInt32 signature_len, unsigned char *data, 
+                    SilcUInt32 data_len);
 int silc_pkcs_sign_with_hash(SilcPKCS pkcs, SilcHash hash,
-                            unsigned char *src, uint32 src_len,
-                            unsigned char *dst, uint32 *dst_len);
+                            unsigned char *src, SilcUInt32 src_len,
+                            unsigned char *dst, SilcUInt32 *dst_len);
 int silc_pkcs_verify_with_hash(SilcPKCS pkcs, SilcHash hash, 
                               unsigned char *signature, 
-                              uint32 signature_len, 
+                              SilcUInt32 signature_len, 
                               unsigned char *data, 
-                              uint32 data_len);
+                              SilcUInt32 data_len);
 char *silc_pkcs_encode_identifier(char *username, char *host, char *realname,
                                  char *email, char *org, char *country);
 SilcPublicKeyIdentifier silc_pkcs_decode_identifier(char *identifier);
 void silc_pkcs_free_identifier(SilcPublicKeyIdentifier identifier);
 SilcPublicKey silc_pkcs_public_key_alloc(char *name, char *identifier,
                                         unsigned char *pk, 
-                                        uint32 pk_len);
+                                        SilcUInt32 pk_len);
 void silc_pkcs_public_key_free(SilcPublicKey public_key);
 SilcPrivateKey silc_pkcs_private_key_alloc(char *name, unsigned char *prv,
-                                          uint32 prv_len);
+                                          SilcUInt32 prv_len);
 void silc_pkcs_private_key_free(SilcPrivateKey private_key);
 unsigned char *
-silc_pkcs_public_key_encode(SilcPublicKey public_key, uint32 *len);
+silc_pkcs_public_key_encode(SilcPublicKey public_key, SilcUInt32 *len);
 unsigned char *
-silc_pkcs_public_key_data_encode(unsigned char *pk, uint32 pk_len,
+silc_pkcs_public_key_data_encode(unsigned char *pk, SilcUInt32 pk_len,
                                 char *pkcs, char *identifier, 
-                                uint32 *len);
-int silc_pkcs_public_key_decode(unsigned char *data, uint32 data_len,
+                                SilcUInt32 *len);
+int silc_pkcs_public_key_decode(unsigned char *data, SilcUInt32 data_len,
                                SilcPublicKey *public_key);
 bool silc_pkcs_public_key_compare(SilcPublicKey key1, SilcPublicKey key2);
 unsigned char *
-silc_pkcs_private_key_encode(SilcPrivateKey private_key, uint32 *len);
+silc_pkcs_private_key_encode(SilcPrivateKey private_key, SilcUInt32 *len);
 unsigned char *
-silc_pkcs_private_key_data_encode(unsigned char *prv, uint32 prv_len,
-                                 char *pkcs, uint32 *len);
-int silc_pkcs_private_key_decode(unsigned char *data, uint32 data_len,
+silc_pkcs_private_key_data_encode(unsigned char *prv, SilcUInt32 prv_len,
+                                 char *pkcs, SilcUInt32 *len);
+int silc_pkcs_private_key_decode(unsigned char *data, SilcUInt32 data_len,
                                 SilcPrivateKey *private_key);
 int silc_pkcs_save_public_key(char *filename, SilcPublicKey public_key,
-                             uint32 encoding);
+                             SilcUInt32 encoding);
 int silc_pkcs_save_public_key_data(char *filename, unsigned char *data,
-                                  uint32 data_len,
-                                  uint32 encoding);
+                                  SilcUInt32 data_len,
+                                  SilcUInt32 encoding);
 int silc_pkcs_save_private_key(char *filename, SilcPrivateKey private_key, 
                               unsigned char *passphrase,
-                              uint32 encoding);
+                              SilcUInt32 encoding);
 int silc_pkcs_save_private_key_data(char *filename, unsigned char *data, 
-                                   uint32 data_len,
+                                   SilcUInt32 data_len,
                                    unsigned char *passphrase,
-                                   uint32 encoding);
+                                   SilcUInt32 encoding);
 int silc_pkcs_load_public_key(char *filename, SilcPublicKey *public_key,
-                             uint32 encoding);
+                             SilcUInt32 encoding);
 int silc_pkcs_load_private_key(char *filename, SilcPrivateKey *private_key,
-                              uint32 encoding);
+                              SilcUInt32 encoding);
 
 #endif
index 4c69e9bf566cbb578272750015f340eeb6c6b9f6..06340066165b94cb1dfd6371e88750a2b1d13ff0 100644 (file)
@@ -46,9 +46,9 @@ extern pid_t getpgid (pid_t __pid);
 /* Byte size of the random data pool. */
 #define SILC_RNG_POOLSIZE 1024
 
-static uint32 silc_rng_get_position(SilcRng rng);
+static SilcUInt32 silc_rng_get_position(SilcRng rng);
 static void silc_rng_stir_pool(SilcRng rng);
-static void silc_rng_xor(SilcRng rng, uint32 val, unsigned int pos);
+static void silc_rng_xor(SilcRng rng, SilcUInt32 val, unsigned int pos);
 static void silc_rng_exec_command(SilcRng rng, char *command);
 static void silc_rng_get_hard_noise(SilcRng rng);
 static void silc_rng_get_medium_noise(SilcRng rng);
@@ -63,8 +63,8 @@ static void silc_rng_get_soft_noise(SilcRng rng);
    from the same point of the pool. Short description of the fields
    following.
 
-   uint32 low
-   uint32 pos
+   SilcUInt32 low
+   SilcUInt32 pos
 
        The index for the random pool buffer. Lowest and current
        positions.
@@ -76,8 +76,8 @@ static void silc_rng_get_soft_noise(SilcRng rng);
 
 */
 typedef struct SilcRngStateContext {
-  uint32 low;
-  uint32 pos;
+  SilcUInt32 low;
+  SilcUInt32 pos;
   struct SilcRngStateContext *next;
 } *SilcRngState;
 
@@ -111,7 +111,7 @@ typedef struct SilcRngStateContext {
        random pool. This is allocated when RNG object is allocated and
        free'd when RNG object is free'd.
 
-   uint8 threshold
+   SilcUInt8 threshold
 
        Threshold to indicate when it is required to acquire more
        noise from the environment.  More soft noise is acquired after
@@ -123,7 +123,7 @@ struct SilcRngStruct {
   unsigned char key[64];
   SilcRngState state;
   SilcHash sha1;
-  uint8 threshold;
+  SilcUInt8 threshold;
   char *devrandom;
   int fd_devurandom;
 };
@@ -219,7 +219,7 @@ static void silc_rng_get_soft_noise(SilcRng rng)
 #ifndef SILC_WIN32
   struct tms ptime;
 #endif
-  uint32 pos;
+  SilcUInt32 pos;
   
   pos = silc_rng_get_position(rng);
 
@@ -361,9 +361,9 @@ static void silc_rng_exec_command(SilcRng rng, char *command)
 /* This function adds the contents of the buffer as noise into random 
    pool. After adding the noise the pool is stirred. */
 
-void silc_rng_add_noise(SilcRng rng, unsigned char *buffer, uint32 len)
+void silc_rng_add_noise(SilcRng rng, unsigned char *buffer, SilcUInt32 len)
 {
-  uint32 i, pos;
+  SilcUInt32 i, pos;
 
   pos = silc_rng_get_position(rng);
 
@@ -380,7 +380,7 @@ void silc_rng_add_noise(SilcRng rng, unsigned char *buffer, uint32 len)
 
 /* XOR's data into the pool */
 
-static void silc_rng_xor(SilcRng rng, uint32 val, unsigned int pos)
+static void silc_rng_xor(SilcRng rng, SilcUInt32 val, unsigned int pos)
 {
   assert(rng != NULL);
   rng->pool[pos] ^= val + val;
@@ -392,7 +392,7 @@ static void silc_rng_xor(SilcRng rng, uint32 val, unsigned int pos)
 static void silc_rng_stir_pool(SilcRng rng)
 {
   int i;
-  uint32 iv[5];
+  SilcUInt32 iv[5];
 
   /* Get the IV */
   memcpy(iv, &rng->pool[16], sizeof(iv));
@@ -426,10 +426,10 @@ static void silc_rng_stir_pool(SilcRng rng)
 /* Returns next position where data is fetched from the pool or
    put to the pool. */
 
-static uint32 silc_rng_get_position(SilcRng rng)
+static SilcUInt32 silc_rng_get_position(SilcRng rng)
 {
   SilcRngState next;
-  uint32 pos;
+  SilcUInt32 pos;
 
   next = rng->state->next;
 
@@ -449,7 +449,7 @@ static uint32 silc_rng_get_position(SilcRng rng)
 
 /* Returns random byte. */
 
-uint8 silc_rng_get_byte(SilcRng rng)
+SilcUInt8 silc_rng_get_byte(SilcRng rng)
 {
   rng->threshold++;
 
@@ -468,10 +468,10 @@ uint8 silc_rng_get_byte(SilcRng rng)
 
 /* Returns 16 bit random number */
 
-uint16 silc_rng_get_rn16(SilcRng rng)
+SilcUInt16 silc_rng_get_rn16(SilcRng rng)
 {
   unsigned char rn[2];
-  uint16 num;
+  SilcUInt16 num;
 
   rn[0] = silc_rng_get_byte(rng);
   rn[1] = silc_rng_get_byte(rng);
@@ -482,10 +482,10 @@ uint16 silc_rng_get_rn16(SilcRng rng)
 
 /* Returns 32 bit random number */
 
-uint32 silc_rng_get_rn32(SilcRng rng)
+SilcUInt32 silc_rng_get_rn32(SilcRng rng)
 {
   unsigned char rn[4];
-  uint16 num;
+  SilcUInt16 num;
 
   rn[0] = silc_rng_get_byte(rng);
   rn[1] = silc_rng_get_byte(rng);
@@ -498,7 +498,7 @@ uint32 silc_rng_get_rn32(SilcRng rng)
 
 /* Returns random number string. Returned string is in HEX format. */
 
-unsigned char *silc_rng_get_rn_string(SilcRng rng, uint32 len)
+unsigned char *silc_rng_get_rn_string(SilcRng rng, SilcUInt32 len)
 {
   int i;
   unsigned char *string;
@@ -513,7 +513,7 @@ unsigned char *silc_rng_get_rn_string(SilcRng rng, uint32 len)
 
 /* Returns random number binary data. */
 
-unsigned char *silc_rng_get_rn_data(SilcRng rng, uint32 len)
+unsigned char *silc_rng_get_rn_data(SilcRng rng, SilcUInt32 len)
 {
   int i;
   unsigned char *data;
@@ -560,7 +560,7 @@ bool silc_rng_global_uninit(void)
 
 /* These are analogous to the functions above. */
 
-uint8 silc_rng_global_get_byte(void)
+SilcUInt8 silc_rng_global_get_byte(void)
 {
   return global_rng ? silc_rng_get_byte(global_rng) : 0;
 }
@@ -568,7 +568,7 @@ uint8 silc_rng_global_get_byte(void)
 /* Return random byte as fast as possible. Reads from /dev/urandom if
    available. If not then return from normal RNG (not so fast). */
 
-uint8 silc_rng_global_get_byte_fast(void)
+SilcUInt8 silc_rng_global_get_byte_fast(void)
 {
 #ifndef SILC_WIN32
   unsigned char buf[1];
@@ -592,27 +592,27 @@ uint8 silc_rng_global_get_byte_fast(void)
 #endif
 }
 
-uint16 silc_rng_global_get_rn16(void)
+SilcUInt16 silc_rng_global_get_rn16(void)
 {
   return global_rng ? silc_rng_get_rn16(global_rng) : 0;
 }
 
-uint32 silc_rng_global_get_rn32(void)
+SilcUInt32 silc_rng_global_get_rn32(void)
 {
   return global_rng ? silc_rng_get_rn32(global_rng) : 0;
 }
 
-unsigned char *silc_rng_global_get_rn_string(uint32 len)
+unsigned char *silc_rng_global_get_rn_string(SilcUInt32 len)
 {
   return global_rng ? silc_rng_get_rn_string(global_rng, len) : NULL;
 }
 
-unsigned char *silc_rng_global_get_rn_data(uint32 len)
+unsigned char *silc_rng_global_get_rn_data(SilcUInt32 len)
 {
   return global_rng ? silc_rng_get_rn_data(global_rng, len) : NULL;
 }
 
-void silc_rng_global_add_noise(unsigned char *buffer, uint32 len)
+void silc_rng_global_add_noise(unsigned char *buffer, SilcUInt32 len)
 {
   if (global_rng)
     silc_rng_add_noise(global_rng, buffer, len);
index 4e3b3bc4fba594fa3b8d074131246608da2a7cac..a5da3c348ad2f514be44cd6f1f18ef8ed9c05273 100644 (file)
@@ -109,46 +109,46 @@ void silc_rng_init(SilcRng rng);
  *
  * SYNOPSIS
  *
- *    uint8 silc_rng_get_byte(SilcRng rng);
+ *    SilcUInt8 silc_rng_get_byte(SilcRng rng);
  *
  * DESCRIPTION
  *
  *    Returns one 8-bit random byte from the random number generator.
  *
  ***/
-uint8 silc_rng_get_byte(SilcRng rng);
+SilcUInt8 silc_rng_get_byte(SilcRng rng);
 
 /****f* silccrypt/SilcRNGAPI/silc_rng_get_rn16
  *
  * SYNOPSIS
  *
- *    uint16 silc_rng_get_rn16(SilcRng rng);
+ *    SilcUInt16 silc_rng_get_rn16(SilcRng rng);
  *
  * DESCRIPTION
  *
  *    Returns one 16-bit random number from the random number generator.
  *
  ***/
-uint16 silc_rng_get_rn16(SilcRng rng);
+SilcUInt16 silc_rng_get_rn16(SilcRng rng);
 
 /****f* silccrypt/SilcRNGAPI/silc_rng_get_rn32
  *
  * SYNOPSIS
  *
- *    uint32 silc_rng_get_rn32(SilcRng rng);
+ *    SilcUInt32 silc_rng_get_rn32(SilcRng rng);
  *
  * DESCRIPTION
  *
  *    Returns one 32-bit random number from the random number generator.
  *
  ***/
-uint32 silc_rng_get_rn32(SilcRng rng);
+SilcUInt32 silc_rng_get_rn32(SilcRng rng);
 
 /****f* silccrypt/SilcRNGAPI/silc_rng_get_rn_string
  *
  * SYNOPSIS
  *
- *    unsigned char *silc_rng_get_rn_string(SilcRng rng, uint32 len);
+ *    unsigned char *silc_rng_get_rn_string(SilcRng rng, SilcUInt32 len);
  *
  * DESCRIPTION
  *
@@ -156,13 +156,13 @@ uint32 silc_rng_get_rn32(SilcRng rng);
  *    The caller must free returned data buffer.
  *
  ***/
-unsigned char *silc_rng_get_rn_string(SilcRng rng, uint32 len);
+unsigned char *silc_rng_get_rn_string(SilcRng rng, SilcUInt32 len);
 
 /****f* silccrypt/SilcRNGAPI/silc_rng_get_rn_data
  *
  * SYNOPSIS
  *
- *    unsigned char *silc_rng_get_rn_data(SilcRng rng, uint32 len);
+ *    unsigned char *silc_rng_get_rn_data(SilcRng rng, SilcUInt32 len);
  *
  * DESCRIPTION
  *
@@ -170,13 +170,13 @@ unsigned char *silc_rng_get_rn_string(SilcRng rng, uint32 len);
  *    caller must free returned data buffer.
  *
  ***/
-unsigned char *silc_rng_get_rn_data(SilcRng rng, uint32 len);
+unsigned char *silc_rng_get_rn_data(SilcRng rng, SilcUInt32 len);
 
 /****f* silccrypt/SilcRNGAPI/silc_rng_add_noise
  *
  * SYNOPSIS
  *
- *    void silc_rng_add_noise(SilcRng rng, unsigned char *buffer, uint32 len);
+ *    void silc_rng_add_noise(SilcRng rng, unsigned char *buffer, SilcUInt32 len);
  *
  * DESCRIPTION
  *
@@ -185,7 +185,7 @@ unsigned char *silc_rng_get_rn_data(SilcRng rng, uint32 len);
  *    is restirred (reseeded) when this function is called.
  *
  ***/
-void silc_rng_add_noise(SilcRng rng, unsigned char *buffer, uint32 len);
+void silc_rng_add_noise(SilcRng rng, unsigned char *buffer, SilcUInt32 len);
 
 /****f* silccrypt/SilcRNGAPI/silc_rng_global_init
  *
@@ -231,20 +231,20 @@ bool silc_rng_global_uninit(void);
  *
  * SYNOPSIS
  *
- *    uint8 silc_rng_global_get_byte(void);
+ *    SilcUInt8 silc_rng_global_get_byte(void);
  *
  * DESCRIPTION
  *
  *    Returns one 8-bit random byte from the random number generator.
  *
  ***/
-uint8 silc_rng_global_get_byte(void);
+SilcUInt8 silc_rng_global_get_byte(void);
 
 /****f* silccrypt/SilcRNGAPI/silc_rng_global_get_byte_fast
  *
  * SYNOPSIS
  *
- *    uint8 silc_rng_global_get_byte_fast(void);
+ *    SilcUInt8 silc_rng_global_get_byte_fast(void);
  *
  * DESCRIPTION
  *
@@ -259,39 +259,39 @@ uint8 silc_rng_global_get_byte(void);
  *    the byte from SILC RNG and is effectively same as silc_rng_get_byte.
  *
  ***/
-uint8 silc_rng_global_get_byte_fast(void);
+SilcUInt8 silc_rng_global_get_byte_fast(void);
 
 /****f* silccrypt/SilcRNGAPI/silc_rng_global_get_rn16
  *
  * SYNOPSIS
  *
- *    uint16 silc_rng_global_get_rn16(void);
+ *    SilcUInt16 silc_rng_global_get_rn16(void);
  *
  * DESCRIPTION
  *
  *    Returns one 16-bit random number from the random number generator.
  *
  ***/
-uint16 silc_rng_global_get_rn16(void);
+SilcUInt16 silc_rng_global_get_rn16(void);
 
 /****f* silccrypt/SilcRNGAPI/silc_rng_global_get_rn32
  *
  * SYNOPSIS
  *
- *    uint32 silc_rng_global_get_rn32(void);
+ *    SilcUInt32 silc_rng_global_get_rn32(void);
  *
  * DESCRIPTION
  *
  *    Returns one 32-bit random number from the random number generator.
  *
  ***/
-uint32 silc_rng_global_get_rn32(void);
+SilcUInt32 silc_rng_global_get_rn32(void);
 
 /****f* silccrypt/SilcRNGAPI/silc_rng_global_get_rn_string
  *
  * SYNOPSIS
  *
- *    unsigned char *silc_rng_global_get_rn_string(uint32 len);
+ *    unsigned char *silc_rng_global_get_rn_string(SilcUInt32 len);
  *
  * DESCRIPTION
  *
@@ -299,13 +299,13 @@ uint32 silc_rng_global_get_rn32(void);
  *    The caller must free returned data buffer.
  *
  ***/
-unsigned char *silc_rng_global_get_rn_string(uint32 len);
+unsigned char *silc_rng_global_get_rn_string(SilcUInt32 len);
 
 /****f* silccrypt/SilcRNGAPI/silc_rng_global_get_rn_data
  *
  * SYNOPSIS
  *
- *    unsigned char *silc_rng_global_get_rn_data(uint32 len);
+ *    unsigned char *silc_rng_global_get_rn_data(SilcUInt32 len);
  *
  * DESCRIPTION
  *
@@ -313,13 +313,13 @@ unsigned char *silc_rng_global_get_rn_string(uint32 len);
  *    caller must free returned data buffer.
  *
  ***/
-unsigned char *silc_rng_global_get_rn_data(uint32 len);
+unsigned char *silc_rng_global_get_rn_data(SilcUInt32 len);
 
 /****f* silccrypt/SilcRNGAPI/silc_rng_global_add_noise
  *
  * SYNOPSIS
  *
- *    void silc_rng_global_add_noise(unsigned char *buffer, uint32 len);
+ *    void silc_rng_global_add_noise(unsigned char *buffer, SilcUInt32 len);
  *
  * DESCRIPTION
  *
@@ -329,6 +329,6 @@ unsigned char *silc_rng_global_get_rn_data(uint32 len);
  *
  ***/
 
-void silc_rng_global_add_noise(unsigned char *buffer, uint32 len);
+void silc_rng_global_add_noise(unsigned char *buffer, SilcUInt32 len);
 
 #endif
index c4cf7c8629d42b6c879f0cbb7e6bed29a095e163..cf929540a14352922cf751895928f1a3464bb4ba 100644 (file)
@@ -51,7 +51,7 @@ Mean:          378 cycles =    67.8 mbits/sec
 
 SILC_CIPHER_API_SET_KEY(twofish)
 {
-  uint32 k[8];
+  SilcUInt32 k[8];
 
   SILC_GET_WORD_KEY(key, k, keylen);
   twofish_set_key((TwofishContext *)context, k, keylen);
@@ -79,7 +79,7 @@ SILC_CIPHER_API_CONTEXT_LEN(twofish)
 
 SILC_CIPHER_API_ENCRYPT_CBC(twofish)
 {
-  uint32 tiv[4];
+  SilcUInt32 tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
@@ -104,7 +104,7 @@ SILC_CIPHER_API_ENCRYPT_CBC(twofish)
 
 SILC_CIPHER_API_DECRYPT_CBC(twofish)
 {
-  uint32 tmp[4], tmp2[4], tiv[4];
+  SilcUInt32 tmp[4], tmp2[4], tiv[4];
   int i;
 
   SILC_CBC_GET_IV(tiv, iv);
index d4f62c3e023763e72a72191aca33cfcee1d11157..9d62bac4ebc346b5ab4731d99894eb1129f8a6e1 100644 (file)
@@ -46,12 +46,12 @@ void silc_mp_set(SilcMPInt *dst, SilcMPInt *src)
   mpz_set(dst, src);
 }
 
-void silc_mp_set_ui(SilcMPInt *dst, uint32 ui)
+void silc_mp_set_ui(SilcMPInt *dst, SilcUInt32 ui)
 {
   mpz_set_ui(dst, ui);
 }
 
-void silc_mp_set_si(SilcMPInt *dst, int32 si)
+void silc_mp_set_si(SilcMPInt *dst, SilcInt32 si)
 {
   mpz_set_si(dst, si);
 }
@@ -61,9 +61,9 @@ void silc_mp_set_str(SilcMPInt *dst, const char *str, int base)
   mpz_set_str(dst, str, base);
 }
 
-uint32 silc_mp_get_ui(SilcMPInt *mp)
+SilcUInt32 silc_mp_get_ui(SilcMPInt *mp)
 {
-  return (uint32)mpz_get_ui(mp);
+  return (SilcUInt32)mpz_get_ui(mp);
 }
 
 char *silc_mp_get_str(char *str, SilcMPInt *mp, int base)
@@ -76,7 +76,7 @@ void silc_mp_add(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2)
   mpz_add(dst, mp1, mp2);
 }
 
-void silc_mp_add_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui)
+void silc_mp_add_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui)
 {
   mpz_add_ui(dst, mp1, ui);
 }
@@ -86,7 +86,7 @@ void silc_mp_sub(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2)
   mpz_sub(dst, mp1, mp2);
 }
 
-void silc_mp_sub_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui)
+void silc_mp_sub_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui)
 {
   mpz_sub_ui(dst, mp1, ui);
 }
@@ -96,12 +96,12 @@ void silc_mp_mul(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2)
   mpz_mul(dst, mp1, mp2);
 }
 
-void silc_mp_mul_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui)
+void silc_mp_mul_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui)
 {
   mpz_mul_ui(dst, mp1, ui);
 }
 
-void silc_mp_mul_2exp(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp)
+void silc_mp_mul_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp)
 {
   mpz_mul_2exp(dst, mp1, exp);
 }
@@ -116,7 +116,7 @@ void silc_mp_div(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2)
   mpz_div(dst, mp1, mp2);
 }
 
-void silc_mp_div_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui)
+void silc_mp_div_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui)
 {
   mpz_div_ui(dst, mp1, ui);
 }
@@ -132,13 +132,13 @@ void silc_mp_div_qr(SilcMPInt *q, SilcMPInt *r, SilcMPInt *mp1,
     mpz_mod(r, mp1, mp2);
 }
 
-void silc_mp_div_2exp(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp)
+void silc_mp_div_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp)
 {
   mpz_fdiv_q_2exp(dst, mp1, exp);
 }
 
 void silc_mp_div_2exp_qr(SilcMPInt *q, SilcMPInt *r, SilcMPInt *mp1, 
-                        uint32 exp)
+                        SilcUInt32 exp)
 {
   if (q)
     mpz_fdiv_q_2exp(q, mp1, exp);
@@ -151,23 +151,23 @@ void silc_mp_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2)
   mpz_mod(dst, mp1, mp2);
 }
 
-void silc_mp_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui)
+void silc_mp_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui)
 {
   mpz_mod_ui(dst, mp1, ui);
 }
 
-void silc_mp_mod_2exp(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui)
+void silc_mp_mod_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui)
 {
   mpz_mod_2exp(dst, mp1, ui);
 }
 
 void silc_mp_pow(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp)
 {
-  uint32 uiexp = mpz_get_ui(exp);
+  SilcUInt32 uiexp = mpz_get_ui(exp);
   mpz_pow_ui(dst, mp1, uiexp);
 }
 
-void silc_mp_pow_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp)
+void silc_mp_pow_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp)
 {
   mpz_pow_ui(dst, mp1, exp);
 }
@@ -178,7 +178,7 @@ void silc_mp_pow_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp,
   mpz_powm(dst, mp1, exp, mod);
 }
 
-void silc_mp_pow_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp, 
+void silc_mp_pow_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp, 
                        SilcMPInt *mod)
 {
   mpz_powm_ui(dst, mp1, exp, mod);
@@ -200,12 +200,12 @@ int silc_mp_cmp(SilcMPInt *mp1, SilcMPInt *mp2)
   return mpz_cmp(mp1, mp2);
 }
 
-int silc_mp_cmp_si(SilcMPInt *mp1, int32 si)
+int silc_mp_cmp_si(SilcMPInt *mp1, SilcInt32 si)
 {
   return mpz_cmp_si(mp1, si);
 }
 
-int silc_mp_cmp_ui(SilcMPInt *mp1, uint32 ui)
+int silc_mp_cmp_ui(SilcMPInt *mp1, SilcUInt32 ui)
 {
   return mpz_cmp_ui(mp1, ui);
 }
index 513f5591e7c715bc1bc3890435a79e668c2ef013..3a893d7bdb2b6e82d1f5591f967cdf2be6f82afe 100644 (file)
@@ -54,12 +54,12 @@ void silc_mp_set(SilcMPInt *dst, SilcMPInt *src)
   (void)mp_copy(src, dst);
 }
 
-void silc_mp_set_ui(SilcMPInt *dst, uint32 ui)
+void silc_mp_set_ui(SilcMPInt *dst, SilcUInt32 ui)
 {
   mp_set(dst, ui);
 }
 
-void silc_mp_set_si(SilcMPInt *dst, int32 si)
+void silc_mp_set_si(SilcMPInt *dst, SilcInt32 si)
 {
   (void)mp_set_int(dst, si);
 }
@@ -69,9 +69,9 @@ void silc_mp_set_str(SilcMPInt *dst, const char *str, int base)
   (void)mp_read_variable_radix(dst, str, base);
 }
 
-uint32 silc_mp_get_ui(SilcMPInt *mp)
+SilcUInt32 silc_mp_get_ui(SilcMPInt *mp)
 {
-  return (uint32)MP_DIGIT(mp, 0);
+  return (SilcUInt32)MP_DIGIT(mp, 0);
 }
 
 char *silc_mp_get_str(char *str, SilcMPInt *mp, int base)
@@ -86,7 +86,7 @@ void silc_mp_add(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2)
   (void)mp_add(mp1, mp2, dst);
 }
 
-void silc_mp_add_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui)
+void silc_mp_add_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui)
 {
   mp_add_d(mp1, ui, dst);
 }
@@ -96,7 +96,7 @@ void silc_mp_sub(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2)
   (void)mp_sub(mp1, mp2, dst);
 }
 
-void silc_mp_sub_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui)
+void silc_mp_sub_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui)
 {
   (void)mp_sub_d(mp1, (mp_digit)ui, dst);
 }
@@ -106,12 +106,12 @@ void silc_mp_mul(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2)
   (void)mp_mul(mp1, mp2, dst);
 }
 
-void silc_mp_mul_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui)
+void silc_mp_mul_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui)
 {
   (void)mp_mul_d(mp1, (mp_digit)ui, dst);
 }
 
-void silc_mp_mul_2exp(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp)
+void silc_mp_mul_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp)
 {
   SilcMPInt tmp;
   silc_mp_init(&tmp);
@@ -130,7 +130,7 @@ void silc_mp_div(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2)
   (void)mp_div(mp1, mp2, dst, NULL);
 }
 
-void silc_mp_div_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui)
+void silc_mp_div_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui)
 {
   (void)mp_div_d(mp1, (mp_digit)ui, dst, NULL);
 }
@@ -141,7 +141,7 @@ void silc_mp_div_qr(SilcMPInt *q, SilcMPInt *r, SilcMPInt *mp1,
   (void)mp_div(mp1, mp2, q, r);
 }
 
-void silc_mp_div_2exp(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp)
+void silc_mp_div_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp)
 {
   SilcMPInt tmp;
   silc_mp_init(&tmp);
@@ -151,7 +151,7 @@ void silc_mp_div_2exp(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp)
 }
 
 void silc_mp_div_2exp_qr(SilcMPInt *q, SilcMPInt *r, SilcMPInt *mp1, 
-                        uint32 exp)
+                        SilcUInt32 exp)
 {
   if (q) {
     (void)mp_2expt(q, (mp_digit)exp);
@@ -164,14 +164,14 @@ void silc_mp_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2)
   (void)mp_mod(mp1, mp2, dst);
 }
 
-void silc_mp_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui)
+void silc_mp_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui)
 {
   mp_digit uidst;
   (void)mp_mod_d(mp1, (mp_digit)ui, &uidst);
   mp_set(dst, uidst);
 }
 
-void silc_mp_mod_2exp(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui)
+void silc_mp_mod_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui)
 {
   SilcMPInt tmp;
   silc_mp_init(&tmp);
@@ -185,7 +185,7 @@ void silc_mp_pow(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp)
   (void)mp_expt(mp1, exp, dst);
 }
 
-void silc_mp_pow_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp)
+void silc_mp_pow_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp)
 {
   (void)mp_expt_d(mp1, (mp_digit)exp, dst);
 }
@@ -196,7 +196,7 @@ void silc_mp_pow_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp,
   (void)mp_exptmod(mp1, exp, mod, dst);
 }
 
-void silc_mp_pow_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp, 
+void silc_mp_pow_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp, 
                        SilcMPInt *mod)
 {
   (void)mp_exptmod_d(mp1, (mp_digit)exp, mod, dst);
@@ -218,12 +218,12 @@ int silc_mp_cmp(SilcMPInt *mp1, SilcMPInt *mp2)
   return mp_cmp(mp1, mp2);
 }
 
-int silc_mp_cmp_si(SilcMPInt *mp1, int32 si)
+int silc_mp_cmp_si(SilcMPInt *mp1, SilcInt32 si)
 {
   return mp_cmp_int(mp1, (long)si);
 }
 
-int silc_mp_cmp_ui(SilcMPInt *mp1, uint32 ui)
+int silc_mp_cmp_ui(SilcMPInt *mp1, SilcUInt32 ui)
 {
   return mp_cmp_d(mp1, ui);
 }
index 8074f2bc706429416fd087563a8ac187bdfb0d35..29d80f7711e71e007b2ddb8d20dde27fd766cd9d 100644 (file)
    must be free'd by the caller. If `len' is provided the destination
    buffer is allocated that large. If zero then the size is approximated. */
 
-unsigned char *silc_mp_mp2bin(SilcMPInt *val, uint32 len,
-                             uint32 *ret_len)
+unsigned char *silc_mp_mp2bin(SilcMPInt *val, SilcUInt32 len,
+                             SilcUInt32 *ret_len)
 {
   int i;
-  uint32 size;
+  SilcUInt32 size;
   unsigned char *ret;
   SilcMPInt tmp;
 
@@ -56,10 +56,10 @@ unsigned char *silc_mp_mp2bin(SilcMPInt *val, uint32 len,
    returned into `dst' and it's length to the `ret_len'. */
 
 void silc_mp_mp2bin_noalloc(SilcMPInt *val, unsigned char *dst,
-                           uint32 dst_len)
+                           SilcUInt32 dst_len)
 {
   int i;
-  uint32 size = dst_len;
+  SilcUInt32 size = dst_len;
   SilcMPInt tmp;
 
   silc_mp_init(&tmp);
@@ -76,7 +76,7 @@ void silc_mp_mp2bin_noalloc(SilcMPInt *val, unsigned char *dst,
 /* Decodes binary data into MP integer. The integer sent as argument
    must be initialized. */
 
-void silc_mp_bin2mp(unsigned char *data, uint32 len, SilcMPInt *ret)
+void silc_mp_bin2mp(unsigned char *data, SilcUInt32 len, SilcMPInt *ret)
 {
   int i;
 
index 9096d4bc78e6768e8dc2d6ca06e92b3cf484ccad..b5f28791a2f64452343cf773adff3aa6e16501fe 100644 (file)
@@ -35,7 +35,7 @@
  *
  * SYNOPSIS
  *
- *    int silc_math_gen_prime(SilcMPInt *prime, uint32 bits, bool verbose);
+ *    int silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, bool verbose);
  *
  * DESCRIPTION
  *
@@ -48,7 +48,7 @@
  *    about the progress of generation.
  *
  ***/
-bool silc_math_gen_prime(SilcMPInt *prime, uint32 bits, bool verbose);
+bool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, bool verbose);
 
 /****f* silcmath/SilcMathAPI/silc_math_prime_test
  *
index 2fb53dec6ef09b23edb0a5a1a05d5802e65f1e90..c0bb7087bbfc71c8136821b4496ce0d5fd9ea6bc 100644 (file)
@@ -132,7 +132,7 @@ void silc_mp_set(SilcMPInt *dst, SilcMPInt *src);
  *
  * SYNOPSIS
  *
- *    void silc_mp_set_ui(SilcMPInt *dst, uint32 ui);
+ *    void silc_mp_set_ui(SilcMPInt *dst, SilcUInt32 ui);
  *
  * DESCRIPTION
  *
@@ -140,13 +140,13 @@ void silc_mp_set(SilcMPInt *dst, SilcMPInt *src);
  *    initialized.
  *
  ***/
-void silc_mp_set_ui(SilcMPInt *dst, uint32 ui);
+void silc_mp_set_ui(SilcMPInt *dst, SilcUInt32 ui);
 
 /****f* silcmath/SilcMPAPI/silc_mp_set_si
  *
  * SYNOPSIS
  *
- *    void silc_mp_set_si(SilcMPInt *dst, int32 si);
+ *    void silc_mp_set_si(SilcMPInt *dst, SilcInt32 si);
  *
  * DESCRIPTION
  *
@@ -154,7 +154,7 @@ void silc_mp_set_ui(SilcMPInt *dst, uint32 ui);
  *    already be initialized.
  *
  ***/
-void silc_mp_set_si(SilcMPInt *dst, int32 si);
+void silc_mp_set_si(SilcMPInt *dst, SilcInt32 si);
 
 /****f* silcmath/SilcMPAPI/silc_mp_set_str
  *
@@ -174,14 +174,14 @@ void silc_mp_set_str(SilcMPInt *dst, const char *str, int base);
  *
  * SYNOPSIS
  *
- *    uint32 silc_mp_get_ui(SilcMPInt *mp);
+ *    SilcUInt32 silc_mp_get_ui(SilcMPInt *mp);
  *
  * DESCRIPTION
  *
  *    Returns the least significant unsigned word from `mp'.
  *
  ***/
-uint32 silc_mp_get_ui(SilcMPInt *mp);
+SilcUInt32 silc_mp_get_ui(SilcMPInt *mp);
 
 /****f* silcmath/SilcMPAPI/silc_mp_get_str
  *
@@ -215,7 +215,7 @@ void silc_mp_add(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  *
  * SYNOPSIS
  *
- *    void silc_mp_add_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui);
+ *    void silc_mp_add_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
  *
  * DESCRIPTION
  *
@@ -223,7 +223,7 @@ void silc_mp_add(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  *    to `dst'.
  *
  ***/
-void silc_mp_add_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui);
+void silc_mp_add_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
 /****f* silcmath/SilcMPAPI/silc_mp_sub
  *
@@ -242,7 +242,7 @@ void silc_mp_sub(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  *
  * SYNOPSIS
  *
- *    void silc_mp_sub_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui);
+ *    void silc_mp_sub_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
  *
  * DESCRIPTION
  *
@@ -250,7 +250,7 @@ void silc_mp_sub(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  *    to `dst'.
  *
  ***/
-void silc_mp_sub_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui);
+void silc_mp_sub_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
 /****f* silcmath/SilcMPAPI/silc_mp_mul
  *
@@ -269,7 +269,7 @@ void silc_mp_mul(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  *
  * SYNOPSIS
  *
- *    void silc_mp_mul_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui);
+ *    void silc_mp_mul_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
  *
  * DESCRIPTION
  *
@@ -277,13 +277,13 @@ void silc_mp_mul(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  *    to `dst'.
  *
  ***/
-void silc_mp_mul_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui);
+void silc_mp_mul_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
 /****f* silcmath/SilcMPAPI/silc_mp_mul_2exp
  *
  * SYNOPSIS
  *
- *    void silc_mp_mul_2exp(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp);
+ *    void silc_mp_mul_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
  *
  * DESCRIPTION
  *
@@ -291,7 +291,7 @@ void silc_mp_mul_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui);
  *    `dst'. This is equivalent to dst = mp1 * (2 ^ exp).
  *
  ***/
-void silc_mp_mul_2exp(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp);
+void silc_mp_mul_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
 
 /****f* silcmath/SilcMPAPI/silc_mp_sqrt
  *
@@ -324,7 +324,7 @@ void silc_mp_div(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  *
  * SYNOPSIS
  *
- *    void silc_mp_div_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui);
+ *    void silc_mp_div_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
  *
  * DESCRIPTION
  *
@@ -332,7 +332,7 @@ void silc_mp_div(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  *    `dst'. This is equivalent to dst = mp1 / ui;
  *
  ***/
-void silc_mp_div_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui);
+void silc_mp_div_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
 /****f* silcmath/SilcMPAPI/silc_mp_div_qr
  *
@@ -364,14 +364,14 @@ void silc_mp_div_qr(SilcMPInt *q, SilcMPInt *r, SilcMPInt *mp1,
  *    This is equivalent to dst = mp1 / (2 ^ exp).
  *
  ***/
-void silc_mp_div_2exp(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp);
+void silc_mp_div_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
 
 /****f* silcmath/SilcMPAPI/silc_mp_div_2exp_qr
  *
  * SYNOPSIS
  *
  *    void silc_mp_div_2exp_qr(SilcMPInt *q, SilcMPInt *r, SilcMPInt *mp1, 
- *                             uint32 exp);
+ *                             SilcUInt32 exp);
  *
  * DESCRIPTION
  *
@@ -382,7 +382,7 @@ void silc_mp_div_2exp(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp);
  *
  ***/
 void silc_mp_div_2exp_qr(SilcMPInt *q, SilcMPInt *r, SilcMPInt *mp1, 
-                        uint32 exp);
+                        SilcUInt32 exp);
 
 /****f* silcmath/SilcMPAPI/silc_mp_mod
  *
@@ -404,7 +404,7 @@ void silc_mp_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  *
  * SYNOPSIS
  *
- *    void silc_mp_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui);
+ *    void silc_mp_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
  *
  * DESCRIPTION
  *
@@ -413,7 +413,7 @@ void silc_mp_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  *    to dst = mp1 mod ui.
  *
  ***/
-void silc_mp_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui);
+void silc_mp_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
 /****f* silcmath/SilcMPAPI/silc_mp_mod_2exp
  *
@@ -429,7 +429,7 @@ void silc_mp_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui);
  *    function returns the remainder as well.
  *
  ***/
-void silc_mp_mod_2exp(SilcMPInt *dst, SilcMPInt *mp1, uint32 ui);
+void silc_mp_mod_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
 /****f* silcmath/SilcMPAPI/silc_mp_pow
  *
@@ -449,7 +449,7 @@ void silc_mp_pow(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp);
  *
  * SYNOPSIS
  *
- *    void silc_mp_pow_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp);
+ *    void silc_mp_pow_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
  *
  * DESCRIPTION
  *
@@ -457,7 +457,7 @@ void silc_mp_pow(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp);
  *    equivalent to dst = mp1 ^ exp.
  *
  ***/
-void silc_mp_pow_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp);
+void silc_mp_pow_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
 
 /****f* silcmath/SilcMPAPI/silc_mp_pow_mod
  *
@@ -479,7 +479,7 @@ void silc_mp_pow_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp,
  *
  * SYNOPSIS
  *
- *    void silc_mp_pow_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp, 
+ *    void silc_mp_pow_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp, 
  *                            SilcMPInt *mod);
  *
  * DESCRIPTION
@@ -488,7 +488,7 @@ void silc_mp_pow_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp,
  *    This is equivalent to dst = (mp1 ^ exp) mod mod.
  *
  ***/
-void silc_mp_pow_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, uint32 exp, 
+void silc_mp_pow_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp, 
                        SilcMPInt *mod);
 
 /****f* silcmath/SilcMPAPI/silc_mp_modinv
@@ -567,7 +567,7 @@ int silc_mp_cmp(SilcMPInt *mp1, SilcMPInt *mp2);
  *
  * SYNOPSIS
  *
- *    int silc_mp_cmp_si(SilcMPInt *mp1, int32 si);
+ *    int silc_mp_cmp_si(SilcMPInt *mp1, SilcInt32 si);
  *
  * DESCRIPTION
  *
@@ -575,13 +575,13 @@ int silc_mp_cmp(SilcMPInt *mp1, SilcMPInt *mp2);
  *    if `mp1' > `si', `mp1' == `si', or `mp1' < `si', respectively.
  *
  ***/
-int silc_mp_cmp_si(SilcMPInt *mp1, int32 si);
+int silc_mp_cmp_si(SilcMPInt *mp1, SilcInt32 si);
 
 /****f* silcmath/SilcMPAPI/silc_mp_cmp_ui
  *
  * SYNOPSIS
  *
- *    int silc_mp_cmp_ui(SilcMPInt *mp1, uint32 ui);
+ *    int silc_mp_cmp_ui(SilcMPInt *mp1, SilcUInt32 ui);
  *
  * DESCRIPTION
  *
@@ -590,14 +590,14 @@ int silc_mp_cmp_si(SilcMPInt *mp1, int32 si);
  *    respectively.
  *
  ***/
-int silc_mp_cmp_ui(SilcMPInt *mp1, uint32 ui);
+int silc_mp_cmp_ui(SilcMPInt *mp1, SilcUInt32 ui);
 
 /****f* silcmath/SilcMPAPI/silc_mp_mp2bin
  *
  * SYNOPSIS
  *
- *    unsigned char *silc_mp_mp2bin(SilcMPInt *val, uint32 len, 
- *                                  uint32 *ret_len);
+ *    unsigned char *silc_mp_mp2bin(SilcMPInt *val, SilcUInt32 len, 
+ *                                  SilcUInt32 *ret_len);
  *
  * DESCRIPTION
  *
@@ -606,15 +606,15 @@ int silc_mp_cmp_ui(SilcMPInt *mp1, uint32 ui);
  *    buffer is allocated that large. If zero then the size is approximated.
  *
  ***/
-unsigned char *silc_mp_mp2bin(SilcMPInt *val, uint32 len, 
-                             uint32 *ret_len);
+unsigned char *silc_mp_mp2bin(SilcMPInt *val, SilcUInt32 len, 
+                             SilcUInt32 *ret_len);
 
 /****f* silcmath/SilcMPAPI/silc_mp_mp2bin_noalloc
  *
  * SYNOPSIS
  *
  *    void silc_mp_mp2bin_noalloc(SilcMPInt *val, unsigned char *dst,
- *                                uint32 dst_len);
+ *                                SilcUInt32 dst_len);
  *
  * DESCRIPTION
  *
@@ -623,13 +623,13 @@ unsigned char *silc_mp_mp2bin(SilcMPInt *val, uint32 len,
  *
  ***/
 void silc_mp_mp2bin_noalloc(SilcMPInt *val, unsigned char *dst,
-                           uint32 dst_len);
+                           SilcUInt32 dst_len);
 
 /****f* silcmath/SilcMPAPI/silc_mp_bin2mp
  *
  * SYNOPSIS
  *
- *    void silc_mp_bin2mp(unsigned char *data, uint32 len, 
+ *    void silc_mp_bin2mp(unsigned char *data, SilcUInt32 len, 
  *                        SilcMPInt *ret);
  *
  * DESCRIPTION
@@ -638,7 +638,7 @@ void silc_mp_mp2bin_noalloc(SilcMPInt *val, unsigned char *dst,
  *    must be initialized.
  *
  ***/
-void silc_mp_bin2mp(unsigned char *data, uint32 len, SilcMPInt *ret);
+void silc_mp_bin2mp(unsigned char *data, SilcUInt32 len, SilcMPInt *ret);
 
 /****f* silcmath/SilcMPAPI/silc_mp_abs
  *
index 27ed090d0357e76da2c998183549a293f773f8a0..515f2b400fc8a0dc6d5c724f43e2fd9ddd260a25 100644 (file)
@@ -53,7 +53,7 @@
 
 */
 
-static uint32 primetable[] =
+static SilcUInt32 primetable[] =
 {
   2, 3, 5, 7, 11, 13, 17, 19,
   23, 29, 31, 37, 41, 43, 47, 53,
@@ -195,11 +195,11 @@ static uint32 primetable[] =
    If argument verbose is TRUE this will display some status information
    about the progress of generation. */
 
-bool silc_math_gen_prime(SilcMPInt *prime, uint32 bits, bool verbose)
+bool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, bool verbose)
 {
   unsigned char *numbuf = NULL;
-  uint32 i, b, k;
-  uint32 *spmods;
+  SilcUInt32 i, b, k;
+  SilcUInt32 *spmods;
   SilcMPInt r, base, tmp, tmp2, oprime;
 
   silc_mp_init(&r);
@@ -238,7 +238,7 @@ bool silc_math_gen_prime(SilcMPInt *prime, uint32 bits, bool verbose)
 
   /* Init modulo table with the prime candidate and the primes
      in the primetable. */
-  spmods = silc_calloc(1, sizeof(primetable) * sizeof(uint32));
+  spmods = silc_calloc(1, sizeof(primetable) * sizeof(SilcUInt32));
   for (i = 0; primetable[i] != 0; i++) {
     silc_mp_mod_ui(&tmp, prime, primetable[i]);
     spmods[i] = silc_mp_get_ui(&tmp);
index 89cc6fc8bd113f2a6224d3a96d3f83e327494d45..a4b671e46fa36b43b55fa782f9b21d2d06b979b1 100644 (file)
@@ -25,7 +25,7 @@
 /* Request context. Every request will allocate this context and set
    the correct callback function according the `type' field. */
 typedef struct SilcSFTPRequestStruct {
-  uint32 id;
+  SilcUInt32 id;
   SilcSFTPPacket type;
   SilcSFTPStatusCallback status;
   SilcSFTPHandleCallback handle;
@@ -44,7 +44,7 @@ typedef struct {
   void *send_context;
   SilcSFTPVersionCallback version;
   void *version_context;
-  uint32 id;
+  SilcUInt32 id;
   SilcList requests;
   SilcBuffer packet;
 } *SilcSFTPClient;
@@ -52,14 +52,14 @@ typedef struct {
 /* File handle */
 struct SilcSFTPHandleStruct {
   unsigned char *data;
-  uint32 data_len;
+  SilcUInt32 data_len;
 };
 
 /* Creates SilcSFTPHandle and returns pointer to it. The caller must free
    the context. */
 
 static SilcSFTPHandle silc_sftp_handle_create(unsigned char *data,
-                                             uint32 data_len)
+                                             SilcUInt32 data_len)
 {
   SilcSFTPHandle handle;
 
@@ -83,7 +83,7 @@ static void silc_sftp_handle_delete(SilcSFTPHandle handle)
 
 static void silc_sftp_handle_get(SilcSFTPHandle handle, 
                                 const unsigned char **data,
-                                uint32 *data_len)
+                                SilcUInt32 *data_len)
 {
   *data = (const unsigned char *)handle->data;
   *data_len = handle->data_len;
@@ -93,7 +93,7 @@ static void silc_sftp_handle_get(SilcSFTPHandle handle,
 
 static void silc_sftp_send_packet(SilcSFTPClient sftp,
                                  SilcSFTPPacket type, 
-                                 uint32 len, ...)
+                                 SilcUInt32 len, ...)
 {
   SilcBuffer tmp;
   va_list vp;
@@ -118,7 +118,7 @@ static void silc_sftp_send_packet(SilcSFTPClient sftp,
 
 /* Finds request by request ID. */
 
-static SilcSFTPRequest silc_sftp_find_request(SilcSFTPClient sftp, uint32 id)
+static SilcSFTPRequest silc_sftp_find_request(SilcSFTPClient sftp, SilcUInt32 id)
 {
   SilcSFTPRequest req;
 
@@ -156,7 +156,7 @@ static void silc_sftp_call_request(SilcSFTPClient sftp,
     {
       /* Data returned */
       unsigned char *data;
-      uint32 data_len;
+      SilcUInt32 data_len;
 
       if (status != SILC_SFTP_STATUS_OK) {
        if (req->data)
@@ -165,7 +165,7 @@ static void silc_sftp_call_request(SilcSFTPClient sftp,
       }
 
       data = (unsigned char *)va_arg(vp, unsigned char *);
-      data_len = (uint32)va_arg(vp, uint32);
+      data_len = (SilcUInt32)va_arg(vp, SilcUInt32);
 
       if (req->data)
        (*req->data)((SilcSFTP)sftp, status, (const unsigned char *)data, 
@@ -179,7 +179,7 @@ static void silc_sftp_call_request(SilcSFTPClient sftp,
       /* Handle returned */
       SilcSFTPHandle handle;
       unsigned char *hdata;
-      uint32 hdata_len;
+      SilcUInt32 hdata_len;
 
       if (status != SILC_SFTP_STATUS_OK) {
        if (req->handle)
@@ -188,7 +188,7 @@ static void silc_sftp_call_request(SilcSFTPClient sftp,
       }
 
       hdata = (unsigned char *)va_arg(vp, unsigned char *);
-      hdata_len = (uint32)va_arg(vp, uint32);
+      hdata_len = (SilcUInt32)va_arg(vp, SilcUInt32);
       handle = silc_sftp_handle_create(hdata, hdata_len);
 
       if (req->handle)
@@ -263,7 +263,7 @@ static void silc_sftp_call_request(SilcSFTPClient sftp,
     {
       /* Extended reply returned */
       unsigned char *data;
-      uint32 data_len;
+      SilcUInt32 data_len;
 
       if (status != SILC_SFTP_STATUS_OK) {
        if (req->extended)
@@ -272,7 +272,7 @@ static void silc_sftp_call_request(SilcSFTPClient sftp,
       }
 
       data = (unsigned char *)va_arg(vp, unsigned char *);
-      data_len = (uint32)va_arg(vp, uint32);
+      data_len = (SilcUInt32)va_arg(vp, SilcUInt32);
 
       if (req->extended)
        (*req->extended)((SilcSFTP)sftp, status, (const unsigned char *)data, 
@@ -350,10 +350,10 @@ void silc_sftp_client_receive_process(SilcSFTP context,
   SilcSFTPRequest req;
   SilcSFTPPacket type;
   const unsigned char *payload = NULL;
-  uint32 payload_len;
+  SilcUInt32 payload_len;
   int ret;
   SilcBufferStruct buf;
-  uint32 id;
+  SilcUInt32 id;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -389,7 +389,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
 
   case SILC_SFTP_STATUS:
     {
-      uint32 status;
+      SilcUInt32 status;
       char *message = NULL, *language_tag = NULL;
 
       SILC_LOG_DEBUG(("Status packet"));
@@ -432,7 +432,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
   case SILC_SFTP_HANDLE:
     {
       unsigned char *handle = NULL;
-      uint32 handle_len;
+      SilcUInt32 handle_len;
 
       SILC_LOG_DEBUG(("Handle packet"));
 
@@ -458,7 +458,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
   case SILC_SFTP_DATA:
     {
       unsigned char *data = NULL;
-      uint32 data_len = 0;
+      SilcUInt32 data_len = 0;
 
       SILC_LOG_DEBUG(("Data packet"));
 
@@ -482,7 +482,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
 
   case SILC_SFTP_NAME:
     {
-      uint32 count;
+      SilcUInt32 count;
       SilcSFTPName name = NULL;
 
       SILC_LOG_DEBUG(("Name packet"));
@@ -580,7 +580,7 @@ void silc_sftp_open(SilcSFTP sftp,
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
   SilcBuffer attrs_buf;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
 
   SILC_LOG_DEBUG(("Open request"));
 
@@ -613,9 +613,9 @@ void silc_sftp_close(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
   const unsigned char *hdata;
-  uint32 hdata_len;
+  SilcUInt32 hdata_len;
 
   SILC_LOG_DEBUG(("Close request"));
 
@@ -638,16 +638,16 @@ void silc_sftp_close(SilcSFTP sftp,
 
 void silc_sftp_read(SilcSFTP sftp,
                    SilcSFTPHandle handle,
-                   uint64 offset, 
-                   uint32 len,
+                   SilcUInt64 offset, 
+                   SilcUInt32 len,
                    SilcSFTPDataCallback callback,
                    void *context)
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len2 = 0;
+  SilcUInt32 len2 = 0;
   const unsigned char *hdata;
-  uint32 hdata_len;
+  SilcUInt32 hdata_len;
 
   SILC_LOG_DEBUG(("Read request"));
 
@@ -672,17 +672,17 @@ void silc_sftp_read(SilcSFTP sftp,
 
 void silc_sftp_write(SilcSFTP sftp,
                     SilcSFTPHandle handle,
-                    uint64 offset,
+                    SilcUInt64 offset,
                     const unsigned char *data,
-                    uint32 data_len,
+                    SilcUInt32 data_len,
                     SilcSFTPStatusCallback callback,
                     void *context)
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
   const unsigned char *hdata;
-  uint32 hdata_len;
+  SilcUInt32 hdata_len;
 
   SILC_LOG_DEBUG(("Write request"));
 
@@ -713,7 +713,7 @@ void silc_sftp_remove(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
 
   SILC_LOG_DEBUG(("Remove request"));
 
@@ -741,7 +741,7 @@ void silc_sftp_rename(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
 
   SILC_LOG_DEBUG(("Rename request"));
 
@@ -771,7 +771,7 @@ void silc_sftp_mkdir(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
   SilcBuffer attrs_buf;
 
   SILC_LOG_DEBUG(("Mkdir request"));
@@ -804,7 +804,7 @@ void silc_sftp_rmdir(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
 
   SILC_LOG_DEBUG(("Rmdir request"));
 
@@ -831,7 +831,7 @@ void silc_sftp_opendir(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
 
   SILC_LOG_DEBUG(("Opendir request"));
 
@@ -858,9 +858,9 @@ void silc_sftp_readdir(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
   const unsigned char *hdata;
-  uint32 hdata_len;
+  SilcUInt32 hdata_len;
 
   SILC_LOG_DEBUG(("Readdir request"));
 
@@ -888,7 +888,7 @@ void silc_sftp_stat(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
 
   SILC_LOG_DEBUG(("Stat request"));
 
@@ -915,7 +915,7 @@ void silc_sftp_lstat(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
 
   SILC_LOG_DEBUG(("Lstat request"));
 
@@ -942,9 +942,9 @@ void silc_sftp_fstat(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
   const unsigned char *hdata;
-  uint32 hdata_len;
+  SilcUInt32 hdata_len;
 
   SILC_LOG_DEBUG(("Fstat request"));
 
@@ -973,7 +973,7 @@ void silc_sftp_setstat(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
   SilcBuffer attrs_buf;
 
   SILC_LOG_DEBUG(("Setstat request"));
@@ -1007,10 +1007,10 @@ void silc_sftp_fsetstat(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
   SilcBuffer attrs_buf;
   const unsigned char *hdata;
-  uint32 hdata_len;
+  SilcUInt32 hdata_len;
 
   SILC_LOG_DEBUG(("Fsetstat request"));
 
@@ -1043,7 +1043,7 @@ void silc_sftp_readlink(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
 
   SILC_LOG_DEBUG(("Readlink request"));
 
@@ -1071,7 +1071,7 @@ void silc_sftp_symlink(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
 
   SILC_LOG_DEBUG(("Symlink request"));
 
@@ -1100,7 +1100,7 @@ void silc_sftp_realpath(SilcSFTP sftp,
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
 
   SILC_LOG_DEBUG(("Realpath request"));
 
@@ -1123,13 +1123,13 @@ void silc_sftp_realpath(SilcSFTP sftp,
 void silc_sftp_extended(SilcSFTP sftp,
                        const char *request,
                        const unsigned char *data,
-                       uint32 data_len,
+                       SilcUInt32 data_len,
                        SilcSFTPExtendedCallback callback,
                        void *context)
 {
   SilcSFTPClient client = (SilcSFTPClient)sftp;
   SilcSFTPRequest req;
-  uint32 len = 0;
+  SilcUInt32 len = 0;
 
   SILC_LOG_DEBUG(("Extended request"));
 
index 33d2fcb88f09361b939b82fde6d212d605e2ec61..b60cce73cb6c9c80f6871cea83904480d3b2770a 100644 (file)
@@ -35,7 +35,7 @@ typedef struct MemFSEntryStruct {
   bool directory;                  /* TRUE if this is directory */
   SilcSFTPFSMemoryPerm perm;       /* Permissions */
   struct MemFSEntryStruct **entry;  /* Files and sub-directories */
-  uint32 entry_count;              /* Number of files and sub-directories */
+  SilcUInt32 entry_count;                  /* Number of files and sub-directories */
   struct MemFSEntryStruct *parent;  /* non-NULL if `directory' is TRUE,
                                       includes parent directory. */
   unsigned long created;           /* Time of creation */
@@ -43,7 +43,7 @@ typedef struct MemFSEntryStruct {
 
 /* File handle. */
 typedef struct {
-  uint32 handle;                   /* Handle index */
+  SilcUInt32 handle;               /* Handle index */
   int fd;                          /* Real file handle */
   MemFSEntry entry;                /* Filesystem entry */
 } *MemFSFileHandle;
@@ -53,7 +53,7 @@ typedef struct {
   MemFSEntry root;                 /* Root of the filesystem hierarchy */
   SilcSFTPFSMemoryPerm root_perm;
   MemFSFileHandle *handles;        /* Open file handles */
-  uint32 handles_count;
+  SilcUInt32 handles_count;
 } *MemFS;
 
 /* Generates absolute path from relative path that may include '.' and '..'
@@ -151,7 +151,7 @@ static bool mem_del_entry(MemFSEntry entry, bool check_perm)
    This does not check subdirectories recursively. */
 
 static MemFSEntry mem_find_entry(MemFSEntry dir, const char *name,
-                                uint32 name_len)
+                                SilcUInt32 name_len)
 {
   int i;
 
@@ -205,7 +205,7 @@ static MemFSEntry mem_find_entry_path(MemFSEntry dir, const char *p)
    not check subdirectories recursively. */
 
 static bool mem_del_entry_name(MemFSEntry dir, const char *name,
-                              uint32 name_len, bool check_perm)
+                              SilcUInt32 name_len, bool check_perm)
 {
   MemFSEntry entry;
 
@@ -287,7 +287,7 @@ static bool mem_del_handle(MemFS fs, MemFSFileHandle handle)
 
 /* Find handle by handle index. */
 
-static MemFSFileHandle mem_find_handle(MemFS fs, uint32 handle)
+static MemFSFileHandle mem_find_handle(MemFS fs, SilcUInt32 handle)
 {
   if (handle > fs->handles_count)
     return NULL;
@@ -432,10 +432,10 @@ bool silc_sftp_fs_memory_del_file(SilcSFTPFilesystem fs, void *dir,
 
 SilcSFTPHandle mem_get_handle(void *context, SilcSFTP sftp,
                              const unsigned char *data,
-                             uint32 data_len)
+                             SilcUInt32 data_len)
 {
   MemFS fs = (MemFS)context;
-  uint32 handle;
+  SilcUInt32 handle;
 
   if (data_len < 4)
     return NULL;
@@ -446,7 +446,7 @@ SilcSFTPHandle mem_get_handle(void *context, SilcSFTP sftp,
 
 unsigned char *mem_encode_handle(void *context, SilcSFTP sftp,
                                 SilcSFTPHandle handle,
-                                uint32 *handle_len)
+                                SilcUInt32 *handle_len)
 {
   unsigned char *data;
   MemFSFileHandle h = (MemFSFileHandle)handle;
@@ -552,8 +552,8 @@ void mem_close(void *context, SilcSFTP sftp,
 
 void mem_read(void *context, SilcSFTP sftp,
              SilcSFTPHandle handle,
-             uint64 offset, 
-             uint32 len,
+             SilcUInt64 offset, 
+             SilcUInt32 len,
              SilcSFTPDataCallback callback,
              void *callback_context)
 {
@@ -587,9 +587,9 @@ void mem_read(void *context, SilcSFTP sftp,
 
 void mem_write(void *context, SilcSFTP sftp,
               SilcSFTPHandle handle,
-              uint64 offset,
+              SilcUInt64 offset,
               const unsigned char *data,
-              uint32 data_len,
+              SilcUInt32 data_len,
               SilcSFTPStatusCallback callback,
               void *callback_context)
 {
@@ -699,7 +699,7 @@ void mem_readdir(void *context, SilcSFTP sftp,
   SilcSFTPAttributes attrs;
   int i;
   char long_name[256];
-  uint64 filesize = 0;
+  SilcUInt64 filesize = 0;
   char *date;
   struct stat stats;
 
@@ -1005,7 +1005,7 @@ void mem_realpath(void *context, SilcSFTP sftp,
 void mem_extended(void *context, SilcSFTP sftp,
                  const char *request,
                  const unsigned char *data,
-                 uint32 data_len,
+                 SilcUInt32 data_len,
                  SilcSFTPExtendedCallback callback,
                  void *callback_context)
 {
index 09f636cbb320e61d2c616dd1459ffa996db51faf..f3bda1d64642d4dcdf1f100be04b07b6272efc4e 100644 (file)
@@ -39,7 +39,7 @@ typedef struct {
 
 static void silc_sftp_send_packet(SilcSFTPServer sftp,
                                  SilcSFTPPacket type, 
-                                 uint32 len, ...)
+                                 SilcUInt32 len, ...)
 {
   SilcBuffer tmp;
   va_list vp;
@@ -66,7 +66,7 @@ static void silc_sftp_send_packet(SilcSFTPServer sftp,
 
 static void silc_sftp_send_error(SilcSFTPServer sftp,
                                 SilcSFTPStatus status,
-                                uint32 id)
+                                SilcUInt32 id)
 {
   SILC_LOG_DEBUG(("Send error %d", status));
 
@@ -87,7 +87,7 @@ static void silc_sftp_server_status(SilcSFTP sftp,
                                    void *context)
 {
   SilcSFTPServer server = (SilcSFTPServer)sftp;
-  uint32 id = (uint32)context;
+  SilcUInt32 id = (SilcUInt32)context;
   int mlen, llen;
 
   SILC_LOG_DEBUG(("Status callback"));
@@ -118,9 +118,9 @@ static void silc_sftp_server_handle(SilcSFTP sftp,
                                    void *context)
 {
   SilcSFTPServer server = (SilcSFTPServer)sftp;
-  uint32 id = (uint32)context;
+  SilcUInt32 id = (SilcUInt32)context;
   unsigned char *hdata;
-  uint32 hdata_len;
+  SilcUInt32 hdata_len;
 
   SILC_LOG_DEBUG(("Handle callback"));
   SILC_LOG_DEBUG(("Request ID: %d", id));
@@ -149,11 +149,11 @@ static void silc_sftp_server_handle(SilcSFTP sftp,
 static void silc_sftp_server_data(SilcSFTP sftp,
                                  SilcSFTPStatus status,
                                  const unsigned char *data,
-                                 uint32 data_len,
+                                 SilcUInt32 data_len,
                                  void *context)
 {
   SilcSFTPServer server = (SilcSFTPServer)sftp;
-  uint32 id = (uint32)context;
+  SilcUInt32 id = (SilcUInt32)context;
 
   SILC_LOG_DEBUG(("Data callback"));
   SILC_LOG_DEBUG(("Request ID: %d", id));
@@ -178,7 +178,7 @@ static void silc_sftp_server_name(SilcSFTP sftp,
                                  void *context)
 {
   SilcSFTPServer server = (SilcSFTPServer)sftp;
-  uint32 id = (uint32)context;
+  SilcUInt32 id = (SilcUInt32)context;
   SilcBuffer namebuf;
 
   SILC_LOG_DEBUG(("Name callback"));
@@ -209,7 +209,7 @@ static void silc_sftp_server_attr(SilcSFTP sftp,
                                  void *context)
 {
   SilcSFTPServer server = (SilcSFTPServer)sftp;
-  uint32 id = (uint32)context;
+  SilcUInt32 id = (SilcUInt32)context;
   SilcBuffer attr_buf;
 
   SILC_LOG_DEBUG(("Attr callback"));
@@ -235,11 +235,11 @@ static void silc_sftp_server_attr(SilcSFTP sftp,
 static void silc_sftp_server_extended(SilcSFTP sftp,
                                      SilcSFTPStatus status,
                                      const unsigned char *data,
-                                     uint32 data_len,
+                                     SilcUInt32 data_len,
                                      void *context)
 {
   SilcSFTPServer server = (SilcSFTPServer)sftp;
-  uint32 id = (uint32)context;
+  SilcUInt32 id = (SilcUInt32)context;
 
   SILC_LOG_DEBUG(("Extended callback"));
   SILC_LOG_DEBUG(("Request ID: %d", id));
@@ -319,10 +319,10 @@ void silc_sftp_server_receive_process(SilcSFTP sftp,
   SilcSFTPPacket type;
   char *filename = NULL, *path = NULL;
   const unsigned char *payload = NULL;
-  uint32 payload_len;
+  SilcUInt32 payload_len;
   int ret;
   SilcBufferStruct buf;
-  uint32 id;
+  SilcUInt32 id;
   SilcSFTPAttributes attrs;
   SilcSFTPHandle handle;
   SilcSFTPMonitorDataStruct mdata;
@@ -369,7 +369,7 @@ void silc_sftp_server_receive_process(SilcSFTP sftp,
     {
       SilcSFTPFileOperation pflags;
       unsigned char *attr_buf;
-      uint32 attr_len = 0;
+      SilcUInt32 attr_len = 0;
       SilcBufferStruct tmpbuf;
 
       SILC_LOG_DEBUG(("Open request"));
@@ -411,7 +411,7 @@ void silc_sftp_server_receive_process(SilcSFTP sftp,
   case SILC_SFTP_CLOSE:
     {
       unsigned char *hdata;
-      uint32 hdata_len;
+      SilcUInt32 hdata_len;
 
       SILC_LOG_DEBUG(("Close request"));
 
@@ -447,9 +447,9 @@ void silc_sftp_server_receive_process(SilcSFTP sftp,
   case SILC_SFTP_READ:
     {
       unsigned char *hdata;
-      uint32 hdata_len;
-      uint64 offset;
-      uint32 len;
+      SilcUInt32 hdata_len;
+      SilcUInt64 offset;
+      SilcUInt32 len;
 
       SILC_LOG_DEBUG(("Read request"));
 
@@ -490,10 +490,10 @@ void silc_sftp_server_receive_process(SilcSFTP sftp,
   case SILC_SFTP_WRITE:
     {
       unsigned char *hdata;
-      uint32 hdata_len;
-      uint64 offset;
+      SilcUInt32 hdata_len;
+      SilcUInt64 offset;
       unsigned char *data;
-      uint32 data_len;
+      SilcUInt32 data_len;
 
       SILC_LOG_DEBUG(("Read request"));
 
@@ -593,7 +593,7 @@ void silc_sftp_server_receive_process(SilcSFTP sftp,
   case SILC_SFTP_MKDIR:
     {
       unsigned char *attr_buf;
-      uint32 attr_len = 0;
+      SilcUInt32 attr_len = 0;
       SilcBufferStruct tmpbuf;
 
       SILC_LOG_DEBUG(("Mkdir request"));
@@ -685,7 +685,7 @@ void silc_sftp_server_receive_process(SilcSFTP sftp,
   case SILC_SFTP_READDIR:
     {
       unsigned char *hdata;
-      uint32 hdata_len;
+      SilcUInt32 hdata_len;
 
       SILC_LOG_DEBUG(("Readdir request"));
 
@@ -773,7 +773,7 @@ void silc_sftp_server_receive_process(SilcSFTP sftp,
   case SILC_SFTP_FSTAT:
     {
       unsigned char *hdata;
-      uint32 hdata_len;
+      SilcUInt32 hdata_len;
 
       SILC_LOG_DEBUG(("Fstat request"));
 
@@ -809,7 +809,7 @@ void silc_sftp_server_receive_process(SilcSFTP sftp,
   case SILC_SFTP_SETSTAT:
     {
       unsigned char *attr_buf;
-      uint32 attr_len = 0;
+      SilcUInt32 attr_len = 0;
       SilcBufferStruct tmpbuf;
 
       SILC_LOG_DEBUG(("Setstat request"));
@@ -849,7 +849,7 @@ void silc_sftp_server_receive_process(SilcSFTP sftp,
   case SILC_SFTP_FSETSTAT:
     {
       unsigned char *hdata, *attr_buf;
-      uint32 hdata_len, attr_len = 0;
+      SilcUInt32 hdata_len, attr_len = 0;
       SilcBufferStruct tmpbuf;
 
       SILC_LOG_DEBUG(("Fsetstat request"));
@@ -982,7 +982,7 @@ void silc_sftp_server_receive_process(SilcSFTP sftp,
     {
       char *request = NULL;
       unsigned char *data;
-      uint32 data_len;
+      SilcUInt32 data_len;
 
       SILC_LOG_DEBUG(("Extended request"));
 
index 5e3c526e01a94f2a1e7af57d22d83f155c766520..574f884173f15710f321f24b1e363f6e18ac57bf 100644 (file)
@@ -30,7 +30,7 @@
    fit to `packet_buf' will be reallocated. */
 
 SilcBuffer silc_sftp_packet_encode(SilcSFTPPacket packet, 
-                                  SilcBuffer packet_buf, uint32 len, ...)
+                                  SilcBuffer packet_buf, SilcUInt32 len, ...)
 {
   SilcBuffer buffer;
   va_list vp;
@@ -46,7 +46,7 @@ SilcBuffer silc_sftp_packet_encode(SilcSFTPPacket packet,
    pointer as argument. */
 
 SilcBuffer silc_sftp_packet_encode_vp(SilcSFTPPacket packet, 
-                                     SilcBuffer packet_buf, uint32 len, 
+                                     SilcBuffer packet_buf, SilcUInt32 len, 
                                      va_list vp)
 {
   SilcBuffer buffer;
@@ -89,10 +89,10 @@ SilcBuffer silc_sftp_packet_encode_vp(SilcSFTPPacket packet,
 
 SilcSFTPPacket silc_sftp_packet_decode(SilcBuffer packet,
                                       unsigned char **payload,
-                                      uint32 *payload_len)
+                                      SilcUInt32 *payload_len)
 {
-  uint32 len;
-  uint8 type;
+  SilcUInt32 len;
+  SilcUInt8 type;
   int ret;
 
   ret = silc_buffer_unformat(packet,
@@ -280,7 +280,7 @@ SilcSFTPAttributes silc_sftp_attr_decode(SilcBuffer buffer)
                                      sizeof(*attr->extended_data));
     for (i = 0; i < attr->extended_count; i++) {
       unsigned char *tmp, *tmp2;
-      uint32 tmp_len, tmp2_len;
+      SilcUInt32 tmp_len, tmp2_len;
 
       if (silc_buffer_unformat(buffer, 
                               SILC_STR_UI32_NSTRING(&tmp, &tmp_len),
@@ -387,7 +387,7 @@ SilcBuffer silc_sftp_name_encode(SilcSFTPName name)
    `count' many name, longname and attribute values. Returns the allocated
    structure or NULL on error. */
 
-SilcSFTPName silc_sftp_name_decode(uint32 count, SilcBuffer buffer)
+SilcSFTPName silc_sftp_name_decode(SilcUInt32 count, SilcBuffer buffer)
 {
   SilcSFTPName name;
   int i;
index f8e9c3054d81c719098689202d70e649298b6a44..fef68ce4720419e5897a232bf9ac31cc4cfc6ccd 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef SFTP_UTIL_H
 #define SFTP_UTIL_H
 
-typedef uint32 SilcSFTPPacket;
+typedef SilcUInt32 SilcSFTPPacket;
 
 /* SFTP packet types */
 #define SILC_SFTP_INIT               1
@@ -65,12 +65,12 @@ typedef uint32 SilcSFTPPacket;
    to that buffer instead of allocating new one.  If the new data cannot
    fit to `packet_buf' will be reallocated. */
 SilcBuffer silc_sftp_packet_encode(SilcSFTPPacket packet, 
-                                  SilcBuffer packet_buf, uint32 len, ...);
+                                  SilcBuffer packet_buf, SilcUInt32 len, ...);
 
 /* Same as silc_sftp_packet_encode but takes the variable argument list
    pointer as argument. */
 SilcBuffer silc_sftp_packet_encode_vp(SilcSFTPPacket packet, 
-                                     SilcBuffer packet_buf, uint32 len, 
+                                     SilcBuffer packet_buf, SilcUInt32 len, 
                                      va_list vp);
 
 /* Decodes the SFTP packet data `data' and return the SFTP packet type.
@@ -78,7 +78,7 @@ SilcBuffer silc_sftp_packet_encode_vp(SilcSFTPPacket packet,
    NULL if error occurred during decoding. */
 SilcSFTPPacket silc_sftp_packet_decode(SilcBuffer packet,
                                       unsigned char **payload,
-                                      uint32 *payload_len);
+                                      SilcUInt32 *payload_len);
 
 /* Encodes the SFTP attributes to a buffer and returns the allocated buffer.
    The caller must free the buffer. */
@@ -102,7 +102,7 @@ SilcBuffer silc_sftp_name_encode(SilcSFTPName name);
 /* Decodes a SilcSFTPName structure from the `buffer' that must include
    `count' many name, longname and attribute values. Returns the allocated
    structure or NULL on error. */
-SilcSFTPName silc_sftp_name_decode(uint32 count, SilcBuffer buffer);
+SilcSFTPName silc_sftp_name_decode(SilcUInt32 count, SilcBuffer buffer);
 
 /* Frees the name context and its internals. */
 void silc_sftp_name_free(SilcSFTPName name);
index c817b8fe1f6a48e667bb3f1513e2210f5689e32f..1e438d9bbe6be89d4fd8e49e8b2323d2c9ef423e 100644 (file)
@@ -57,7 +57,7 @@ typedef struct SilcSFTPStruct *SilcSFTP;
  *
  * NAME
  * 
- *    typedef uint32 SilcSFTPVersion;
+ *    typedef SilcUInt32 SilcSFTPVersion;
  *
  * DESCRIPTION
  *
@@ -65,7 +65,7 @@ typedef struct SilcSFTPStruct *SilcSFTP;
  *
  * SOURCE
  */
-typedef uint32 SilcSFTPVersion;
+typedef SilcUInt32 SilcSFTPVersion;
 /***/
 
 /* SFTP protocol version */
@@ -136,15 +136,15 @@ typedef enum {
  *
  ***/
 typedef struct {
-  uint32 flags;                        /* Flags to indicate present attributes */
-  uint64 size;                 /* Sife of the file in bytes */
-  uint32 uid;                  /* Unix user ID */
-  uint32 gid;                  /* Unix group ID */
-  uint32 permissions;          /* POSIX file permission bitmask */
-  uint32 atime;                        /* Access time of file */
-  uint32 mtime;                        /* Modification time of file */
-
-  uint32 extended_count;       /* Extended type and data count */
+  SilcUInt32 flags;                    /* Flags to indicate present attributes */
+  SilcUInt64 size;                     /* Sife of the file in bytes */
+  SilcUInt32 uid;                      /* Unix user ID */
+  SilcUInt32 gid;                      /* Unix group ID */
+  SilcUInt32 permissions;              /* POSIX file permission bitmask */
+  SilcUInt32 atime;                    /* Access time of file */
+  SilcUInt32 mtime;                    /* Modification time of file */
+
+  SilcUInt32 extended_count;   /* Extended type and data count */
   SilcBuffer *extended_type;
   SilcBuffer *extended_data;
 } *SilcSFTPAttributes, SilcSFTPAttributesStruct;
@@ -167,7 +167,7 @@ typedef struct  {
   char **filename;
   char **long_filename;
   SilcSFTPAttributes *attrs;
-  uint32 count;                        /* Number of files */
+  SilcUInt32 count;                    /* Number of files */
 } *SilcSFTPName, SilcSFTPNameStruct;
 
 /****s* silcsftp/SilcSFTPAPI/SilcSFTPHandle
@@ -280,7 +280,7 @@ typedef void (*SilcSFTPHandleCallback)(SilcSFTP sftp,
  *    typedef void (*SilcSFTPDataCallback)(SilcSFTP sftp,
  *                                         SilcSFTPStatus status,
  *                                         const unsigned char *data,
- *                                         uint32 data_len,
+ *                                         SilcUInt32 data_len,
  *                                         void *context);
  *
  * DESCRIPTION
@@ -293,7 +293,7 @@ typedef void (*SilcSFTPHandleCallback)(SilcSFTP sftp,
 typedef void (*SilcSFTPDataCallback)(SilcSFTP sftp,
                                     SilcSFTPStatus status,
                                     const unsigned char *data,
-                                    uint32 data_len,
+                                    SilcUInt32 data_len,
                                     void *context);
 
 /****f* silcsftp/SilcSFTPAPI/SilcSFTPNameCallback
@@ -346,7 +346,7 @@ typedef void (*SilcSFTPAttrCallback)(SilcSFTP sftp,
  *    typedef void (*SilcSFTPExtendedCallback)(SilcSFTP sftp,
  *                                             SilcSFTPStatus status,
  *                                             const unsigned char *data,
- *                                             uint32 data_len,
+ *                                             SilcUInt32 data_len,
  *                                             void *context);
  *
  * DESCRIPTION
@@ -359,7 +359,7 @@ typedef void (*SilcSFTPAttrCallback)(SilcSFTP sftp,
 typedef void (*SilcSFTPExtendedCallback)(SilcSFTP sftp,
                                         SilcSFTPStatus status,
                                         const unsigned char *data,
-                                        uint32 data_len,
+                                        SilcUInt32 data_len,
                                         void *context);
 
 
@@ -464,8 +464,8 @@ void silc_sftp_close(SilcSFTP sftp,
  *
  *    void silc_sftp_read(SilcSFTP sftp,
  *                        SilcSFTPHandle handle,
- *                        uint64 offset, 
- *                        uint32 len,
+ *                        SilcUInt64 offset, 
+ *                        SilcUInt32 len,
  *                        SilcSFTPDataCallback callback,
  *                        void *context);
  *
@@ -478,8 +478,8 @@ void silc_sftp_close(SilcSFTP sftp,
  ***/
 void silc_sftp_read(SilcSFTP sftp,
                    SilcSFTPHandle handle,
-                   uint64 offset, 
-                   uint32 len,
+                   SilcUInt64 offset, 
+                   SilcUInt32 len,
                    SilcSFTPDataCallback callback,
                    void *context);
 
@@ -489,9 +489,9 @@ void silc_sftp_read(SilcSFTP sftp,
  *
  *    void silc_sftp_write(SilcSFTP sftp,
  *                         SilcSFTPHandle handle,
- *                         uint64 offset,
+ *                         SilcUInt64 offset,
  *                         const unsigned char *data,
- *                         uint32 data_len,
+ *                         SilcUInt32 data_len,
  *                         SilcSFTPStatusCallback callback,
  *                         void *context);
  *
@@ -504,9 +504,9 @@ void silc_sftp_read(SilcSFTP sftp,
  ***/
 void silc_sftp_write(SilcSFTP sftp,
                     SilcSFTPHandle handle,
-                    uint64 offset,
+                    SilcUInt64 offset,
                     const unsigned char *data,
-                    uint32 data_len,
+                    SilcUInt32 data_len,
                     SilcSFTPStatusCallback callback,
                     void *context);
 
@@ -813,7 +813,7 @@ void silc_sftp_realpath(SilcSFTP sftp,
  *    void silc_sftp_extended(SilcSFTP sftp,
  *                            const char *request,
  *                            const unsigned char *data,
- *                            uint32 data_len,
+ *                            SilcUInt32 data_len,
  *                            SilcSFTPExtendedCallback callback,
  *                            void *context);
  *
@@ -827,7 +827,7 @@ void silc_sftp_realpath(SilcSFTP sftp,
 void silc_sftp_extended(SilcSFTP sftp,
                        const char *request,
                        const unsigned char *data,
-                       uint32 data_len,
+                       SilcUInt32 data_len,
                        SilcSFTPExtendedCallback callback,
                        void *context);
 
@@ -932,8 +932,8 @@ typedef struct {
                                   _SETSTAT, _READLINK, _SYMLINK, _REALPATH */
   char *name2;                 /* _RENAME, _SYMLINK */
   SilcSFTPFileOperation pflags;        /* _OPEN */
-  uint64 offset;               /* _READ, _WRITE */
-  uint32 data_len;             /* _READ, _WRITE */
+  SilcUInt64 offset;           /* _READ, _WRITE */
+  SilcUInt32 data_len;         /* _READ, _WRITE */
   SilcSFTPName names;          /* _READDIR, _READLINK, _REALPATH */
 } *SilcSFTPMonitorData, SilcSFTPMonitorDataStruct;
 /***/
index 6144dc0d9e3d8120aba1e3e5bd263bcdd03f0819..ea719282ae2c0a4f27e7f1e53b98d8886989a4b1 100644 (file)
@@ -95,13 +95,13 @@ typedef struct SilcSFTPFilesystemOpsStruct {
      If the handle is not found this returns NULL. */
   SilcSFTPHandle (*sftp_get_handle)(void *context, SilcSFTP sftp,
                                    const unsigned char *data,
-                                   uint32 data_len);
+                                   SilcUInt32 data_len);
 
   /* Return encoded handle of `handle' or NULL on error. The caller
      must free the returned buffer. */
   unsigned char *(*sftp_encode_handle)(void *context, SilcSFTP sftp,
                                       SilcSFTPHandle handle,
-                                      uint32 *handle_len);
+                                      SilcUInt32 *handle_len);
 
   /* Open a file indicated by the `filename' with flags indicated by the
      `pflags', and with attributes indicated by the `attr'.  Calls the
@@ -125,8 +125,8 @@ typedef struct SilcSFTPFilesystemOpsStruct {
      called to return the read data. */
   void (*sftp_read)(void *context, SilcSFTP sftp,
                    SilcSFTPHandle handle, 
-                   uint64 offset, 
-                   uint32 len,
+                   SilcUInt64 offset, 
+                   SilcUInt32 len,
                    SilcSFTPDataCallback callback,
                    void *callback_context);
 
@@ -135,9 +135,9 @@ typedef struct SilcSFTPFilesystemOpsStruct {
      is called to indicate the status of the writing. */
   void (*sftp_write)(void *context, SilcSFTP sftp,
                     SilcSFTPHandle handle,
-                    uint64 offset,
+                    SilcUInt64 offset,
                     const unsigned char *data,
-                    uint32 data_len,
+                    SilcUInt32 data_len,
                     SilcSFTPStatusCallback callback,
                     void *callback_context);
 
@@ -256,7 +256,7 @@ typedef struct SilcSFTPFilesystemOpsStruct {
   void (*sftp_extended)(void *context, SilcSFTP sftp,
                        const char *request,
                        const unsigned char *data,
-                       uint32 data_len,
+                       SilcUInt32 data_len,
                        SilcSFTPExtendedCallback callback,
                        void *callback_context);
 } *SilcSFTPFilesystemOps;
index 9b2e796d28c66b74d1cacbf90aac21c4750b1fce..0d6215cd1bbbf6c16556d3ca4a11b690e12fc2f2 100644 (file)
@@ -31,14 +31,14 @@ Client gclient;
 char *dir;
 char *file;
 bool opendir;
-uint64 offset;
+SilcUInt64 offset;
 
 static void sftp_name(SilcSFTP sftp, SilcSFTPStatus status,
                      const SilcSFTPName name, void *context);
 static void sftp_handle(SilcSFTP sftp, SilcSFTPStatus status,
                        SilcSFTPHandle handle, void *context);
 static void sftp_data(SilcSFTP sftp, SilcSFTPStatus status,
-                     const unsigned char *data, uint32 data_len,
+                     const unsigned char *data, SilcUInt32 data_len,
                      void *context);
 
 static void send_packet(SilcSocketConnection sock,
@@ -120,7 +120,7 @@ SILC_TASK_CALLBACK(packet_process)
 }
 
 static void sftp_data(SilcSFTP sftp, SilcSFTPStatus status,
-                     const unsigned char *data, uint32 data_len,
+                     const unsigned char *data, SilcUInt32 data_len,
                      void *context)
 {
   SilcSFTPHandle handle = (SilcSFTPHandle)context;
index c2b64be0536a87a3c3f5b1641b8a18290976748d..9bf2aa862e9346096871103aa27c50fa43c6941d 100644 (file)
@@ -179,7 +179,7 @@ SilcSKEStatus silc_ske_payload_ke_encode(SilcSKE ske,
 {
   SilcBuffer buf;
   unsigned char *x_str;
-  uint32 x_len;
+  SilcUInt32 x_len;
   int ret;
 
   SILC_LOG_DEBUG(("Encoding KE Payload"));
@@ -243,8 +243,8 @@ SilcSKEStatus silc_ske_payload_ke_decode(SilcSKE ske,
   SilcSKEStatus status = SILC_SKE_STATUS_ERROR;
   SilcSKEKEPayload *payload;
   unsigned char *x = NULL;
-  uint16 x_len;
-  uint32 tot_len = 0, len2;
+  SilcUInt16 x_len;
+  SilcUInt32 tot_len = 0, len2;
   int ret;
 
   SILC_LOG_DEBUG(("Decoding Key Exchange Payload"));
index cf26d0ee136b1034661f793f260474f87b27381f..1eb290032f5114e789a97cc47d85dfc98f63949f 100644 (file)
 
 /* Static functions */
 static SilcSKEStatus silc_ske_create_rnd(SilcSKE ske, SilcMPInt *n, 
-                                        uint32 len, 
+                                        SilcUInt32 len, 
                                         SilcMPInt *rnd);
 static SilcSKEStatus silc_ske_make_hash(SilcSKE ske, 
                                        unsigned char *return_hash,
-                                       uint32 *return_hash_len,
+                                       SilcUInt32 *return_hash_len,
                                        int initiator);
 
 /* Structure to hold all SKE callbacks. */
@@ -334,7 +334,7 @@ SilcSKEStatus silc_ske_initiator_phase_2(SilcSKE ske,
   SilcBuffer payload_buf;
   SilcMPInt *x;
   SilcSKEKEPayload *payload;
-  uint32 pk_len;
+  SilcUInt32 pk_len;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -382,7 +382,7 @@ SilcSKEStatus silc_ske_initiator_phase_2(SilcSKE ske,
   /* Compute signature data if we are doing mutual authentication */
   if (private_key && ske->start_payload->flags & SILC_SKE_SP_FLAG_MUTUAL) {
     unsigned char hash[32], sign[1024];
-    uint32 hash_len, sign_len;
+    SilcUInt32 hash_len, sign_len;
 
     SILC_LOG_DEBUG(("We are doing mutual authentication"));
     SILC_LOG_DEBUG(("Computing HASH_i value"));
@@ -436,7 +436,7 @@ static void silc_ske_initiator_finish_final(SilcSKE ske,
 {
   SilcSKEKEPayload *payload;
   unsigned char hash[32];
-  uint32 hash_len;
+  SilcUInt32 hash_len;
   SilcPublicKey public_key = NULL;
 
   /* If the SKE was freed during the async call then free it really now,
@@ -822,7 +822,7 @@ static void silc_ske_responder_phase2_final(SilcSKE ske,
       ske->start_payload->flags & SILC_SKE_SP_FLAG_MUTUAL) {
     SilcPublicKey public_key = NULL;
     unsigned char hash[32];
-    uint32 hash_len;
+    SilcUInt32 hash_len;
 
     /* Decode the public key */
     if (!silc_pkcs_public_key_decode(recv_payload->pk_data, 
@@ -986,7 +986,7 @@ SilcSKEStatus silc_ske_responder_finish(SilcSKE ske,
   SilcBuffer payload_buf;
   SilcMPInt *KEY;
   unsigned char hash[32], sign[1024], *pk;
-  uint32 hash_len, sign_len, pk_len;
+  SilcUInt32 hash_len, sign_len, pk_len;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -1078,7 +1078,7 @@ SilcSKEStatus silc_ske_end(SilcSKE ske)
   packet = silc_buffer_alloc(4);
   silc_buffer_pull_tail(packet, SILC_BUFFER_END(packet));
   silc_buffer_format(packet,
-                    SILC_STR_UI_INT((uint32)SILC_SKE_STATUS_OK),
+                    SILC_STR_UI_INT((SilcUInt32)SILC_SKE_STATUS_OK),
                     SILC_STR_END);
 
   if (ske->callbacks->send_packet)
@@ -1103,7 +1103,7 @@ SilcSKEStatus silc_ske_abort(SilcSKE ske, SilcSKEStatus status)
   packet = silc_buffer_alloc(4);
   silc_buffer_pull_tail(packet, SILC_BUFFER_END(packet));
   silc_buffer_format(packet,
-                    SILC_STR_UI_INT((uint32)status),
+                    SILC_STR_UI_INT((SilcUInt32)status),
                     SILC_STR_END);
 
   if (ske->callbacks->send_packet)
@@ -1553,7 +1553,7 @@ silc_ske_select_security_properties(SilcSKE ske,
    of len bits. The rnd sent as argument must be initialized. */
 
 static SilcSKEStatus silc_ske_create_rnd(SilcSKE ske, SilcMPInt *n, 
-                                        uint32 len, 
+                                        SilcUInt32 len, 
                                         SilcMPInt *rnd)
 {
   SilcSKEStatus status = SILC_SKE_STATUS_OK;
@@ -1590,13 +1590,13 @@ static SilcSKEStatus silc_ske_create_rnd(SilcSKE ske, SilcMPInt *n,
 
 static SilcSKEStatus silc_ske_make_hash(SilcSKE ske, 
                                        unsigned char *return_hash,
-                                       uint32 *return_hash_len,
+                                       SilcUInt32 *return_hash_len,
                                        int initiator)
 {
   SilcSKEStatus status = SILC_SKE_STATUS_OK;
   SilcBuffer buf;
   unsigned char *e, *f, *KEY;
-  uint32 e_len, f_len, KEY_len;
+  SilcUInt32 e_len, f_len, KEY_len;
   int ret;
 
   SILC_LOG_DEBUG(("Start"));
@@ -1728,17 +1728,17 @@ static SilcSKEStatus silc_ske_make_hash(SilcSKE ske,
 
 SilcSKEStatus 
 silc_ske_process_key_material_data(unsigned char *data,
-                                  uint32 data_len,
-                                  uint32 req_iv_len,
-                                  uint32 req_enc_key_len,
-                                  uint32 req_hmac_key_len,
+                                  SilcUInt32 data_len,
+                                  SilcUInt32 req_iv_len,
+                                  SilcUInt32 req_enc_key_len,
+                                  SilcUInt32 req_hmac_key_len,
                                   SilcHash hash,
                                   SilcSKEKeyMaterial *key)
 {
   SilcBuffer buf;
   unsigned char hashd[32];
-  uint32 hash_len = req_hmac_key_len;
-  uint32 enc_key_len = req_enc_key_len / 8;
+  SilcUInt32 hash_len = req_hmac_key_len;
+  SilcUInt32 enc_key_len = req_enc_key_len / 8;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -1911,15 +1911,15 @@ silc_ske_process_key_material_data(unsigned char *data,
    the actual keys to be used in the SILC. */
 
 SilcSKEStatus silc_ske_process_key_material(SilcSKE ske, 
-                                           uint32 req_iv_len,
-                                           uint32 req_enc_key_len,
-                                           uint32 req_hmac_key_len,
+                                           SilcUInt32 req_iv_len,
+                                           SilcUInt32 req_enc_key_len,
+                                           SilcUInt32 req_hmac_key_len,
                                            SilcSKEKeyMaterial *key)
 {
   SilcSKEStatus status;
   SilcBuffer buf;
   unsigned char *tmpbuf;
-  uint32 klen;
+  SilcUInt32 klen;
 
   /* Encode KEY to binary data */
   tmpbuf = silc_mp_mp2bin(ske->KEY, 0, &klen);
index 88771956ab3d8311bf8e2142f099c098ed2af41f..5c552e03b7051962ea6eee7359f15d9c2eaa4522 100644 (file)
@@ -183,7 +183,7 @@ typedef void (*SilcSKEVerifyCbCompletion)(SilcSKE ske,
  *
  *    typedef void (*SilcSKEVerifyCb)(SilcSKE ske,
  *                                    unsigned char *pk_data,
- *                                    uint32 pk_len,
+ *                                    SilcUInt32 pk_len,
  *                                    SilcSKEPKType pk_type,
  *                                    void *context,
  *                                    SilcSKEVerifyCbCompletion completion,
@@ -202,7 +202,7 @@ typedef void (*SilcSKEVerifyCbCompletion)(SilcSKE ske,
  ***/
 typedef void (*SilcSKEVerifyCb)(SilcSKE ske,
                                unsigned char *pk_data,
-                               uint32 pk_len,
+                               SilcUInt32 pk_len,
                                SilcSKEPKType pk_type,
                                void *context,
                                SilcSKEVerifyCbCompletion completion,
@@ -214,7 +214,7 @@ typedef void (*SilcSKEVerifyCb)(SilcSKE ske,
  *
  *    typedef SilcSKEStatus (*SilcSKECheckVersion)(SilcSKE ske,
  *                                                 unsigned char *version,
- *                                                 uint32 len, void *context);
+ *                                                 SilcUInt32 len, void *context);
  *
  * DESCRIPTION
  *
@@ -227,7 +227,7 @@ typedef void (*SilcSKEVerifyCb)(SilcSKE ske,
  ***/
 typedef SilcSKEStatus (*SilcSKECheckVersion)(SilcSKE ske,
                                             unsigned char *version,
-                                            uint32 len, void *context);
+                                            SilcUInt32 len, void *context);
 
 /****s* silcske/SilcSKEAPI/SilcSKEKeyMaterial
  *
@@ -245,13 +245,13 @@ typedef SilcSKEStatus (*SilcSKECheckVersion)(SilcSKE ske,
 typedef struct {
   unsigned char *send_iv;
   unsigned char *receive_iv;
-  uint32 iv_len;
+  SilcUInt32 iv_len;
   unsigned char *send_enc_key;
   unsigned char *receive_enc_key;
-  uint32 enc_key_len;
+  SilcUInt32 enc_key_len;
   unsigned char *send_hmac_key;
   unsigned char *receive_hmac_key;
-  uint32 hmac_key_len;
+  SilcUInt32 hmac_key_len;
 } SilcSKEKeyMaterial;
 
 /* Length of cookie in Start Payload */
@@ -349,7 +349,7 @@ struct SilcSKEStruct {
 
   /* The hash value HASH of the key exchange */
   unsigned char *hash;
-  uint32 hash_len;
+  SilcUInt32 hash_len;
 
   /* Random Number Generator. This is set by the caller and must
      be free'd by the caller. */
@@ -370,7 +370,7 @@ struct SilcSKEStruct {
   SilcSKECallbacks callbacks;
 
   /* Backwards support version indicator */
-  uint32 backward_version;
+  SilcUInt32 backward_version;
 };
 /***/
 
@@ -820,9 +820,9 @@ silc_ske_select_security_properties(SilcSKE ske,
  * SYNOPSIS
  *
  *    SilcSKEStatus silc_ske_process_key_material(SilcSKE ske,
- *                                                uint32 req_iv_len,
- *                                                uint32 req_enc_key_len,
- *                                                uint32 req_hmac_key_len,
+ *                                                SilcUInt32 req_iv_len,
+ *                                                SilcUInt32 req_enc_key_len,
+ *                                                SilcUInt32 req_hmac_key_len,
  *                                                SilcSKEKeyMaterial *key);
  *
  * DESCRIPTION
@@ -840,9 +840,9 @@ silc_ske_select_security_properties(SilcSKE ske,
  *
  ***/
 SilcSKEStatus silc_ske_process_key_material(SilcSKE ske,
-                                           uint32 req_iv_len,
-                                           uint32 req_enc_key_len,
-                                           uint32 req_hmac_key_len,
+                                           SilcUInt32 req_iv_len,
+                                           SilcUInt32 req_enc_key_len,
+                                           SilcUInt32 req_hmac_key_len,
                                            SilcSKEKeyMaterial *key);
 
 /****f* silcske/SilcSKEAPI/silc_ske_process_key_material_data
@@ -851,10 +851,10 @@ SilcSKEStatus silc_ske_process_key_material(SilcSKE ske,
  *
  *    SilcSKEStatus
  *    silc_ske_process_key_material_data(unsigned char *data,
- *                                       uint32 data_len,
- *                                       uint32 req_iv_len,
- *                                       uint32 req_enc_key_len,
- *                                       uint32 req_hmac_key_len,
+ *                                       SilcUInt32 data_len,
+ *                                       SilcUInt32 req_iv_len,
+ *                                       SilcUInt32 req_enc_key_len,
+ *                                       SilcUInt32 req_hmac_key_len,
  *                                       SilcHash hash,
  *                                       SilcSKEKeyMaterial *key);
  *
@@ -872,10 +872,10 @@ SilcSKEStatus silc_ske_process_key_material(SilcSKE ske,
  ***/
 SilcSKEStatus
 silc_ske_process_key_material_data(unsigned char *data,
-                                  uint32 data_len,
-                                  uint32 req_iv_len,
-                                  uint32 req_enc_key_len,
-                                  uint32 req_hmac_key_len,
+                                  SilcUInt32 data_len,
+                                  SilcUInt32 req_iv_len,
+                                  SilcUInt32 req_enc_key_len,
+                                  SilcUInt32 req_hmac_key_len,
                                   SilcHash hash,
                                   SilcSKEKeyMaterial *key);
 
index 4acfa063a24ccd5d926832835b1eaf74173567f4..9c12ba577042dc40928a190d18b06d687400de01 100644 (file)
@@ -65,42 +65,42 @@ typedef struct SilcSKEKEPayloadStruct SilcSKEKEPayload;
 /* SILC Key Exchange Start Payload */
 struct SilcSKEStartPayloadStruct {
   unsigned char flags;
-  uint16 len;
+  SilcUInt16 len;
 
   unsigned char *cookie;
-  uint16 cookie_len;
+  SilcUInt16 cookie_len;
 
   unsigned char *version;
-  uint16 version_len;
+  SilcUInt16 version_len;
 
-  uint16 ke_grp_len;
+  SilcUInt16 ke_grp_len;
   unsigned char *ke_grp_list;
 
-  uint16 pkcs_alg_len;
+  SilcUInt16 pkcs_alg_len;
   unsigned char *pkcs_alg_list;
 
-  uint16 enc_alg_len;
+  SilcUInt16 enc_alg_len;
   unsigned char *enc_alg_list;
   
-  uint16 hash_alg_len;
+  SilcUInt16 hash_alg_len;
   unsigned char *hash_alg_list;
 
-  uint16 hmac_alg_len;
+  SilcUInt16 hmac_alg_len;
   unsigned char *hmac_alg_list;
 
-  uint16 comp_alg_len;
+  SilcUInt16 comp_alg_len;
   unsigned char *comp_alg_list;
 };
 
 /* SILC Key Exchange Payload */
 struct SilcSKEKEPayloadStruct {
-  uint16 pk_len;
+  SilcUInt16 pk_len;
   unsigned char *pk_data;
-  uint16 pk_type;
+  SilcUInt16 pk_type;
 
   SilcMPInt x;
 
-  uint16 sign_len;
+  SilcUInt16 sign_len;
   unsigned char *sign_data;
 };
 
index 3b7c057cf5c830ceca2b386fc27daf9282f2d867..3b26deec127abe927e45526c0714f5ba7f0f33b2 100644 (file)
@@ -110,7 +110,7 @@ int silc_socket_read(SilcSocketConnection sock)
 /* Returns human readable socket error message */
 
 bool silc_socket_get_error(SilcSocketConnection sock, char *error,
-                          uint32 error_len)
+                          SilcUInt32 error_len)
 {
   char *err;
 
index 9b55d8f5cf0ac803cef8c2c8839925b46ed94674..855fb0f4aa7e2ad18f66a5648bf5613a3cabc151 100644 (file)
@@ -290,7 +290,7 @@ int silc_net_set_socket_nonblock(int sock)
 /* Converts the IP number string from numbers-and-dots notation to
    binary form. */
 
-bool silc_net_addr2bin(const char *addr, void *bin, uint32 bin_len)
+bool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len)
 {
   int ret = 0;
 
index f5db19d7cf10e7ae93804589590f08e210e9db90..fc775056577b133eca4846e795f3e950f444c2b8 100644 (file)
@@ -25,7 +25,7 @@
 
 /* Calls normal select() system call. */
 
-int silc_select(SilcScheduleFd fds, uint32 fds_count, struct timeval *timeout)
+int silc_select(SilcScheduleFd fds, SilcUInt32 fds_count, struct timeval *timeout)
 {
   fd_set in, out;
   int ret, i, max_fd = 0;
index 7d2f9f8e1b8468de90caabf68945e28b32b53b71..be3ae5a447edd8e056a431ba0831b3ca59d90d78 100644 (file)
@@ -108,7 +108,7 @@ int silc_socket_read(SilcSocketConnection sock)
 /* Returns human readable socket error message */
 
 bool silc_socket_get_error(SilcSocketConnection sock, char *error,
-                          uint32 error_len)
+                          SilcUInt32 error_len)
 {
   /* XXX TODO */
   return FALSE;
index cbf6c13df5194482539548494efab9650416d66b..4a5877dd8ee737f1d734c80de753775cddaf1a22 100644 (file)
@@ -49,10 +49,10 @@ const BYTE DWLEN = sizeof(DWORD) * 8;
 int silc_gettimeofday(struct timeval *tv)
 {
   FILETIME ft;
-  __int64 msec;
+  __SilcInt64 msec;
   
   GetSystemTimeAsFileTime(&ft);
-  msec = (__int64) ft.dwHighDateTime << DWLEN | ft.dwLowDateTime;
+  msec = (__SilcInt64) ft.dwHighDateTime << DWLEN | ft.dwLowDateTime;
   msec = (msec - FILETIME_1970) / 10;
   tv->tv_sec  = (long) (msec / 1000000);
   tv->tv_usec = (long) (msec % 1000000);
index 9a64329e6c3e426c5de7c353f269367882b584da..8d39ec81ce0650f9f9e518cd2828271882a5cee9 100644 (file)
    the allocated data area. Following short description of the fields
    of the buffer.
 
-   uint32 truelen;
+   SilcUInt32 truelen;
 
        True length of the buffer. This is set at the allocation of the
        buffer and it should not be touched after that. This field should
        be considered read-only.
 
-   uint32 len;
+   SilcUInt32 len;
 
        Length of the currently valid data area. Tells the length of the 
        data at the buffer. This is set to zero at the allocation of the
 */
 
 typedef struct {
-  uint32 truelen;
-  uint32 len;
+  SilcUInt32 truelen;
+  SilcUInt32 len;
   unsigned char *head;
   unsigned char *data;
   unsigned char *tail;
@@ -128,7 +128,7 @@ typedef struct {
 /* Inline functions */
 
 static inline
-SilcBuffer silc_buffer_alloc(uint32 len)
+SilcBuffer silc_buffer_alloc(SilcUInt32 len)
 {
   SilcBuffer sb;
 
@@ -165,7 +165,7 @@ void silc_buffer_free(SilcBuffer sb)
    memory allocations. The `data' will not be copied to the buffer. */
 
 static inline
-void silc_buffer_set(SilcBuffer sb, unsigned char *data, uint32 data_len)
+void silc_buffer_set(SilcBuffer sb, unsigned char *data, SilcUInt32 data_len)
 {
   sb->data = sb->head = data;
   sb->tail = sb->end = data + data_len;
@@ -190,12 +190,12 @@ void silc_buffer_set(SilcBuffer sb, unsigned char *data, uint32 data_len)
 */
 
 static inline 
-unsigned char *silc_buffer_pull(SilcBuffer sb, uint32 len)
+unsigned char *silc_buffer_pull(SilcBuffer sb, SilcUInt32 len)
 {
   unsigned char *old_data = sb->data;
 
 #ifdef SILC_DEBUG
-  assert(len <= (uint32)(sb->tail - sb->data));
+  assert(len <= (SilcUInt32)(sb->tail - sb->data));
 #endif
 
   sb->data += len;
@@ -222,7 +222,7 @@ unsigned char *silc_buffer_pull(SilcBuffer sb, uint32 len)
 */
 
 static inline 
-unsigned char *silc_buffer_push(SilcBuffer sb, uint32 len)
+unsigned char *silc_buffer_push(SilcBuffer sb, SilcUInt32 len)
 {
   unsigned char *old_data = sb->data;
 
@@ -254,12 +254,12 @@ unsigned char *silc_buffer_push(SilcBuffer sb, uint32 len)
 */
 
 static inline 
-unsigned char *silc_buffer_pull_tail(SilcBuffer sb, uint32 len)
+unsigned char *silc_buffer_pull_tail(SilcBuffer sb, SilcUInt32 len)
 {
   unsigned char *old_tail = sb->tail;
 
 #ifdef SILC_DEBUG
-  assert((uint32)(sb->end - sb->tail) >= len);
+  assert((SilcUInt32)(sb->end - sb->tail) >= len);
 #endif
 
   sb->tail += len;
@@ -286,7 +286,7 @@ unsigned char *silc_buffer_pull_tail(SilcBuffer sb, uint32 len)
 */
 
 static inline
-unsigned char *silc_buffer_push_tail(SilcBuffer sb, uint32 len)
+unsigned char *silc_buffer_push_tail(SilcBuffer sb, SilcUInt32 len)
 {
   unsigned char *old_tail = sb->tail;
 
@@ -314,10 +314,10 @@ unsigned char *silc_buffer_push_tail(SilcBuffer sb, uint32 len)
 static inline
 unsigned char *silc_buffer_put_head(SilcBuffer sb, 
                                    const unsigned char *data,
-                                   uint32 len)
+                                   SilcUInt32 len)
 {
 #ifdef SILC_DEBUG
-  assert((uint32)(sb->data - sb->head) >= len);
+  assert((SilcUInt32)(sb->data - sb->head) >= len);
 #endif
   return (unsigned char *)memcpy(sb->head, data, len);
 }
@@ -336,10 +336,10 @@ unsigned char *silc_buffer_put_head(SilcBuffer sb,
 static inline
 unsigned char *silc_buffer_put(SilcBuffer sb, 
                               const unsigned char *data,
-                              uint32 len)
+                              SilcUInt32 len)
 {
 #ifdef SILC_DEBUG
-  assert((uint32)(sb->tail - sb->data) >= len);
+  assert((SilcUInt32)(sb->tail - sb->data) >= len);
 #endif
   return (unsigned char *)memcpy(sb->data, data, len);
 }
@@ -358,10 +358,10 @@ unsigned char *silc_buffer_put(SilcBuffer sb,
 static inline
 unsigned char *silc_buffer_put_tail(SilcBuffer sb, 
                                    const unsigned char *data,
-                                   uint32 len)
+                                   SilcUInt32 len)
 {
 #ifdef SILC_DEBUG
-  assert((uint32)(sb->end - sb->tail) >= len);
+  assert((SilcUInt32)(sb->end - sb->tail) >= len);
 #endif
   return (unsigned char *)memcpy(sb->tail, data, len);
 }
@@ -418,7 +418,7 @@ SilcBuffer silc_buffer_clone(SilcBuffer sb)
    except that there is now more space at the end of buffer. */
 
 static inline
-SilcBuffer silc_buffer_realloc(SilcBuffer sb, uint32 newsize)
+SilcBuffer silc_buffer_realloc(SilcBuffer sb, SilcUInt32 newsize)
 {
   SilcBuffer sb_new;
 
index 86edee11b1da29fe418a4e9500f8e06e53a16780..be83be57936443bcd2af45a64ffba06761f357a0 100644 (file)
@@ -79,7 +79,7 @@ int silc_buffer_format_vp(SilcBuffer dst, va_list ap)
     case SILC_BUFFER_PARAM_SI16_SHORT:
       {
        unsigned char xf[2];
-       int16 x = (int16)va_arg(ap, int);
+       SilcInt16 x = (SilcInt16)va_arg(ap, int);
        HAS_SPACE(dst, 2);
        SILC_PUT16_MSB(x, xf);
        silc_buffer_put(dst, xf, 2);
@@ -89,7 +89,7 @@ int silc_buffer_format_vp(SilcBuffer dst, va_list ap)
     case SILC_BUFFER_PARAM_UI16_SHORT:
       {
        unsigned char xf[2];
-       uint16 x = (uint16)va_arg(ap, int);
+       SilcUInt16 x = (SilcUInt16)va_arg(ap, int);
        HAS_SPACE(dst, 2);
        SILC_PUT16_MSB(x, xf);
        silc_buffer_put(dst, xf, 2);
@@ -99,7 +99,7 @@ int silc_buffer_format_vp(SilcBuffer dst, va_list ap)
     case SILC_BUFFER_PARAM_SI32_INT:
       {
        unsigned char xf[4];
-       int32 x = va_arg(ap, int32);
+       SilcInt32 x = va_arg(ap, SilcInt32);
        HAS_SPACE(dst, 4);
        SILC_PUT32_MSB(x, xf);
        silc_buffer_put(dst, xf, 4);
@@ -109,7 +109,7 @@ int silc_buffer_format_vp(SilcBuffer dst, va_list ap)
     case SILC_BUFFER_PARAM_UI32_INT:
       {
        unsigned char xf[4];
-       uint32 x = va_arg(ap, uint32);
+       SilcUInt32 x = va_arg(ap, SilcUInt32);
        HAS_SPACE(dst, 4);
        SILC_PUT32_MSB(x, xf);
        silc_buffer_put(dst, xf, 4);
@@ -119,7 +119,7 @@ int silc_buffer_format_vp(SilcBuffer dst, va_list ap)
     case SILC_BUFFER_PARAM_SI64_INT:
       {
        unsigned char xf[8];
-       int64 x = va_arg(ap, int64);
+       SilcInt64 x = va_arg(ap, SilcInt64);
        HAS_SPACE(dst, 8);
        SILC_PUT64_MSB(x, xf);
        silc_buffer_put(dst, xf, 8);
@@ -129,7 +129,7 @@ int silc_buffer_format_vp(SilcBuffer dst, va_list ap)
     case SILC_BUFFER_PARAM_UI64_INT:
       {
        unsigned char xf[8];
-       uint64 x = va_arg(ap, uint64);
+       SilcUInt64 x = va_arg(ap, SilcUInt64);
        HAS_SPACE(dst, 8);
        SILC_PUT64_MSB(x, xf);
        silc_buffer_put(dst, xf, 8);
@@ -144,7 +144,7 @@ int silc_buffer_format_vp(SilcBuffer dst, va_list ap)
     case SILC_BUFFER_PARAM_UI32_STRING_ALLOC:
       {
        unsigned char *x = va_arg(ap, unsigned char *);
-       uint32 tmp_len = strlen(x);
+       SilcUInt32 tmp_len = strlen(x);
        HAS_SPACE(dst, tmp_len);
        silc_buffer_put(dst, x, tmp_len);
        silc_buffer_pull(dst, tmp_len);
@@ -160,7 +160,7 @@ int silc_buffer_format_vp(SilcBuffer dst, va_list ap)
     case SILC_BUFFER_PARAM_UI_XNSTRING_ALLOC:
       {
        unsigned char *x = va_arg(ap, unsigned char *);
-       uint32 len = va_arg(ap, uint32);
+       SilcUInt32 len = va_arg(ap, SilcUInt32);
        HAS_SPACE(dst, len);
        silc_buffer_put(dst, x, len);
        silc_buffer_pull(dst, len);
@@ -236,7 +236,7 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_SI16_SHORT:
       {
-       int16 *x = va_arg(ap, int16 *);
+       SilcInt16 *x = va_arg(ap, SilcInt16 *);
        HAS_SPACE(src, 2);
        if (x)
          SILC_GET16_MSB(*x, src->data);
@@ -245,7 +245,7 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI16_SHORT:
       {
-       uint16 *x = va_arg(ap, uint16 *);
+       SilcUInt16 *x = va_arg(ap, SilcUInt16 *);
        HAS_SPACE(src, 2);
        if (x)
          SILC_GET16_MSB(*x, src->data);
@@ -254,7 +254,7 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_SI32_INT:
       {
-       int32 *x = va_arg(ap, int32 *);
+       SilcInt32 *x = va_arg(ap, SilcInt32 *);
        HAS_SPACE(src, 4);
        if (x)
          SILC_GET32_MSB(*x, src->data);
@@ -263,7 +263,7 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI32_INT:
       {
-       uint32 *x = va_arg(ap, uint32 *);
+       SilcUInt32 *x = va_arg(ap, SilcUInt32 *);
        HAS_SPACE(src, 4);
        if (x)
          SILC_GET32_MSB(*x, src->data);
@@ -272,7 +272,7 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_SI64_INT:
       {
-       int64 *x = va_arg(ap, int64 *);
+       SilcInt64 *x = va_arg(ap, SilcInt64 *);
        HAS_SPACE(src, 8);
        if (x)
          SILC_GET64_MSB(*x, src->data);
@@ -281,7 +281,7 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI64_INT:
       {
-       uint64 *x = va_arg(ap, uint64 *);
+       SilcUInt64 *x = va_arg(ap, SilcUInt64 *);
        HAS_SPACE(src, 8);
        if (x)
          SILC_GET64_MSB(*x, src->data);
@@ -290,10 +290,10 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI8_STRING:
       {
-       uint8 len2;
+       SilcUInt8 len2;
        unsigned char **x = va_arg(ap, unsigned char **);
        HAS_SPACE(src, 1);
-       len2 = (uint8)src->data[0];
+       len2 = (SilcUInt8)src->data[0];
        silc_buffer_pull(src, 1);
        HAS_SPACE(src, len2);
        if (x)
@@ -303,7 +303,7 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI16_STRING:
       {
-       uint16 len2;
+       SilcUInt16 len2;
        unsigned char **x = va_arg(ap, unsigned char **);
        HAS_SPACE(src, 2);
        SILC_GET16_MSB(len2, src->data);
@@ -316,10 +316,10 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI8_STRING_ALLOC:
       {
-       uint8 len2;
+       SilcUInt8 len2;
        unsigned char **x = va_arg(ap, unsigned char **);
        HAS_SPACE(src, 1);
-       len2 = (uint8)src->data[0];
+       len2 = (SilcUInt8)src->data[0];
        silc_buffer_pull(src, 1);
        HAS_SPACE(src, len2);
        if (x && len2) {
@@ -331,7 +331,7 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI16_STRING_ALLOC:
       {
-       uint16 len2;
+       SilcUInt16 len2;
        unsigned char **x = va_arg(ap, unsigned char **);
        HAS_SPACE(src, 2);
        SILC_GET16_MSB(len2, src->data);
@@ -346,7 +346,7 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI32_STRING:
       {
-       uint32 len2;
+       SilcUInt32 len2;
        unsigned char **x = va_arg(ap, unsigned char **);
        HAS_SPACE(src, 4);
        SILC_GET32_MSB(len2, src->data);
@@ -359,7 +359,7 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI32_STRING_ALLOC:
       {
-       uint32 len2;
+       SilcUInt32 len2;
        unsigned char **x = va_arg(ap, unsigned char **);
        HAS_SPACE(src, 4);
        SILC_GET32_MSB(len2, src->data);
@@ -374,11 +374,11 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI8_NSTRING:
       {
-       uint8 len2;
+       SilcUInt8 len2;
        unsigned char **x = va_arg(ap, unsigned char **);
-       uint8 *len = va_arg(ap, uint8 *);
+       SilcUInt8 *len = va_arg(ap, SilcUInt8 *);
        HAS_SPACE(src, 1);
-       len2 = (uint8)src->data[0];
+       len2 = (SilcUInt8)src->data[0];
        silc_buffer_pull(src, 1);
        HAS_SPACE(src, len2);
        if (len)
@@ -390,9 +390,9 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI16_NSTRING:
       {
-       uint16 len2;
+       SilcUInt16 len2;
        unsigned char **x = va_arg(ap, unsigned char **);
-       uint16 *len = va_arg(ap, uint16 *);
+       SilcUInt16 *len = va_arg(ap, SilcUInt16 *);
        HAS_SPACE(src, 2);
        SILC_GET16_MSB(len2, src->data);
        silc_buffer_pull(src, 2);
@@ -406,11 +406,11 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI8_NSTRING_ALLOC:
       {
-       uint8 len2;
+       SilcUInt8 len2;
        unsigned char **x = va_arg(ap, unsigned char **);
-       uint8 *len = va_arg(ap, uint8 *);
+       SilcUInt8 *len = va_arg(ap, SilcUInt8 *);
        HAS_SPACE(src, 1);
-       len2 = (uint8)src->data[0];
+       len2 = (SilcUInt8)src->data[0];
        silc_buffer_pull(src, 1);
        HAS_SPACE(src, len2);
        if (len)
@@ -424,9 +424,9 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI16_NSTRING_ALLOC:
       {
-       uint16 len2;
+       SilcUInt16 len2;
        unsigned char **x = va_arg(ap, unsigned char **);
-       uint16 *len = va_arg(ap, uint16 *);
+       SilcUInt16 *len = va_arg(ap, SilcUInt16 *);
        HAS_SPACE(src, 2);
        SILC_GET16_MSB(len2, src->data);
        silc_buffer_pull(src, 2);
@@ -442,9 +442,9 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
       }
     case SILC_BUFFER_PARAM_UI32_NSTRING:
       {
-       uint32 len2;
+       SilcUInt32 len2;
        unsigned char **x = va_arg(ap, unsigned char **);
-       uint32 *len = va_arg(ap, uint32 *);
+       SilcUInt32 *len = va_arg(ap, SilcUInt32 *);
        HAS_SPACE(src, 4);
        SILC_GET32_MSB(len2, src->data);
        silc_buffer_pull(src, 4);
@@ -459,7 +459,7 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
     case SILC_BUFFER_PARAM_UI_XNSTRING:
       {
        unsigned char **x = va_arg(ap, unsigned char **);
-       uint32 len = va_arg(ap, uint32);
+       SilcUInt32 len = va_arg(ap, SilcUInt32);
        HAS_SPACE(src, len);
        if (len && x)
          *x = src->data;
@@ -469,7 +469,7 @@ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap)
     case SILC_BUFFER_PARAM_UI_XNSTRING_ALLOC:
       {
        unsigned char **x = va_arg(ap, unsigned char **);
-       uint32 len = va_arg(ap, uint32);
+       SilcUInt32 len = va_arg(ap, SilcUInt32);
        HAS_SPACE(src, len);
        if (len && x) {
          *x = silc_calloc(len + 1, sizeof(unsigned char));
index 8b281eedf663a9f723e4665d69e634d11955748f..e69e90bb6c6ce31cf11b0fe213cf5c30a807b8b8 100644 (file)
@@ -91,34 +91,34 @@ typedef enum {
 #define SILC_STR_SI_CHAR(x) SILC_BUFFER_PARAM_SI8_CHAR, (x)
 #define SILC_STR_UI_CHAR(x) SILC_BUFFER_PARAM_UI8_CHAR, (x)
 
-/* Signed/uint16. 
+/* Signed/SilcUInt16. 
 
    Formatting:    SILC_STR_SI_SHORT(short)
-                  SILC_STR_UI_SHORT(uint16)
+                  SILC_STR_UI_SHORT(SilcUInt16)
    Unformatting:  SILC_STR_SI_SHORT(short *)
-                  SILC_STR_UI_SHORT(uint16 *)
+                  SILC_STR_UI_SHORT(SilcUInt16 *)
 
 */
 #define SILC_STR_SI_SHORT(x) SILC_BUFFER_PARAM_SI16_SHORT, (x)
 #define SILC_STR_UI_SHORT(x) SILC_BUFFER_PARAM_UI16_SHORT, (x)
 
-/* Signed/uint32. 
+/* Signed/SilcUInt32. 
 
    Formatting:    SILC_STR_SI_INT(int)
-                  SILC_STR_UI_INT(uint32)
+                  SILC_STR_UI_INT(SilcUInt32)
    Unformatting:  SILC_STR_SI_INT(int *)
-                  SILC_STR_UI_INT(uint32 *)
+                  SILC_STR_UI_INT(SilcUInt32 *)
 
 */
 #define SILC_STR_SI_INT(x) SILC_BUFFER_PARAM_SI32_INT, (x)
 #define SILC_STR_UI_INT(x) SILC_BUFFER_PARAM_UI32_INT, (x)
 
-/* Signed/uint64. 
+/* Signed/SilcUInt64. 
 
    Formatting:    SILC_STR_SI_INT64(int)
-                  SILC_STR_UI_INT64(uint32)
+                  SILC_STR_UI_INT64(SilcUInt32)
    Unformatting:  SILC_STR_SI_INT64(int *)
-                  SILC_STR_UI_INT64(uint32 *)
+                  SILC_STR_UI_INT64(SilcUInt32 *)
 
 */
 #define SILC_STR_SI_INT64(x) SILC_BUFFER_PARAM_SI64_INT, (x)
@@ -161,8 +161,8 @@ typedef enum {
 
 /* Unsigned string. Second argument is the length of the string.
 
-   Formatting:    SILC_STR_UI32_NSTRING(unsigned char *, uint32)
-   Unformatting:  SILC_STR_UI32_NSTRING(unsigned char **, uint32 *)
+   Formatting:    SILC_STR_UI32_NSTRING(unsigned char *, SilcUInt32)
+   Unformatting:  SILC_STR_UI32_NSTRING(unsigned char **, SilcUInt32 *)
 
    Unformatting procedure will check for length of the string from the
    buffer before trying to get the string out. Thus, one *must* format the
@@ -203,7 +203,7 @@ typedef enum {
    the string.
 
    Formatting:    This is equal to using *_NSTRING
-   Unformatting:  SILC_STR_UI_XNSTRING(unsigned char **, uint32)
+   Unformatting:  SILC_STR_UI_XNSTRING(unsigned char **, SilcUInt32)
 
    This type can be used to take arbitrary length string from the buffer
    by sending the requested amount of bytes as argument. This differs
index dcd55b93792e306b4495b59a489a1f5740c8f670..460cfd1214a247a2e149fd77e205f4c3e786eeb7 100644 (file)
@@ -45,8 +45,8 @@ struct SilcConfigFileObject {
   int level;   /* parsing level, how many nested silc_config_main we have */
   char *base;  /* this is a fixed pointer to the base location */
   char *p;     /* the Parser poitner */
-  uint32 len;  /* fixed length of the whole file */
-  uint32 line; /* current parsing line, strictly linked to p */
+  SilcUInt32 len;      /* fixed length of the whole file */
+  SilcUInt32 line;     /* current parsing line, strictly linked to p */
   bool included; /* wether this file is main or included */
 };
 
@@ -177,7 +177,7 @@ static void *silc_config_marshall(SilcConfigType type, const char *val)
   int val_int;
   bool val_bool;
   char *val_tmp;
-  uint32 val_size;
+  SilcUInt32 val_size;
 
   switch (type) {
     case SILC_CONFIG_ARG_TOGGLE:
@@ -202,7 +202,7 @@ static void *silc_config_marshall(SilcConfigType type, const char *val)
       *(int *)pt = val_int;
       return pt;
     case SILC_CONFIG_ARG_SIZE:
-      val_size = (uint32) strtol(val, &val_tmp, 0);
+      val_size = (SilcUInt32) strtol(val, &val_tmp, 0);
       if (val == val_tmp)
        return NULL; /* really wrong, there must be at least one digit */
       /* Search for a designator */
@@ -210,13 +210,13 @@ static void *silc_config_marshall(SilcConfigType type, const char *val)
        case '\0': /* None */
          break;
        case 'k': /* Kilobytes */
-         val_size *= (uint32) 1024;
+         val_size *= (SilcUInt32) 1024;
          break;
        case 'm': /* Megabytes */
-         val_size *= (uint32) (1024 * 1024);
+         val_size *= (SilcUInt32) (1024 * 1024);
          break;
        case 'g':
-         val_size *= (uint32) (1024 * 1024 * 1024);
+         val_size *= (SilcUInt32) (1024 * 1024 * 1024);
          break;
        default:
          return NULL;
@@ -225,7 +225,7 @@ static void *silc_config_marshall(SilcConfigType type, const char *val)
       if (val_tmp[1])
        return NULL;
       pt = silc_calloc(1, sizeof(val_size));
-      *(uint32 *)pt = val_size;
+      *(SilcUInt32 *)pt = val_size;
       return pt;
     case SILC_CONFIG_ARG_STR: /* the only difference between STR and STRE is */
       if (!val[0])           /* that STR cannot be empty, while STRE can.  */
@@ -253,7 +253,7 @@ static void *silc_config_marshall(SilcConfigType type, const char *val)
 SilcConfigFile *silc_config_open(char *configfile)
 {
   char *buffer;
-  uint32 filelen;
+  SilcUInt32 filelen;
   SilcConfigFile *ret;
 
   if (!(buffer = silc_file_readfile(configfile, &filelen)))
@@ -273,8 +273,8 @@ void silc_config_close(SilcConfigFile *file)
 {
   if (file) {
     /* XXX FIXME: this check could probably be removed later */
-    uint32 my_len = (uint32) (strchr(file->base, EOF) - file->base);
-    SILC_CONFIG_DEBUG(("file=0x%x name=\"%s\" level=%d line=%lu", (uint32) file,
+    SilcUInt32 my_len = (SilcUInt32) (strchr(file->base, EOF) - file->base);
+    SILC_CONFIG_DEBUG(("file=0x%x name=\"%s\" level=%d line=%lu", (SilcUInt32) file,
                        file->filename, file->level, file->line));
     if (my_len != file->len) {
       fprintf(stderr, "FATAL ERROR: saved len and current len does not match!\n");
@@ -314,7 +314,7 @@ char *silc_config_get_filename(SilcConfigFile *file)
 
 /* Returns the current line that file parsing arrived at */
 
-uint32 silc_config_get_line(SilcConfigFile *file)
+SilcUInt32 silc_config_get_line(SilcConfigFile *file)
 {
   if (file)
     return file->line;
@@ -324,7 +324,7 @@ uint32 silc_config_get_line(SilcConfigFile *file)
 /* Returns a pointer to the beginning of the requested line.  If the line
  * was not found, NULL is returned */
 
-char *silc_config_read_line(SilcConfigFile *file, uint32 line)
+char *silc_config_read_line(SilcConfigFile *file, SilcUInt32 line)
 {
   register char *p;
   int len;
@@ -367,7 +367,7 @@ static void silc_config_destroy(SilcConfigEntity ent)
 {
   SilcConfigOption *oldopt, *nextopt;
   SILC_CONFIG_DEBUG(("Freeing config entity [ent=0x%x] [opts=0x%x]",
-                       (uint32) ent, (uint32) ent->opts));
+                       (SilcUInt32) ent, (SilcUInt32) ent->opts));
   for (oldopt = ent->opts; oldopt; oldopt = nextopt) {
     nextopt = oldopt->next;
     memset(oldopt->name, 'F', strlen(oldopt->name) + 1);
@@ -388,7 +388,7 @@ bool silc_config_register(SilcConfigEntity ent, const char *name,
 {
   SilcConfigOption *newopt;
   SILC_CONFIG_DEBUG(("Register new option=\"%s\" type=%u cb=0x%08x context=0x%08x",
-               name, type, (uint32) cb, (uint32) context));
+               name, type, (SilcUInt32) cb, (SilcUInt32) context));
 
   /* if we are registering a block, make sure there is a specified sub-table */
   if (!ent || !name || ((type == SILC_CONFIG_ARG_BLOCK) && !subtable))
index b4f5a70482e677b2054f3973f3b131a631ed0e3a..2e70e01f8ca312c09fd02dbd85def28e710feaca 100644 (file)
@@ -143,7 +143,7 @@ typedef enum {
  * SYNOPSIS
  *
  *    typedef int (*SilcConfigCallback)(SilcConfigType type, const char *name,
- *                                      uint32 line, void *val, void *context);
+ *                                      SilcUInt32 line, void *val, void *context);
  * DESCRIPTION
  *
  *    This is the callback prototype for the options handler.  The pointer
@@ -154,7 +154,7 @@ typedef enum {
  *
  ***/
 typedef int (*SilcConfigCallback)(SilcConfigType type, const char *name,
-                                 uint32 line, void *val, void *context);
+                                 SilcUInt32 line, void *val, void *context);
 
 /****s* silcutil/SilcConfigAPI/SilcConfigTable
  *
@@ -249,7 +249,7 @@ typedef struct SilcConfigEntityObject *SilcConfigEntity;
  */
 #define SILC_CONFIG_CALLBACK(func)                             \
 static int func(SilcConfigType type, const char *name,         \
-               uint32 line, void *val, void *context)
+               SilcUInt32 line, void *val, void *context)
 /***/
 
 /* Prototypes */
@@ -338,20 +338,20 @@ char *silc_config_get_filename(SilcConfigFile *file);
  *
  * SYNOPSIS
  *
- *    uint32 silc_config_get_line(SilcConfigFile *file);
+ *    SilcUInt32 silc_config_get_line(SilcConfigFile *file);
  *
  * DESCRIPTION
  *
  *    Returns the current line that file parsing arrived at.
  *
  ***/
-uint32 silc_config_get_line(SilcConfigFile *file);
+SilcUInt32 silc_config_get_line(SilcConfigFile *file);
 
 /****f* silcutil/SilcConfigAPI/silc_config_read_line
  *
  * SYNOPSIS
  *
- *    char *silc_config_read_line(SilcConfigFile *file, uint32 line);
+ *    char *silc_config_read_line(SilcConfigFile *file, SilcUInt32 line);
  *
  * DESCRIPTION
  *
@@ -363,7 +363,7 @@ uint32 silc_config_get_line(SilcConfigFile *file);
  *    silc_config_read_current_line
  *
  ***/
-char *silc_config_read_line(SilcConfigFile *file, uint32 line);
+char *silc_config_read_line(SilcConfigFile *file, SilcUInt32 line);
 
 /****f* silcutil/SilcConfigAPI/silc_config_read_current_line
  *
index 4cb3e2f755a2753b006a24d71e029a93780fa1db..0bb65962fad2774478c7d710d86b55c01ae31027 100644 (file)
@@ -40,14 +40,14 @@ int silc_file_open_mode(const char *filename, int flags, int mode)
 
 /* Reads data from file descriptor `fd' to `buf'. */
 
-int silc_file_read(int fd, unsigned char *buf, uint32 buf_len)
+int silc_file_read(int fd, unsigned char *buf, SilcUInt32 buf_len)
 {
   return read(fd, (void *)buf, buf_len);
 }
 
 /* Writes `buffer' of length of `len' to file descriptor `fd. */
 
-int silc_file_write(int fd, const char *buffer, uint32 len)
+int silc_file_write(int fd, const char *buffer, SilcUInt32 len)
 {
   return write(fd, (const void *)buffer, len);
 }
@@ -61,7 +61,7 @@ int silc_file_close(int fd)
 
 /* Writes a buffer to the file. */
 
-int silc_file_writefile(const char *filename, const char *buffer, uint32 len)
+int silc_file_writefile(const char *filename, const char *buffer, SilcUInt32 len)
 {
   int fd;
         
@@ -86,7 +86,7 @@ int silc_file_writefile(const char *filename, const char *buffer, uint32 len)
    set to the file. */
 
 int silc_file_writefile_mode(const char *filename, const char *buffer, 
-                            uint32 len, int mode)
+                            SilcUInt32 len, int mode)
 {
   int fd;
         
@@ -110,7 +110,7 @@ int silc_file_writefile_mode(const char *filename, const char *buffer,
 /* Reads a file to a buffer. The allocated buffer is returned. Length of
    the file read is returned to the return_len argument. */
 
-char *silc_file_readfile(const char *filename, uint32 *return_len)
+char *silc_file_readfile(const char *filename, SilcUInt32 *return_len)
 {
   int fd;
   char *buffer;
@@ -161,7 +161,7 @@ char *silc_file_readfile(const char *filename, uint32 *return_len)
 
 /* Returns files size. Returns 0 on error. */
 
-uint64 silc_file_size(const char *filename)
+SilcUInt64 silc_file_size(const char *filename)
 {
   int ret;
   struct stat stats;
@@ -174,5 +174,5 @@ uint64 silc_file_size(const char *filename)
   if (ret < 0)
     return 0;
 
-  return (uint64)stats.st_size;
+  return (SilcUInt64)stats.st_size;
 }
index 8f717b6a00bf511cdf2c9152667d65a95b393ec6..76892b275d89ce816f868dc770a4c3a41c013072 100644 (file)
 
 int silc_file_open(const char *filename, int flags);
 int silc_file_open_mode(const char *filename, int flags, int mode);
-int silc_file_read(int fd, unsigned char *buf, uint32 buf_len);
-int silc_file_write(int fd, const char *buffer, uint32 len);
+int silc_file_read(int fd, unsigned char *buf, SilcUInt32 buf_len);
+int silc_file_write(int fd, const char *buffer, SilcUInt32 len);
 int silc_file_close(int fd);
-char *silc_file_readfile(const char *filename, uint32 *return_len);
-int silc_file_writefile(const char *filename, const char *buffer, uint32 len);
+char *silc_file_readfile(const char *filename, SilcUInt32 *return_len);
+int silc_file_writefile(const char *filename, const char *buffer, SilcUInt32 len);
 int silc_file_writefile_mode(const char *filename, const char *buffer, 
-                            uint32 len, int mode);
-uint64 silc_file_size(const char *filename);
+                            SilcUInt32 len, int mode);
+SilcUInt64 silc_file_size(const char *filename);
 
 #endif /* SILCFILEUTIL_H */
index 8cd5530d53814d24dccf5b86f116a8d4261ef031..d7bca802f7cd99575a29cd98797433ce5ddeb5fc 100644 (file)
@@ -64,8 +64,8 @@ typedef struct SilcHashTableEntryStruct {
 /* Hash table. */
 struct SilcHashTableStruct {
   SilcHashTableEntry *table;
-  uint32 table_size;
-  uint32 entry_count;
+  SilcUInt32 table_size;
+  SilcUInt32 entry_count;
   SilcHashFunction hash;
   SilcHashCompare compare;
   SilcHashDestructor destructor;
@@ -77,7 +77,7 @@ struct SilcHashTableStruct {
 
 /* Prime sizes for the hash table. The size of the table will always
    be one of these. */
-const uint32 primesize[42] = 
+const SilcUInt32 primesize[42] = 
 {
   1, 3, 5, 11, 17, 37, 67, 109, 131, 163, 257, 367, 521, 823, 1031, 
   1237, 2053, 2777, 4099, 6247, 8209, 14057, 16411, 21089, 32771, 47431,
@@ -87,7 +87,7 @@ const uint32 primesize[42] =
 
 /* Find appropriate size for the hash table. The size will be a prime. */
 
-static uint32 silc_hash_table_primesize(uint32 size, uint32 *index)
+static SilcUInt32 silc_hash_table_primesize(SilcUInt32 size, SilcUInt32 *index)
 {
   int i;
 
@@ -114,7 +114,7 @@ silc_hash_table_find_internal(SilcHashTable ht, void *key,
                              void *compare_user_context)
 {
   SilcHashTableEntry *entry, prev = NULL;
-  uint32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context);
+  SilcUInt32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context);
 
   SILC_HT_DEBUG(("index %d key %p", i, key));
 
@@ -148,7 +148,7 @@ silc_hash_table_find_internal_context(SilcHashTable ht, void *key,
                                      void *compare_user_context)
 {
   SilcHashTableEntry *entry, prev = NULL;
-  uint32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context);
+  SilcUInt32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context);
 
   SILC_HT_DEBUG(("index %d key %p context %p", i, key, context));
 
@@ -184,7 +184,7 @@ silc_hash_table_find_internal_simple(SilcHashTable ht, void *key,
                                     void *compare_user_context)
 {
   SilcHashTableEntry *entry;
-  uint32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context);
+  SilcUInt32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context);
 
   SILC_HT_DEBUG(("index %d key %p", i, key));
 
@@ -215,7 +215,7 @@ silc_hash_table_find_internal_all(SilcHashTable ht, void *key,
 {
   SilcHashTableEntry *entry, *tmp;
   bool auto_rehash;
-  uint32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context);
+  SilcUInt32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context);
 
   SILC_HT_DEBUG(("index %d key %p", i, key));
 
@@ -258,7 +258,7 @@ silc_hash_table_add_internal(SilcHashTable ht, void *key, void *context,
                             void *hash_user_context)
 {
   SilcHashTableEntry *entry;
-  uint32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context);
+  SilcUInt32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context);
 
   SILC_HT_DEBUG(("index %d key %p", i, key));
 
@@ -302,7 +302,7 @@ silc_hash_table_replace_internal(SilcHashTable ht, void *key, void *context,
                                 void *hash_user_context)
 {
   SilcHashTableEntry *entry;
-  uint32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context);
+  SilcUInt32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context);
 
   SILC_HT_DEBUG(("index %d key %p", i, key));
 
@@ -334,7 +334,7 @@ silc_hash_table_replace_internal(SilcHashTable ht, void *key, void *context,
    destructor function, respectively. The `hash' is mandatory, the others
    are optional. */
 
-SilcHashTable silc_hash_table_alloc(uint32 table_size, 
+SilcHashTable silc_hash_table_alloc(SilcUInt32 table_size, 
                                    SilcHashFunction hash,
                                    void *hash_user_context,
                                    SilcHashCompare compare,
@@ -344,7 +344,7 @@ SilcHashTable silc_hash_table_alloc(uint32 table_size,
                                    bool auto_rehash)
 {
   SilcHashTable ht;
-  uint32 size_index = SILC_HASH_TABLE_SIZE;
+  SilcUInt32 size_index = SILC_HASH_TABLE_SIZE;
 
   if (!hash)
     return NULL;
@@ -391,7 +391,7 @@ void silc_hash_table_free(SilcHashTable ht)
 
 /* Returns the size of the hash table */
 
-uint32 silc_hash_table_size(SilcHashTable ht)
+SilcUInt32 silc_hash_table_size(SilcHashTable ht)
 {
   return primesize[ht->table_size];
 }
@@ -400,7 +400,7 @@ uint32 silc_hash_table_size(SilcHashTable ht)
    entries in the table thatn the size of the hash table calling the
    silc_hash_table_rehash is recommended. */
 
-uint32 silc_hash_table_count(SilcHashTable ht)
+SilcUInt32 silc_hash_table_count(SilcHashTable ht)
 {
   return ht->entry_count;
 }
@@ -751,11 +751,11 @@ void silc_hash_table_foreach(SilcHashTable ht, SilcHashForeach foreach,
    the new table of a suitable size. Note that this operation may be
    very slow. */
 
-void silc_hash_table_rehash(SilcHashTable ht, uint32 new_size)
+void silc_hash_table_rehash(SilcHashTable ht, SilcUInt32 new_size)
 {
   int i;
   SilcHashTableEntry *table, e, tmp;
-  uint32 table_size, size_index;
+  SilcUInt32 table_size, size_index;
 
   SILC_HT_DEBUG(("Start"));
 
@@ -797,13 +797,13 @@ void silc_hash_table_rehash(SilcHashTable ht, uint32 new_size)
 
 /* Same as above but with specific hash function. */
 
-void silc_hash_table_rehash_ext(SilcHashTable ht, uint32 new_size,
+void silc_hash_table_rehash_ext(SilcHashTable ht, SilcUInt32 new_size,
                                SilcHashFunction hash, 
                                void *hash_user_context)
 {
   int i;
   SilcHashTableEntry *table, e, tmp;
-  uint32 table_size, size_index;
+  SilcUInt32 table_size, size_index;
 
   SILC_HT_DEBUG(("Start"));
 
index 9c4c823cc035a24eaff48574eafe69ed3d6695b6..2b186c957301757bb095b634dfc95d7aa0b58c1d 100644 (file)
@@ -89,7 +89,7 @@ typedef struct SilcHashTableListStruct SilcHashTableList;
 struct SilcHashTableListStruct {
   SilcHashTable ht;
   void *entry;
-  uint32 index;
+  SilcUInt32 index;
   bool auto_rehash;
 };
 /***/
@@ -98,7 +98,7 @@ struct SilcHashTableListStruct {
  *
  * SYNOPSIS
  *
- *    typedef uint32 (*SilcHashFunction)(void *key, void *user_context);
+ *    typedef SilcUInt32 (*SilcHashFunction)(void *key, void *user_context);
  *
  * DESCRIPTION
  *
@@ -108,7 +108,7 @@ struct SilcHashTableListStruct {
  *    to the callback.
  *
  ***/
-typedef uint32 (*SilcHashFunction)(void *key, void *user_context);
+typedef SilcUInt32 (*SilcHashFunction)(void *key, void *user_context);
 
 /****f* silcutil/SilcHashTableAPI/SilcHashCompare
  *
@@ -168,7 +168,7 @@ typedef void (*SilcHashForeach)(void *key, void *context, void *user_context);
  *
  * SYNOPSIS
  *
- *    SilcHashTable silc_hash_table_alloc(uint32 table_size, 
+ *    SilcHashTable silc_hash_table_alloc(SilcUInt32 table_size, 
  *                                        SilcHashFunction hash,
  *                                        void *hash_user_context,
  *                                        SilcHashCompare compare,
@@ -188,7 +188,7 @@ typedef void (*SilcHashForeach)(void *key, void *context, void *user_context);
  *    are optional.
  *
  ***/
-SilcHashTable silc_hash_table_alloc(uint32 table_size, 
+SilcHashTable silc_hash_table_alloc(SilcUInt32 table_size, 
                                    SilcHashFunction hash,
                                    void *hash_user_context,
                                    SilcHashCompare compare,
@@ -215,7 +215,7 @@ void silc_hash_table_free(SilcHashTable ht);
  *
  * SYNOPSIS
  *
- *    uint32 silc_hash_table_size(SilcHashTable ht);
+ *    SilcUInt32 silc_hash_table_size(SilcHashTable ht);
  *
  * DESCRIPTION
  *
@@ -223,13 +223,13 @@ void silc_hash_table_free(SilcHashTable ht);
  *    hash table.
  *
  ***/
-uint32 silc_hash_table_size(SilcHashTable ht);
+SilcUInt32 silc_hash_table_size(SilcHashTable ht);
 
 /****f* silcutil/SilcHashTableAPI/silc_hash_table_count
  *
  * SYNOPSIS
  *
- *    uint32 silc_hash_table_count(SilcHashTable ht);
+ *    SilcUInt32 silc_hash_table_count(SilcHashTable ht);
  *
  * DESCRIPTION
  *
@@ -238,7 +238,7 @@ uint32 silc_hash_table_size(SilcHashTable ht);
  *    silc_hash_table_rehash is recommended.
  *
  ***/
-uint32 silc_hash_table_count(SilcHashTable ht);
+SilcUInt32 silc_hash_table_count(SilcHashTable ht);
 
 /****f* silcutil/SilcHashTableAPI/silc_hash_table_add
  *
@@ -375,7 +375,7 @@ void silc_hash_table_foreach(SilcHashTable ht, SilcHashForeach foreach,
  *
  * SYNOPSIS
  *
- *    void silc_hash_table_rehash(SilcHashTable ht, uint32 new_size);
+ *    void silc_hash_table_rehash(SilcHashTable ht, SilcUInt32 new_size);
  *
  * DESCRIPTION
  *
@@ -385,7 +385,7 @@ void silc_hash_table_foreach(SilcHashTable ht, SilcHashForeach foreach,
  *    very slow.
  *
  ***/
-void silc_hash_table_rehash(SilcHashTable ht, uint32 new_size);
+void silc_hash_table_rehash(SilcHashTable ht, SilcUInt32 new_size);
 
 /****f* silcutil/SilcHashTableAPI/silc_hash_table_list
  *
@@ -635,7 +635,7 @@ void silc_hash_table_find_foreach_ext(SilcHashTable ht, void *key,
  *
  * SYNOPSIS
  *
- *    void silc_hash_table_rehash_ext(SilcHashTable ht, uint32 new_size,
+ *    void silc_hash_table_rehash_ext(SilcHashTable ht, SilcUInt32 new_size,
  *                                    SilcHashFunction hash, 
  *                                    void *hash_user_context);
  *
@@ -650,7 +650,7 @@ void silc_hash_table_find_foreach_ext(SilcHashTable ht, void *key,
  *    function. If not provided the hash table's default is used.
  *
  ***/
-void silc_hash_table_rehash_ext(SilcHashTable ht, uint32 new_size,
+void silc_hash_table_rehash_ext(SilcHashTable ht, SilcUInt32 new_size,
                                SilcHashFunction hash, 
                                void *hash_user_context);
 
index 6095910a699627432ec6a8823cf288afede1eff9..b415c664d1eecc3ed45b0b6829da2895f859c206 100644 (file)
@@ -32,7 +32,7 @@
 struct SilcLogStruct {
   char *filename;
   FILE *fp;
-  uint32 maxsize;
+  SilcUInt32 maxsize;
   char *typename;
   SilcLogType type;
   SilcLogCb cb;
@@ -241,7 +241,7 @@ char *silc_log_get_file(SilcLogType type)
 }
 
 /* Set and initialize the specified logging channel. See the API reference */
-bool silc_log_set_file(SilcLogType type, char *filename, uint32 maxsize,
+bool silc_log_set_file(SilcLogType type, char *filename, SilcUInt32 maxsize,
                       SilcSchedule scheduler)
 {
   FILE *fp = NULL;
@@ -367,7 +367,7 @@ void silc_log_output_debug(char *file, char *function,
 
 void silc_log_output_hexdump(char *file, char *function,
                             int line, void *data_in,
-                            uint32 len, char *string)
+                            SilcUInt32 len, char *string)
 {
   int i, k;
   int off, pos, count;
index 46db324914fa995737d8c07e6ad52b7fe9eb459c..01425a89c859473a71f336317d48f9d95121f1e5 100644 (file)
@@ -116,7 +116,7 @@ typedef bool (*SilcLogDebugCb)(char *file, char *function, int line,
  * SYNOPSIS
  *
  *    typedef bool (*SilcDebugHexdumpCb)(char *file, char *function, int line,
- *                                       unsigned char *data, uint32 data_len,
+ *                                       unsigned char *data, SilcUInt32 data_len,
  *                                       char *message, void *context;
  *
  * DESCRIPTION
@@ -137,7 +137,7 @@ typedef bool (*SilcLogDebugCb)(char *file, char *function, int line,
  *
  ***/
 typedef bool (*SilcLogHexdumpCb)(char *file, char *function, int line,
-                                unsigned char *data, uint32 data_len,
+                                unsigned char *data, SilcUInt32 data_len,
                                 char *message, void *context);
 
 /* Global Variables */
@@ -421,7 +421,7 @@ char *silc_log_get_file(SilcLogType type);
  *
  * SYNOPSIS
  *
- *    bool silc_log_set_file(SilcLogType type, char *filename, uint32 maxsize,
+ *    bool silc_log_set_file(SilcLogType type, char *filename, SilcUInt32 maxsize,
  *                           SilcSchedule scheduler);
  *
  * DESCRIPTION
@@ -436,7 +436,7 @@ char *silc_log_get_file(SilcLogType type);
  *    buffered output and thus to save HD activity.
  *
  ***/
-bool silc_log_set_file(SilcLogType type, char *filename, uint32 maxsize,
+bool silc_log_set_file(SilcLogType type, char *filename, SilcUInt32 maxsize,
                       SilcSchedule scheduler);
 
 /****f* silcutil/SilcLogAPI/silc_log_set_callback
@@ -537,7 +537,7 @@ void silc_log_output_debug(char *file, char *function,
  *
  *    void silc_log_output_hexdump(char *file, char *function,
  *                                 int line, void *data_in,
- *                                 uint32 len, char *string);
+ *                                 SilcUInt32 len, char *string);
  *
  * DESCRIPTION
  *
@@ -551,7 +551,7 @@ void silc_log_output_debug(char *file, char *function,
  ***/
 void silc_log_output_hexdump(char *file, char *function,
                             int line, void *data_in,
-                            uint32 len, char *string);
+                            SilcUInt32 len, char *string);
 
 /****f* silcutil/SilcLogAPI/silc_log_set_debug_callbacks
  *
index 630f93292d485b5ebc39ef35b21c161f20f7ffd3..da0635952b313189308f881916f83a7aa3165e6b 100644 (file)
@@ -145,7 +145,7 @@ static void *silc_net_gethostbyaddr_thread(void *context)
 /* Resolves IP address for hostname. */
 
 bool silc_net_gethostbyname(const char *name, bool prefer_ipv6, char *address, 
-                           uint32 address_len)
+                           SilcUInt32 address_len)
 {
 #ifdef HAVE_IPV6
   struct addrinfo hints, *ai, *tmp, *ip4 = NULL, *ip6 = NULL;
@@ -226,7 +226,7 @@ void silc_net_gethostbyname_async(const char *name,
 
 /* Resolves hostname by IP address. */
 
-bool silc_net_gethostbyaddr(const char *addr, char *name, uint32 name_len)
+bool silc_net_gethostbyaddr(const char *addr, char *name, SilcUInt32 name_len)
 {
 #ifdef HAVE_IPV6
   struct addrinfo req, *ai;
@@ -406,7 +406,7 @@ bool silc_net_check_local_by_sock(int sock, char **hostname, char **ip)
 
 /* Return remote port by socket. */
 
-uint16 silc_net_get_remote_port(int sock)
+SilcUInt16 silc_net_get_remote_port(int sock)
 {
 #ifdef HAVE_IPV6
   struct sockaddr_storage remote;
@@ -438,7 +438,7 @@ uint16 silc_net_get_remote_port(int sock)
 
 /* Return local port by socket. */
 
-uint16 silc_net_get_local_port(int sock)
+SilcUInt16 silc_net_get_local_port(int sock)
 {
 #ifdef HAVE_IPV6
   struct sockaddr_storage local;
index 3001ff260ea427d25662ec2e63534765475f4527..931b3d82fe38aa3554d5eab688f97250ba51ff90 100644 (file)
@@ -221,7 +221,7 @@ bool silc_net_is_ip(const char *addr);
  *
  * SYNOPSIS
  *
- *    bool silc_net_addr2bin(const char *addr, void *bin, uint32 bin_len);
+ *    bool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len);
  *
  * DESCRIPTION
  *
@@ -230,7 +230,7 @@ bool silc_net_is_ip(const char *addr);
  *    IPv4 or IPv6 address.
  *
  ***/
-bool silc_net_addr2bin(const char *addr, void *bin, uint32 bin_len);
+bool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len);
 
 /****f* silcutil/SilcNetAPI/SilcNetResolveCallback
  *
@@ -253,7 +253,7 @@ typedef void (*SilcNetResolveCallback)(const char *result, void *context);
  * SYNOPSIS
  *
  *    bool silc_net_gethostbyname(const char *name, bool prefer_ipv6, 
- *                                char *address, uint32 address_len);
+ *                                char *address, SilcUInt32 address_len);
  *
  * DESCRIPTION
  *
@@ -267,7 +267,7 @@ typedef void (*SilcNetResolveCallback)(const char *result, void *context);
  *
  ***/
 bool silc_net_gethostbyname(const char *name, bool prefer_ipv6, char *address, 
-                           uint32 address_len);
+                           SilcUInt32 address_len);
 
 /****f* silcutil/SilcNetAPI/silc_net_gethostbyname_async
  *
@@ -302,7 +302,7 @@ void silc_net_gethostbyname_async(const char *name,
  * SYNOPSIS
  *
  *   bool silc_net_gethostbyaddr(const char *addr, char *name, 
- *                               uint32 name_len);
+ *                               SilcUInt32 name_len);
  *
  * DESCRIPTION
  *
@@ -312,7 +312,7 @@ void silc_net_gethostbyname_async(const char *name,
  *    This is synchronous function and will block the calling process.
  *
  ***/
-bool silc_net_gethostbyaddr(const char *addr, char *name, uint32 name_len);
+bool silc_net_gethostbyaddr(const char *addr, char *name, SilcUInt32 name_len);
 
 /****f* silcutil/SilcNetAPI/silc_net_gethostbyaddr_async
  *
@@ -368,27 +368,27 @@ bool silc_net_check_local_by_sock(int sock, char **hostname, char **ip);
  *
  * SYNOPSIS
  *
- *    uint16 silc_net_get_remote_port(int sock);
+ *    SilcUInt16 silc_net_get_remote_port(int sock);
  *
  * DESCRIPTION
  *
  *    Return remote port by socket.
  *
  ***/
-uint16 silc_net_get_remote_port(int sock);
+SilcUInt16 silc_net_get_remote_port(int sock);
 
 /****f* silcutil/SilcNetAPI/silc_net_get_local_port
  *
  * SYNOPSIS
  *
- *    uint16 silc_net_get_local_port(int sock);
+ *    SilcUInt16 silc_net_get_local_port(int sock);
  *
  * DESCRIPTION
  *
  *    Return local port by socket.
  *
  ***/
-uint16 silc_net_get_local_port(int sock);
+SilcUInt16 silc_net_get_local_port(int sock);
 
 /****f* silcutil/SilcNetAPI/silc_net_localhost
  *
index 4084371e9a76dd11573a7c851aa661ab33d5e23c..884091838213d1b0f92dbf7600b0fcb66e33780a 100644 (file)
@@ -28,7 +28,7 @@ typedef struct SilcTaskQueueStruct *SilcTaskQueue;
 /* System specific routines. Implemented under unix/ and win32/. */
 
 /* System specific select(). Returns same values as normal select(). */
-int silc_select(SilcScheduleFd fds, uint32 fds_count, struct timeval *timeout);
+int silc_select(SilcScheduleFd fds, SilcUInt32 fds_count, struct timeval *timeout);
 
 /* Initializes the wakeup of the scheduler. In multi-threaded environment
    the scheduler needs to be wakenup when tasks are added or removed from
@@ -49,7 +49,7 @@ void silc_schedule_wakeup_internal(void *context);
 
 static void silc_task_queue_alloc(SilcTaskQueue *queue);
 static void silc_task_queue_free(SilcTaskQueue queue);
-static SilcTask silc_task_find(SilcTaskQueue queue, uint32 fd);
+static SilcTask silc_task_find(SilcTaskQueue queue, SilcUInt32 fd);
 static SilcTask silc_task_add(SilcTaskQueue queue, SilcTask newtask, 
                              SilcTaskPriority priority);
 static SilcTask silc_task_get_first(SilcTaskQueue queue, SilcTask first);
@@ -61,7 +61,7 @@ static int silc_schedule_task_timeout_compare(struct timeval *smaller,
 static void silc_task_del_by_context(SilcTaskQueue queue, void *context);
 static void silc_task_del_by_callback(SilcTaskQueue queue,
                                      SilcTaskCallback callback);
-static void silc_task_del_by_fd(SilcTaskQueue queue, uint32 fd);
+static void silc_task_del_by_fd(SilcTaskQueue queue, SilcUInt32 fd);
 
 /* Returns the task queue by task type */
 #define SILC_SCHEDULE_GET_QUEUE(type)                                  \
@@ -71,7 +71,7 @@ static void silc_task_del_by_fd(SilcTaskQueue queue, uint32 fd);
 
 /* SILC Task object. Represents one task in the scheduler. */
 struct SilcTaskStruct {
-  uint32 fd;
+  SilcUInt32 fd;
   struct timeval timeout;
   SilcTaskCallback callback;
   void *context;
@@ -131,8 +131,8 @@ struct SilcTaskQueueStruct {
        List of file descriptors the scheduler is supposed to be listenning.
        This is updated internally.
 
-   uint32 max_fd
-   uint32 last_fd
+   SilcUInt32 max_fd
+   SilcUInt32 last_fd
 
        Size of the fd_list list. There can be `max_fd' many tasks in
        the scheduler at once. The `last_fd' is the last valid entry
@@ -172,8 +172,8 @@ struct SilcScheduleStruct {
   SilcTaskQueue timeout_queue;
   SilcTaskQueue generic_queue;
   SilcScheduleFd fd_list;
-  uint32 max_fd;
-  uint32 last_fd;
+  SilcUInt32 max_fd;
+  SilcUInt32 last_fd;
   struct timeval *timeout;
   bool valid;
   void *wakeup;
@@ -284,7 +284,7 @@ static void silc_schedule_dispatch_nontimeout(SilcSchedule schedule)
 {
   SilcTask task;
   int i, last_fd = schedule->last_fd;
-  uint32 fd;
+  SilcUInt32 fd;
 
   for (i = 0; i <= last_fd; i++) {
     if (schedule->fd_list[i].events == 0)
@@ -621,7 +621,7 @@ void silc_schedule_wakeup(SilcSchedule schedule)
 
 /* Add new task to the scheduler */
 
-SilcTask silc_schedule_task_add(SilcSchedule schedule, uint32 fd,
+SilcTask silc_schedule_task_add(SilcSchedule schedule, SilcUInt32 fd,
                                SilcTaskCallback callback, void *context, 
                                long seconds, long useconds, 
                                SilcTaskType type, 
@@ -757,7 +757,7 @@ void silc_schedule_task_del(SilcSchedule schedule, SilcTask task)
 
 /* Remove task by fd */
 
-void silc_schedule_task_del_by_fd(SilcSchedule schedule, uint32 fd)
+void silc_schedule_task_del_by_fd(SilcSchedule schedule, SilcUInt32 fd)
 {
   SILC_LOG_DEBUG(("Unregister task by fd %d", fd));
 
@@ -793,7 +793,7 @@ void silc_schedule_task_del_by_context(SilcSchedule schedule, void *context)
    one file descriptor to set different iomasks. */
 
 void silc_schedule_set_listen_fd(SilcSchedule schedule,
-                                uint32 fd, SilcTaskEvent iomask)
+                                SilcUInt32 fd, SilcTaskEvent iomask)
 {
   int i;
   bool found = FALSE;
@@ -825,7 +825,7 @@ void silc_schedule_set_listen_fd(SilcSchedule schedule,
 
 /* Removes a file descriptor from listen list. */
 
-void silc_schedule_unset_listen_fd(SilcSchedule schedule, uint32 fd)
+void silc_schedule_unset_listen_fd(SilcSchedule schedule, SilcUInt32 fd)
 {
   int i;
 
@@ -863,7 +863,7 @@ static void silc_task_queue_free(SilcTaskQueue queue)
 
 /* Return task by its fd. */
 
-static SilcTask silc_task_find(SilcTaskQueue queue, uint32 fd)
+static SilcTask silc_task_find(SilcTaskQueue queue, SilcUInt32 fd)
 {
   SilcTask next;
 
@@ -1147,7 +1147,7 @@ static int silc_schedule_task_timeout_compare(struct timeval *smaller,
   return FALSE;
 }
 
-static void silc_task_del_by_fd(SilcTaskQueue queue, uint32 fd)
+static void silc_task_del_by_fd(SilcTaskQueue queue, SilcUInt32 fd)
 {
   SilcTask next;
 
index eb0e0fbce1a92b08d1b60423310a494bcc19684c..b0e315fda678cb64bd727b3c2348587ecd4e52bd 100644 (file)
@@ -204,7 +204,7 @@ typedef enum {
  * SYNOPSIS
  *
  *    typedef void (*SilcTaskCallback)(SilcSchedule schedule, 
- *                                     SilcTaskEvent type, uint32 fd, 
+ *                                     SilcTaskEvent type, SilcUInt32 fd, 
  *                                     void *context);
  *
  * DESCRIPTION
@@ -224,7 +224,7 @@ typedef enum {
  *
  ***/
 typedef void (*SilcTaskCallback)(SilcSchedule schedule, SilcTaskEvent type,
-                                uint32 fd, void *context);
+                                SilcUInt32 fd, void *context);
 
 /* Macros */
 
@@ -259,7 +259,7 @@ typedef void (*SilcTaskCallback)(SilcSchedule schedule, SilcTaskEvent type,
  */
 #define SILC_TASK_CALLBACK(func)                               \
 static void func(SilcSchedule schedule, SilcTaskEvent type,    \
-                uint32 fd, void *context)
+                SilcUInt32 fd, void *context)
 /***/
 
 /****d* silcutil/SilcScheduleAPI/SILC_TASK_CALLBACK_GLOBAL
@@ -279,7 +279,7 @@ static void func(SilcSchedule schedule, SilcTaskEvent type, \
  */
 #define SILC_TASK_CALLBACK_GLOBAL(func)                        \
 void func(SilcSchedule schedule, SilcTaskEvent type,   \
-         uint32 fd, void *context)
+         SilcUInt32 fd, void *context)
 /***/
 
 /* Prototypes */
@@ -409,7 +409,7 @@ void silc_schedule_wakeup(SilcSchedule schedule);
  *
  * SYNOPSIS
  *
- *    SilcTask silc_schedule_task_add(SilcSchedule schedule, uint32 fd,
+ *    SilcTask silc_schedule_task_add(SilcSchedule schedule, SilcUInt32 fd,
  *                                    SilcTaskCallback callback, 
  *                                    void *context, 
  *                                    long seconds, long useconds, 
@@ -448,7 +448,7 @@ void silc_schedule_wakeup(SilcSchedule schedule);
  *    in other threads as well.
  *   
  ***/
-SilcTask silc_schedule_task_add(SilcSchedule schedule, uint32 fd,
+SilcTask silc_schedule_task_add(SilcSchedule schedule, SilcUInt32 fd,
                                SilcTaskCallback callback, void *context, 
                                long seconds, long useconds, 
                                SilcTaskType type, 
@@ -478,7 +478,7 @@ void silc_schedule_task_del(SilcSchedule schedule, SilcTask task);
  *
  * SYNOPSIS
  *
- *    void silc_schedule_task_del_by_fd(SilcSchedule schedule, uint32 fd);
+ *    void silc_schedule_task_del_by_fd(SilcSchedule schedule, SilcUInt32 fd);
  *
  * DESCRIPTION
  *
@@ -492,7 +492,7 @@ void silc_schedule_task_del(SilcSchedule schedule, SilcTask task);
  *    since generic tasks does not match any specific fd.
  *
  ***/
-void silc_schedule_task_del_by_fd(SilcSchedule schedule, uint32 fd);
+void silc_schedule_task_del_by_fd(SilcSchedule schedule, SilcUInt32 fd);
 
 /****f* silcutil/SilcScheduleAPI/silc_schedule_task_del_by_callback
  *
@@ -536,7 +536,7 @@ void silc_schedule_task_del_by_context(SilcSchedule schedule, void *context);
  *
  * SYNOPSIS
  *
- *    void silc_schedule_set_listen_fd(SilcSchedule schedule, uint32 fd,
+ *    void silc_schedule_set_listen_fd(SilcSchedule schedule, SilcUInt32 fd,
  *                                     SilcTaskEvent mask);
  *
  * DESCRIPTION
@@ -551,14 +551,14 @@ void silc_schedule_task_del_by_context(SilcSchedule schedule, void *context);
  *    times to change the events.
  *
  ***/
-void silc_schedule_set_listen_fd(SilcSchedule schedule, uint32 fd,
+void silc_schedule_set_listen_fd(SilcSchedule schedule, SilcUInt32 fd,
                                 SilcTaskEvent mask);
 
 /****f* silcutil/SilcScheduleAPI/silc_schedule_unset_listen_fd
  *
  * SYNOPSIS
  *
- *    void silc_schedule_unset_listen_fd(SilcSchedule schedule, uint32 fd);
+ *    void silc_schedule_unset_listen_fd(SilcSchedule schedule, SilcUInt32 fd);
  *
  * DESCRIPTION
  *
@@ -567,6 +567,6 @@ void silc_schedule_set_listen_fd(SilcSchedule schedule, uint32 fd,
  *    after calling this function.
  *
  ***/
-void silc_schedule_unset_listen_fd(SilcSchedule schedule, uint32 fd);
+void silc_schedule_unset_listen_fd(SilcSchedule schedule, SilcUInt32 fd);
 
 #endif
index b3a2c92474ad4937e9acd8229183441fbca256d8..a1db680eb5c7a01bdceae04dc5d2d5f3f25eb1e5 100644 (file)
 /* Schedule FD structure. Includes the file descriptors that the scheduler
    will listen. This is given as argument to the silc_select function. */
 typedef struct {
-  uint32 fd;                   /* The file descriptor (or handle on WIN32) */
-  uint16 events;               /* Mask of task events, if events is 0 then
+  SilcUInt32 fd;                       /* The file descriptor (or handle on WIN32) */
+  SilcUInt16 events;           /* Mask of task events, if events is 0 then
                                   the fd must be omitted. */
-  uint16 revents;              /* Returned events mask */
+  SilcUInt16 revents;          /* Returned events mask */
 } *SilcScheduleFd;
 
 #endif
index e6a81a5907483ffabdd5daad368850c2b48ce819..ad07a2b6cbb9943c8b9cef5b1fe1d32fcd4601a4 100644 (file)
@@ -23,7 +23,7 @@
 
 /* Heartbeat context */
 struct SilcSocketConnectionHBStruct {
-  uint32 heartbeat;
+  SilcUInt32 heartbeat;
   SilcSocketConnectionHBCb hb_callback;
   void *hb_context;
   SilcSchedule schedule;
@@ -123,7 +123,7 @@ SILC_TASK_CALLBACK(silc_socket_heartbeat)
    `schedule' is the application's scheduler. */
 
 void silc_socket_set_heartbeat(SilcSocketConnection sock, 
-                              uint32 heartbeat,
+                              SilcUInt32 heartbeat,
                               void *hb_context,
                               SilcSocketConnectionHBCb hb_callback,
                               SilcSchedule schedule)
index ff52501646aa91628fa00b2925b43d77e1894f3b..ea47d3da1e0b716847b88c90fdf404aea3e7a018 100644 (file)
@@ -142,7 +142,7 @@ typedef enum {
  *      Protocol object for the socket. Currently only one protocol can be
  *      executing at a time for a particular socket.
  *
- *    uint32 flags
+ *    SilcUInt32 flags
  *
  *      Socket flags that indicate the status of the socket. This can
  *      indicate several different status that can affect the use of the
@@ -155,7 +155,7 @@ typedef enum {
  *
  *    char *hostname
  *    char *ip
- *    uint16 port
+ *    SilcUInt16 port
  *
  *      Resolved hostname, IP address and port of the connection who owns
  *      this object.
@@ -178,13 +178,13 @@ struct SilcSocketConnectionStruct {
   SilcSocketType type;
   void *user_data;
   SilcProtocol protocol;
-  uint32 flags;
-  uint8 sock_error;
+  SilcUInt32 flags;
+  SilcUInt8 sock_error;
   int users;
 
   char *hostname;
   char *ip;
-  uint16 port;
+  SilcUInt16 port;
 
   SilcBuffer inbuf;
   SilcBuffer outbuf;
@@ -319,7 +319,7 @@ int silc_socket_write(SilcSocketConnection sock);
  * SYNOPSIS
  *
  *    bool silc_socket_get_error(SilcSocketConnection sock, char *error,
- *                               uint32 error_len);
+ *                               SilcUInt32 error_len);
  *
  * DESCRIPTION
  *
@@ -329,7 +329,7 @@ int silc_socket_write(SilcSocketConnection sock);
  *
  ***/
 bool silc_socket_get_error(SilcSocketConnection sock, char *error,
-                          uint32 error_len);
+                          SilcUInt32 error_len);
 
 /****f* silcutil/SilcSocketConnectionAPI/SilcSocketConnectionHBCb
  *
@@ -353,7 +353,7 @@ typedef void (*SilcSocketConnectionHBCb)(SilcSocketConnection sock,
  * SYNOPSIS
  *
  *    void silc_socket_set_heartbeat(SilcSocketConnection sock, 
- *                                   uint32 heartbeat,
+ *                                   SilcUInt32 heartbeat,
  *                                   void *hb_context,
  *                                   SilcSocketConnectionHBCb hb_callback,
  *                                   SilcSchedule schedule);
@@ -370,7 +370,7 @@ typedef void (*SilcSocketConnectionHBCb)(SilcSocketConnection sock,
  *
  ***/
 void silc_socket_set_heartbeat(SilcSocketConnection sock, 
-                              uint32 heartbeat,
+                              SilcUInt32 heartbeat,
                               void *hb_context,
                               SilcSocketConnectionHBCb hb_callback,
                               SilcSchedule schedule);
index 2cf26fe92df9f0011cd3b36b95e07e4f7a246391..c3af592539a49d72b430f572c80cea7b40e4b307 100644 (file)
@@ -112,10 +112,10 @@ static unsigned char pem_enc[64] =
    data string. Note: This is originally public domain code and is 
    still PD. */
 
-char *silc_encode_pem(unsigned char *data, uint32 len)
+char *silc_encode_pem(unsigned char *data, SilcUInt32 len)
 {
   int i, j;
-  uint32 bits, c, char_count;
+  SilcUInt32 bits, c, char_count;
   char *pem;
 
   char_count = 0;
@@ -160,10 +160,10 @@ char *silc_encode_pem(unsigned char *data, uint32 len)
 
 /* Same as above but puts newline ('\n') every 72 characters. */
 
-char *silc_encode_pem_file(unsigned char *data, uint32 data_len)
+char *silc_encode_pem_file(unsigned char *data, SilcUInt32 data_len)
 {
   int i, j;
-  uint32 len, cols;
+  SilcUInt32 len, cols;
   char *pem, *pem2;
 
   pem = silc_encode_pem(data, data_len);
@@ -189,11 +189,11 @@ char *silc_encode_pem_file(unsigned char *data, uint32 data_len)
 /* Decodes PEM into data. Returns the decoded data. Note: This is
    originally public domain code and is still PD. */
 
-unsigned char *silc_decode_pem(unsigned char *pem, uint32 pem_len,
-                              uint32 *ret_len)
+unsigned char *silc_decode_pem(unsigned char *pem, SilcUInt32 pem_len,
+                              SilcUInt32 *ret_len)
 {
   int i, j;
-  uint32 len, c, char_count, bits;
+  SilcUInt32 len, c, char_count, bits;
   unsigned char *data;
   static char ialpha[256], decoder[256];
 
@@ -260,7 +260,7 @@ unsigned char *silc_decode_pem(unsigned char *pem, uint32 pem_len,
 
 bool silc_parse_userfqdn(const char *string, char **left, char **right)
 {
-  uint32 tlen;
+  SilcUInt32 tlen;
 
   if (!string)
     return FALSE;
@@ -298,10 +298,10 @@ 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)
 {
   int i, len = 0;
   int argc = 0;
@@ -383,7 +383,7 @@ char *silc_format(char *fmt, ...)
 
 static char rid[256];
 
-char *silc_id_render(void *id, uint16 type)
+char *silc_id_render(void *id, SilcUInt16 type)
 {
   char tmp[100];
   unsigned char tmps[2];
@@ -549,10 +549,10 @@ int silc_string_compare(char *string1, char *string2)
    this is used usually with nicknames, channel and server names to provide
    case insensitive keys. */
 
-uint32 silc_hash_string(void *key, void *user_context)
+SilcUInt32 silc_hash_string(void *key, void *user_context)
 {
   char *s = (char *)key;
-  uint32 h = 0, g;
+  SilcUInt32 h = 0, g;
   
   while (*s != '\0') {
     h = (h << 4) + tolower(*s);
@@ -568,31 +568,31 @@ uint32 silc_hash_string(void *key, void *user_context)
 
 /* Basic hash function to hash integers. May be used with the SilcHashTable. */
 
-uint32 silc_hash_uint(void *key, void *user_context)
+SilcUInt32 silc_hash_uint(void *key, void *user_context)
 {
-  return *(uint32 *)key;
+  return *(SilcUInt32 *)key;
 }
 
 /* Basic hash funtion to hash pointers. May be used with the SilcHashTable. */
 
-uint32 silc_hash_ptr(void *key, void *user_context)
+SilcUInt32 silc_hash_ptr(void *key, void *user_context)
 {
-  return (uint32)key;
+  return (SilcUInt32)key;
 }
 
 /* Hash a ID. The `user_context' is the ID type. */
 
-uint32 silc_hash_id(void *key, void *user_context)
+SilcUInt32 silc_hash_id(void *key, void *user_context)
 {
-  SilcIdType id_type = (SilcIdType)(uint32)user_context;
-  uint32 h = 0;
+  SilcIdType id_type = (SilcIdType)(SilcUInt32)user_context;
+  SilcUInt32 h = 0;
   int i;
 
   switch (id_type) {
   case SILC_ID_CLIENT:
     {
       SilcClientID *id = (SilcClientID *)key;
-      uint32 g;
+      SilcUInt32 g;
   
       /* The client ID is hashed by hashing the hash of the ID 
         (which is a truncated MD5 hash of the nickname) so that we
@@ -641,9 +641,9 @@ uint32 silc_hash_id(void *key, void *user_context)
 
 /* Hash binary data. The `user_context' is the data length. */
 
-uint32 silc_hash_data(void *key, void *user_context)
+SilcUInt32 silc_hash_data(void *key, void *user_context)
 {
-  uint32 len = (uint32)user_context, h = 0;
+  SilcUInt32 len = (SilcUInt32)user_context, h = 0;
   unsigned char *data = (unsigned char *)key;
   int i;
 
@@ -667,7 +667,7 @@ bool silc_hash_string_compare(void *key1, void *key2, void *user_context)
 
 bool silc_hash_id_compare(void *key1, void *key2, void *user_context)
 {
-  SilcIdType id_type = (SilcIdType)(uint32)user_context;
+  SilcIdType id_type = (SilcIdType)(SilcUInt32)user_context;
   return (id_type == SILC_ID_CLIENT ? 
          SILC_ID_COMPARE_HASH((SilcClientID *)key1, (SilcClientID *)key2) :
          SILC_ID_COMPARE_TYPE(key1, key2, id_type));
@@ -684,13 +684,13 @@ 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)
 {
-  uint32 len = (uint32)user_context;
+  SilcUInt32 len = (SilcUInt32)user_context;
   return !memcmp(key1, key2, len);
 }
 
 /* Parses mode mask and returns the mode as string. */
 
-char *silc_client_chmode(uint32 mode, const char *cipher, const char *hmac)
+char *silc_client_chmode(SilcUInt32 mode, const char *cipher, const char *hmac)
 {
   char string[100];
 
@@ -736,7 +736,7 @@ char *silc_client_chmode(uint32 mode, const char *cipher, const char *hmac)
 
 /* Parses channel user mode mask and returns te mode as string */
 
-char *silc_client_chumode(uint32 mode)
+char *silc_client_chumode(SilcUInt32 mode)
 {
   char string[4];
 
@@ -756,7 +756,7 @@ char *silc_client_chumode(uint32 mode)
 
 /* Parses channel user mode and returns it as special mode character. */
 
-char *silc_client_chumode_char(uint32 mode)
+char *silc_client_chumode_char(SilcUInt32 mode)
 {
   char string[4];
 
@@ -776,7 +776,7 @@ char *silc_client_chumode_char(uint32 mode)
 
 /* Creates fingerprint from data, usually used with SHA1 digests */
 
-char *silc_fingerprint(const unsigned char *data, uint32 data_len)
+char *silc_fingerprint(const unsigned char *data, SilcUInt32 data_len)
 {
   char fingerprint[64], *cp;
   int i;
index 5a31b43d0aa866e2e984e526158c01bdb8eb9fe6..ca34315a7ea53e4ad44ed9d7b01f390f356fdcee 100644 (file)
@@ -25,38 +25,38 @@ 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);
+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, void *user_context);
-uint32 silc_hash_uint(void *key, void *user_context);
-uint32 silc_hash_ptr(void *key, void *user_context);
-uint32 silc_hash_id(void *key, void *user_context);
-uint32 silc_hash_data(void *key, void *user_context);
+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(uint32 mode, const char *cipher, const char *hmac);
-char *silc_client_chumode(uint32 mode);
-char *silc_client_chumode_char(uint32 mode);
+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, uint32 data_len);
+char *silc_fingerprint(const unsigned char *data, SilcUInt32 data_len);
 
 #endif
index 99853dc91318219b9d46af9bfd78b1a2b9181137..7c71207e2d8010adbcaf86d0878a7dbf678430be 100644 (file)
@@ -54,7 +54,7 @@ do {
 } while(0)
 
 bool silc_socket_get_error(SilcSocketConnection sock, char *error,
-                          uint32 error_len)
+                          SilcUInt32 error_len)
 {
   if (sock->sock_error == KErrNone)
     return FALSE;
index 48b17e16c6a16a1545797b63bf0b9361c4d09360..d209031a69a02e7073495f40bc7522e6f1ed6e61 100644 (file)
@@ -307,7 +307,7 @@ int silc_net_set_socket_nonblock(int sock)
 /* Converts the IP number string from numbers-and-dots notation to
    binary form. */
 
-bool silc_net_addr2bin(const char *addr, void *bin, uint32 bin_len)
+bool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len)
 {
   int ret = 0;
 
index 78a366a04c6baf3c54d76aaeab7767ae4b898a4c..2449445b1ceffb949ecdfdf9ac1f7a1b175c2c83 100644 (file)
@@ -24,7 +24,7 @@
 
 /* Calls normal select() system call. */
 
-int silc_select(SilcScheduleFd fds, uint32 fds_count, struct timeval *timeout)
+int silc_select(SilcScheduleFd fds, SilcUInt32 fds_count, struct timeval *timeout)
 {
   fd_set in, out;
   int ret, i, max_fd = 0;
index f6d8744a62d1757b5d4251d8f9d7559a79b94cd4..dada9d6e73cb49a2255f88ae64bd04abe12d51ed 100644 (file)
@@ -109,7 +109,7 @@ int silc_socket_read(SilcSocketConnection sock)
 /* Returns human readable socket error message */
 
 bool silc_socket_get_error(SilcSocketConnection sock, char *error,
-                          uint32 error_len)
+                          SilcUInt32 error_len)
 {
   char *err;
 
index 928a40dec192607360c6951db46d8020210676d9..fd7542dd5fc9508aa8c6dcadf7b7fadc13623fd5 100644 (file)
@@ -224,7 +224,7 @@ void silc_net_close_connection(int sock)
 /* Converts the IP number string from numbers-and-dots notation to
    binary form. */
 
-bool silc_net_addr2bin(const char *addr, void *bin, uint32 bin_len)
+bool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len)
 {
   unsigned long ret;
 
index 4c8351467c80551f98bba809509d74ba57dff24f..f3bf02cc0f894d5ef98083bcd8baf7e8483917b2 100644 (file)
@@ -50,7 +50,7 @@
 
 */
 
-int silc_select(SilcScheduleFd fds, uint32 fds_count, struct timeval *timeout)
+int silc_select(SilcScheduleFd fds, SilcUInt32 fds_count, struct timeval *timeout)
 {
   HANDLE handles[MAXIMUM_WAIT_OBJECTS];
   DWORD ready, curtime, timeo;
index c63a77eabd8a80ff0f0bf7f83f07213be576225e..144eeba9acc998ac7f728b324c15c2c3a1a82c36 100644 (file)
@@ -122,7 +122,7 @@ int silc_socket_read(SilcSocketConnection sock)
 /* Returns human readable socket error message */
 
 bool silc_socket_get_error(SilcSocketConnection sock, char *error,
-                          uint32 error_len)
+                          SilcUInt32 error_len)
 {
   /* XXX TODO */
   return FALSE;
index c8d9c9bf5304c99713640783054c43bd561d9025..d7051c384abcd5424d3d77e54fa9300c7b5e7a4e 100644 (file)
@@ -51,10 +51,10 @@ const BYTE DWLEN = sizeof(DWORD) * 8;
 int silc_gettimeofday(struct timeval *tv)
 {
   FILETIME ft;
-  __int64 msec;
+  __SilcInt64 msec;
   
   GetSystemTimeAsFileTime(&ft);
-  msec = (__int64) ft.dwHighDateTime << DWLEN | ft.dwLowDateTime;
+  msec = (__SilcInt64) ft.dwHighDateTime << DWLEN | ft.dwLowDateTime;
   msec = (msec - FILETIME_1970) / 10;
   tv->tv_sec  = (long) (msec / 1000000);
   tv->tv_usec = (long) (msec % 1000000);
index b2a9ec52e74f75715313b34d584a0d7e88d7d571..fbd82588f84ce324d604678337ffb3eacd850d13 100644 (file)
-// testi2.cpp : Defines the entry point for the application.\r
-//\r
-\r
-#define FD_SETSIZE 5000\r
-#include "stdafx.h"\r
-#include "resource.h"\r
-#include <winsock2.h>\r
-#include <mswsock.h>\r
-extern "C"\r
-{\r
-#define FD_SETSIZE 5000\r
-#include "silcincludes.h"\r
-#include "clientlibincludes.h"\r
-}\r
-\r
-#define MAX_LOADSTRING 100\r
-\r
-// Global Variables:\r
-HINSTANCE hInst;                                                               // current instance\r
-TCHAR szTitle[MAX_LOADSTRING];                                                         // The title bar text\r
-TCHAR szWindowClass[MAX_LOADSTRING];                                                           // The title bar text\r
-\r
-// Foward declarations of functions included in this code module:\r
-ATOM                           MyRegisterClass(HINSTANCE hInstance);\r
-BOOL                           InitInstance(HINSTANCE, int);\r
-LRESULT CALLBACK       WndProc(HWND, UINT, WPARAM, LPARAM);\r
-LRESULT CALLBACK       About(HWND, UINT, WPARAM, LPARAM);\r
-\r
-void silc_op_say(SilcClient client, SilcClientConnection conn, \r
-                 SilcClientMessageType type, char *msg, ...)\r
-{\r
-       va_list vp;\r
-       char message[2048];\r
-\r
-       memset(message, 0, sizeof(message));\r
-       strncat(message, "\n***  ", 5);\r
-\r
-       va_start(vp, msg);\r
-       vsprintf(message + 5, msg, vp);\r
-       va_end(vp);\r
-\r
-       MessageBox( NULL, (char *)message, "say", MB_OK | MB_ICONINFORMATION );\r
-}\r
-\r
-void silc_notify(SilcClient client, SilcClientConnection conn, \r
-                SilcNotifyType type, ...)\r
-{\r
-\r
-}\r
-\r
-void silc_connect(SilcClient client, SilcClientConnection conn, int success)\r
-{\r
-\r
-}\r
-\r
-int silc_auth_meth(SilcClient client, SilcClientConnection conn,\r
-                        char *hostname, uint16 port,\r
-                        SilcProtocolAuthMeth *auth_meth,\r
-                        unsigned char **auth_data,\r
-                        uint32 *auth_data_len)\r
-{\r
-    *auth_meth = SILC_AUTH_NONE;\r
-       return TRUE;\r
-}\r
-void silc_verify_public_key(SilcClient client, SilcClientConnection conn,\r
-                           SilcSocketType conn_type, unsigned char *pk, \r
-                           uint32 pk_len, SilcSKEPKType pk_type,\r
-                           SilcVerifyPublicKey completion, void *context)\r
-{\r
-  completion(TRUE, context);\r
-}\r
-\r
-void silc_command_reply(SilcClient client, SilcClientConnection conn,\r
-                       SilcCommandPayload cmd_payload, int success,\r
-                       SilcCommand command, SilcCommandStatus status, ...)\r
-{\r
-\r
-}\r
-\r
-/* SILC client operations */\r
-SilcClientOperations ops = {\r
-  silc_op_say,\r
-       NULL,\r
-       NULL,\r
-       silc_notify,\r
-       NULL,\r
-       silc_command_reply,\r
-       silc_connect,\r
-       NULL,\r
-       silc_auth_meth,\r
-       silc_verify_public_key,\r
-};\r
-\r
-SILC_TASK_CALLBACK(connect_client)\r
-{\r
-  SilcClient client = (SilcClient)context;\r
-       silc_client_connect_to_server(client, 1334, "leevi.kuo.fi.ssh.com", NULL);\r
-}\r
-\r
-void silc_log(char *message)\r
-{\r
-}\r
-\r
-void silc_debugl(char *file, char *function, \r
-                                                               int line, char *message)\r
-{\r
-       char m[5000];\r
-       memcpy(m, message, strlen(message));\r
-       m[strlen(message)] = '\n';\r
-       m[strlen(message) + 1] = 0;\r
-       OutputDebugString(m);\r
-}\r
-\r
-void silc_hexdumpl(char *file, char *function, \r
-                                                          int line, unsigned char *data_in,\r
-                                                          uint32 data_len, char *message)\r
-{\r
-  int i, k;\r
-  int off, pos, count;\r
-  unsigned char *data = (unsigned char *)data_in;\r
-       char m[10000], *cp;\r
-       int len = data_len;\r
-       \r
-//     memset(m, 0, sizeof(m));\r
-\r
-       cp = m;\r
-  snprintf(cp, 10000, "%s:%d: %s\n", function, line, message);\r
-       cp += strlen(cp);\r
-\r
-  k = 0;\r
-  off = len % 16;\r
-  pos = 0;\r
-  count = 16;\r
-  while (1) {\r
-\r
-    if (off) {\r
-      if ((len - pos) < 16 && (len - pos <= len - off))\r
-                               count = off;\r
-    } else {\r
-      if (pos == len)\r
-                               count = 0;\r
-    }\r
-    if (off == len)\r
-      count = len;\r
-\r
-    if (count) {\r
-      snprintf(cp, sizeof(m), "%08X  ", k++ * 16);\r
-                       cp += strlen(cp);\r
-               }\r
-\r
-    for (i = 0; i < count; i++) {\r
-      snprintf(cp, sizeof(m), "%02X ", data[pos + i]);\r
-                       cp += strlen(cp);\r
-      \r
-      if ((i + 1) % 4 == 0) {\r
-                               snprintf(cp, sizeof(m), " ");\r
-                               cp += strlen(cp);\r
-                       }\r
-               }\r
-\r
-    if (count && count < 16) {\r
-      int j;\r
-      \r
-      for (j = 0; j < 16 - count; j++) {\r
-                               snprintf(cp, sizeof(m), "   ");\r
-                               cp += strlen(cp);\r
-               \r
-                               if ((j + count + 1) % 4 == 0) {\r
-                                       snprintf(cp, sizeof(m), " ");\r
-                                       cp += strlen(cp);\r
-                               }\r
-                       }\r
-    }\r
-         \r
-    for (i = 0; i < count; i++) {\r
-      char ch;\r
-      \r
-      if (data[pos] < 32 || data[pos] >= 127)\r
-                               ch = '.';\r
-      else\r
-                               ch = data[pos];\r
-\r
-      snprintf(cp, sizeof(m), "%c", ch);\r
-                       cp += strlen(cp);\r
-      pos++;\r
-    }\r
-\r
-    if (count) {\r
-      snprintf(cp, sizeof(m), "\n");\r
-                       cp += strlen(cp);\r
-               }\r
-\r
-    if (count < 16)\r
-      break;\r
-  }\r
-       \r
-       OutputDebugString(m);\r
-       MessageBox( NULL, (char *)m, "hexdump", MB_OK | MB_ICONINFORMATION );\r
-}\r
-\r
-static int \r
-silc_create_key_pair(char *pkcs_name, int bits, char *path,\r
-                            char *identifier, \r
-                            SilcPublicKey *ret_pub_key,\r
-                            SilcPrivateKey *ret_prv_key)\r
-{\r
-  SilcPKCS pkcs;\r
-  SilcPublicKey pub_key;\r
-  SilcPrivateKey prv_key;\r
-  SilcRng rng;\r
-  unsigned char *key;\r
-  uint32 key_len;\r
-  char pkfile[256], prvfile[256];\r
-\r
-  if (!pkcs_name || !path)\r
-    return FALSE;\r
-\r
-  if (!bits)\r
-    bits = 1024;\r
-\r
-  rng = silc_rng_alloc();\r
-  silc_rng_init(rng);\r
-  silc_rng_global_init(rng);\r
-\r
-  /* Generate keys */\r
-  silc_pkcs_alloc((const unsigned char *)pkcs_name, &pkcs);\r
-  pkcs->pkcs->init(pkcs->context, bits, rng);\r
-\r
-  /* Save public key into file */\r
-  key = silc_pkcs_get_public_key(pkcs, &key_len);\r
-  pub_key = silc_pkcs_public_key_alloc(pkcs->pkcs->name, identifier,\r
-                                       key, key_len);\r
-  *ret_pub_key = pub_key;\r
-\r
-  memset(key, 0, sizeof(key_len));\r
-  silc_free(key);\r
-\r
-  /* Save private key into file */\r
-  key = silc_pkcs_get_private_key(pkcs, &key_len);\r
-  prv_key = silc_pkcs_private_key_alloc(pkcs->pkcs->name, key, key_len);\r
-  *ret_prv_key = prv_key;\r
-\r
-  memset(key, 0, sizeof(key_len));\r
-  silc_free(key);\r
-\r
-  silc_rng_free(rng);\r
-  silc_pkcs_free(pkcs);\r
-\r
-  return TRUE;\r
-}\r
-\r
-\r
-int APIENTRY WinMain(HINSTANCE hInstance,\r
-                     HINSTANCE hPrevInstance,\r
-                     LPSTR     lpCmdLine,\r
-                     int       nCmdShow)\r
-{\r
-       // TODO: Place code here.\r
-       MSG msg;\r
-       HACCEL hAccelTable;\r
-       HANDLE h;\r
-       HANDLE handles[100];\r
-       SOCKET s;\r
-       unsigned int k;\r
-       WSAEVENT e, e2, e3;\r
-       int ret;\r
-       DWORD ready;\r
-       HMODULE mod;\r
-\r
-       // Initialize global strings\r
-       LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);\r
-       LoadString(hInstance, IDC_TESTI2, szWindowClass, MAX_LOADSTRING);\r
-       MyRegisterClass(hInstance);\r
-\r
-       // Perform application initialization:\r
-       if (!InitInstance (hInstance, nCmdShow)) \r
-       {\r
-               return FALSE;\r
-       }\r
-\r
-       hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_TESTI2);\r
-\r
-       {\r
-               SilcSchedule sched;     \r
-               SilcClient client;\r
-\r
-               silc_net_win32_init();\r
-               client = silc_client_alloc(&ops, NULL, NULL, "SILC-1.0-0.5.1");\r
-               client->realname = "pekka riikonen";\r
-               client->username = "priikone";\r
-               client->hostname = "leevi.kuo.fi.ssh.com";\r
-\r
-               silc_cipher_register_default();\r
-               silc_pkcs_register_default();\r
-               silc_hash_register_default();\r
-               silc_hmac_register_default();\r
-\r
-               silc_debug = TRUE;\r
-               silc_log_set_debug_callbacks(silc_debugl, silc_hexdumpl);\r
-\r
-               silc_create_key_pair("rsa", 1024, "kk", "UN=priikone, HN=pelle.kuo.fi.ssh.com", \r
-                                                                                               &client->public_key, &client->private_key);\r
-\r
-               silc_client_init(client);\r
-\r
-               silc_schedule_task_add(client->schedule, 0, connect_client, \r
-                                                               client, 0, 1, SILC_TASK_TIMEOUT, SILC_TASK_PRI_NORMAL); \r
-\r
-               silc_client_run(client);                \r
-       }\r
-       \r
-       return msg.wParam;\r
-}\r
-\r
-//\r
-//  FUNCTION: MyRegisterClass()\r
-//\r
-//  PURPOSE: Registers the window class.\r
-//\r
-//  COMMENTS:\r
-//\r
-//    This function and its usage is only necessary if you want this code\r
-//    to be compatible with Win32 systems prior to the 'RegisterClassEx'\r
-//    function that was added to Windows 95. It is important to call this function\r
-//    so that the application will get 'well formed' small icons associated\r
-//    with it.\r
-//\r
-ATOM MyRegisterClass(HINSTANCE hInstance)\r
-{\r
-       WNDCLASSEX wcex;\r
-\r
-       wcex.cbSize = sizeof(WNDCLASSEX); \r
-\r
-       wcex.style                      = CS_HREDRAW | CS_VREDRAW;\r
-       wcex.lpfnWndProc        = (WNDPROC)WndProc;\r
-       wcex.cbClsExtra         = 0;\r
-       wcex.cbWndExtra         = 0;\r
-       wcex.hInstance          = hInstance;\r
-       wcex.hIcon                      = LoadIcon(hInstance, (LPCTSTR)IDI_TESTI2);\r
-       wcex.hCursor            = LoadCursor(NULL, IDC_ARROW);\r
-       wcex.hbrBackground      = (HBRUSH)(COLOR_WINDOW+1);\r
-       wcex.lpszMenuName       = (LPCSTR)IDC_TESTI2;\r
-       wcex.lpszClassName      = szWindowClass;\r
-       wcex.hIconSm            = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);\r
-\r
-       return RegisterClassEx(&wcex);\r
-}\r
-\r
-//\r
-//   FUNCTION: InitInstance(HANDLE, int)\r
-//\r
-//   PURPOSE: Saves instance handle and creates main window\r
-//\r
-//   COMMENTS:\r
-//\r
-//        In this function, we save the instance handle in a global variable and\r
-//        create and display the main program window.\r
-//\r
-BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)\r
-{\r
-   HWND hWnd;\r
-\r
-   hInst = hInstance; // Store instance handle in our global variable\r
-\r
-   hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,\r
-      CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);\r
-\r
-   if (!hWnd)\r
-   {\r
-                       LPVOID lpMsgBuf;\r
-                       FormatMessage( \r
-                         FORMAT_MESSAGE_ALLOCATE_BUFFER | \r
-                         FORMAT_MESSAGE_FROM_SYSTEM | \r
-                         FORMAT_MESSAGE_IGNORE_INSERTS,\r
-                         NULL,\r
-                         GetLastError(),\r
-                         0, // Default language\r
-                         (LPTSTR) &lpMsgBuf,\r
-                         0,\r
-                         NULL \r
-                       );\r
-                       // Process any inserts in lpMsgBuf.\r
-                       // ...\r
-                       // Display the string.\r
-                       MessageBox( NULL, (LPCTSTR)lpMsgBuf, "Error", MB_OK | MB_ICONINFORMATION );\r
-                       // Free the buffer.\r
-                       LocalFree( lpMsgBuf );\r
-\r
-      return FALSE;\r
-   }\r
-\r
-   ShowWindow(hWnd, nCmdShow);\r
-   UpdateWindow(hWnd);\r
-\r
-   return TRUE;\r
-}\r
-\r
-//\r
-//  FUNCTION: WndProc(HWND, unsigned, WORD, LONG)\r
-//\r
-//  PURPOSE:  Processes messages for the main window.\r
-//\r
-//  WM_COMMAND - process the application menu\r
-//  WM_PAINT   - Paint the main window\r
-//  WM_DESTROY - post a quit message and return\r
-//\r
-//\r
-LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)\r
-{\r
-       int wmId, wmEvent;\r
-       PAINTSTRUCT ps;\r
-       HDC hdc;\r
-       TCHAR szHello[MAX_LOADSTRING];\r
-       LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);\r
-\r
-       switch (message) \r
-       {\r
-               case WM_COMMAND:\r
-                       wmId    = LOWORD(wParam); \r
-                       wmEvent = HIWORD(wParam); \r
-                       // Parse the menu selections:\r
-                       switch (wmId)\r
-                       {\r
-                               case IDM_ABOUT:\r
-                                  DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);\r
-                                  break;\r
-                               case IDM_EXIT:\r
-                                  DestroyWindow(hWnd);\r
-                                  break;\r
-                               default:\r
-                                  return DefWindowProc(hWnd, message, wParam, lParam);\r
-                       }\r
-                       break;\r
-               case WM_PAINT:\r
-                       hdc = BeginPaint(hWnd, &ps);\r
-                       // TODO: Add any drawing code here...\r
-                       RECT rt;\r
-                       GetClientRect(hWnd, &rt);\r
-                       DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER);\r
-                       EndPaint(hWnd, &ps);\r
-                       break;\r
-               case WM_DESTROY:\r
-                       PostQuitMessage(0);\r
-                       break;\r
-               default:\r
-                       return DefWindowProc(hWnd, message, wParam, lParam);\r
-   }\r
-   return 0;\r
-}\r
-\r
-// Mesage handler for about box.\r
-LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)\r
-{\r
-       switch (message)\r
-       {\r
-               case WM_INITDIALOG:\r
-                               return TRUE;\r
-\r
-               case WM_COMMAND:\r
-                       if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) \r
-                       {\r
-                               EndDialog(hDlg, LOWORD(wParam));\r
-                               return TRUE;\r
-                       }\r
-                       break;\r
-       }\r
-    return FALSE;\r
-}\r
+// testi2.cpp : Defines the entry point for the application.
+//
+
+#define FD_SETSIZE 5000
+#include "stdafx.h"
+#include "resource.h"
+#include <winsock2.h>
+#include <mswsock.h>
+extern "C"
+{
+#define FD_SETSIZE 5000
+#include "silcincludes.h"
+#include "clientlibincludes.h"
+}
+
+#define MAX_LOADSTRING 100
+
+// Global Variables:
+HINSTANCE hInst;                                                               // current instance
+TCHAR szTitle[MAX_LOADSTRING];                                                         // The title bar text
+TCHAR szWindowClass[MAX_LOADSTRING];                                                           // The title bar text
+
+// Foward declarations of functions included in this code module:
+ATOM                           MyRegisterClass(HINSTANCE hInstance);
+BOOL                           InitInstance(HINSTANCE, int);
+LRESULT CALLBACK       WndProc(HWND, UINT, WPARAM, LPARAM);
+LRESULT CALLBACK       About(HWND, UINT, WPARAM, LPARAM);
+
+void silc_op_say(SilcClient client, SilcClientConnection conn, 
+                 SilcClientMessageType type, char *msg, ...)
+{
+       va_list vp;
+       char message[2048];
+
+       memset(message, 0, sizeof(message));
+       strncat(message, "\n***  ", 5);
+
+       va_start(vp, msg);
+       vsprintf(message + 5, msg, vp);
+       va_end(vp);
+
+       MessageBox( NULL, (char *)message, "say", MB_OK | MB_ICONINFORMATION );
+}
+
+void silc_notify(SilcClient client, SilcClientConnection conn, 
+                SilcNotifyType type, ...)
+{
+
+}
+
+void silc_connect(SilcClient client, SilcClientConnection conn, int success)
+{
+
+}
+
+int silc_auth_meth(SilcClient client, SilcClientConnection conn,
+                        char *hostname, SilcUInt16 port,
+                        SilcProtocolAuthMeth *auth_meth,
+                        unsigned char **auth_data,
+                        SilcUInt32 *auth_data_len)
+{
+    *auth_meth = SILC_AUTH_NONE;
+       return TRUE;
+}
+void silc_verify_public_key(SilcClient client, SilcClientConnection conn,
+                           SilcSocketType conn_type, unsigned char *pk, 
+                           SilcUInt32 pk_len, SilcSKEPKType pk_type,
+                           SilcVerifyPublicKey completion, void *context)
+{
+  completion(TRUE, context);
+}
+
+void silc_command_reply(SilcClient client, SilcClientConnection conn,
+                       SilcCommandPayload cmd_payload, int success,
+                       SilcCommand command, SilcCommandStatus status, ...)
+{
+
+}
+
+/* SILC client operations */
+SilcClientOperations ops = {
+  silc_op_say,
+       NULL,
+       NULL,
+       silc_notify,
+       NULL,
+       silc_command_reply,
+       silc_connect,
+       NULL,
+       silc_auth_meth,
+       silc_verify_public_key,
+};
+
+SILC_TASK_CALLBACK(connect_client)
+{
+  SilcClient client = (SilcClient)context;
+       silc_client_connect_to_server(client, 1334, "leevi.kuo.fi.ssh.com", NULL);
+}
+
+void silc_log(char *message)
+{
+}
+
+void silc_debugl(char *file, char *function, 
+                                                               int line, char *message)
+{
+       char m[5000];
+       memcpy(m, message, strlen(message));
+       m[strlen(message)] = '\n';
+       m[strlen(message) + 1] = 0;
+       OutputDebugString(m);
+}
+
+void silc_hexdumpl(char *file, char *function, 
+                                                          int line, unsigned char *data_in,
+                                                          SilcUInt32 data_len, char *message)
+{
+  int i, k;
+  int off, pos, count;
+  unsigned char *data = (unsigned char *)data_in;
+       char m[10000], *cp;
+       int len = data_len;
+       
+//     memset(m, 0, sizeof(m));
+
+       cp = m;
+  snprintf(cp, 10000, "%s:%d: %s\n", function, line, message);
+       cp += strlen(cp);
+
+  k = 0;
+  off = len % 16;
+  pos = 0;
+  count = 16;
+  while (1) {
+
+    if (off) {
+      if ((len - pos) < 16 && (len - pos <= len - off))
+                               count = off;
+    } else {
+      if (pos == len)
+                               count = 0;
+    }
+    if (off == len)
+      count = len;
+
+    if (count) {
+      snprintf(cp, sizeof(m), "%08X  ", k++ * 16);
+                       cp += strlen(cp);
+               }
+
+    for (i = 0; i < count; i++) {
+      snprintf(cp, sizeof(m), "%02X ", data[pos + i]);
+                       cp += strlen(cp);
+      
+      if ((i + 1) % 4 == 0) {
+                               snprintf(cp, sizeof(m), " ");
+                               cp += strlen(cp);
+                       }
+               }
+
+    if (count && count < 16) {
+      int j;
+      
+      for (j = 0; j < 16 - count; j++) {
+                               snprintf(cp, sizeof(m), "   ");
+                               cp += strlen(cp);
+               
+                               if ((j + count + 1) % 4 == 0) {
+                                       snprintf(cp, sizeof(m), " ");
+                                       cp += strlen(cp);
+                               }
+                       }
+    }
+         
+    for (i = 0; i < count; i++) {
+      char ch;
+      
+      if (data[pos] < 32 || data[pos] >= 127)
+                               ch = '.';
+      else
+                               ch = data[pos];
+
+      snprintf(cp, sizeof(m), "%c", ch);
+                       cp += strlen(cp);
+      pos++;
+    }
+
+    if (count) {
+      snprintf(cp, sizeof(m), "\n");
+                       cp += strlen(cp);
+               }
+
+    if (count < 16)
+      break;
+  }
+       
+       OutputDebugString(m);
+       MessageBox( NULL, (char *)m, "hexdump", MB_OK | MB_ICONINFORMATION );
+}
+
+static int 
+silc_create_key_pair(char *pkcs_name, int bits, char *path,
+                            char *identifier, 
+                            SilcPublicKey *ret_pub_key,
+                            SilcPrivateKey *ret_prv_key)
+{
+  SilcPKCS pkcs;
+  SilcPublicKey pub_key;
+  SilcPrivateKey prv_key;
+  SilcRng rng;
+  unsigned char *key;
+  SilcUInt32 key_len;
+  char pkfile[256], prvfile[256];
+
+  if (!pkcs_name || !path)
+    return FALSE;
+
+  if (!bits)
+    bits = 1024;
+
+  rng = silc_rng_alloc();
+  silc_rng_init(rng);
+  silc_rng_global_init(rng);
+
+  /* Generate keys */
+  silc_pkcs_alloc((const unsigned char *)pkcs_name, &pkcs);
+  pkcs->pkcs->init(pkcs->context, bits, rng);
+
+  /* Save public key into file */
+  key = silc_pkcs_get_public_key(pkcs, &key_len);
+  pub_key = silc_pkcs_public_key_alloc(pkcs->pkcs->name, identifier,
+                                       key, key_len);
+  *ret_pub_key = pub_key;
+
+  memset(key, 0, sizeof(key_len));
+  silc_free(key);
+
+  /* Save private key into file */
+  key = silc_pkcs_get_private_key(pkcs, &key_len);
+  prv_key = silc_pkcs_private_key_alloc(pkcs->pkcs->name, key, key_len);
+  *ret_prv_key = prv_key;
+
+  memset(key, 0, sizeof(key_len));
+  silc_free(key);
+
+  silc_rng_free(rng);
+  silc_pkcs_free(pkcs);
+
+  return TRUE;
+}
+
+
+int APIENTRY WinMain(HINSTANCE hInstance,
+                     HINSTANCE hPrevInstance,
+                     LPSTR     lpCmdLine,
+                     int       nCmdShow)
+{
+       // TODO: Place code here.
+       MSG msg;
+       HACCEL hAccelTable;
+       HANDLE h;
+       HANDLE handles[100];
+       SOCKET s;
+       unsigned int k;
+       WSAEVENT e, e2, e3;
+       int ret;
+       DWORD ready;
+       HMODULE mod;
+
+       // Initialize global strings
+       LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
+       LoadString(hInstance, IDC_TESTI2, szWindowClass, MAX_LOADSTRING);
+       MyRegisterClass(hInstance);
+
+       // Perform application initialization:
+       if (!InitInstance (hInstance, nCmdShow)) 
+       {
+               return FALSE;
+       }
+
+       hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_TESTI2);
+
+       {
+               SilcSchedule sched;     
+               SilcClient client;
+
+               silc_net_win32_init();
+               client = silc_client_alloc(&ops, NULL, NULL, "SILC-1.0-0.5.1");
+               client->realname = "pekka riikonen";
+               client->username = "priikone";
+               client->hostname = "leevi.kuo.fi.ssh.com";
+
+               silc_cipher_register_default();
+               silc_pkcs_register_default();
+               silc_hash_register_default();
+               silc_hmac_register_default();
+
+               silc_debug = TRUE;
+               silc_log_set_debug_callbacks(silc_debugl, silc_hexdumpl);
+
+               silc_create_key_pair("rsa", 1024, "kk", "UN=priikone, HN=pelle.kuo.fi.ssh.com", 
+                                                                                               &client->public_key, &client->private_key);
+
+               silc_client_init(client);
+
+               silc_schedule_task_add(client->schedule, 0, connect_client, 
+                                                               client, 0, 1, SILC_TASK_TIMEOUT, SILC_TASK_PRI_NORMAL); 
+
+               silc_client_run(client);                
+       }
+       
+       return msg.wParam;
+}
+
+//
+//  FUNCTION: MyRegisterClass()
+//
+//  PURPOSE: Registers the window class.
+//
+//  COMMENTS:
+//
+//    This function and its usage is only necessary if you want this code
+//    to be compatible with Win32 systems prior to the 'RegisterClassEx'
+//    function that was added to Windows 95. It is important to call this function
+//    so that the application will get 'well formed' small icons associated
+//    with it.
+//
+ATOM MyRegisterClass(HINSTANCE hInstance)
+{
+       WNDCLASSEX wcex;
+
+       wcex.cbSize = sizeof(WNDCLASSEX); 
+
+       wcex.style                      = CS_HREDRAW | CS_VREDRAW;
+       wcex.lpfnWndProc        = (WNDPROC)WndProc;
+       wcex.cbClsExtra         = 0;
+       wcex.cbWndExtra         = 0;
+       wcex.hInstance          = hInstance;
+       wcex.hIcon                      = LoadIcon(hInstance, (LPCTSTR)IDI_TESTI2);
+       wcex.hCursor            = LoadCursor(NULL, IDC_ARROW);
+       wcex.hbrBackground      = (HBRUSH)(COLOR_WINDOW+1);
+       wcex.lpszMenuName       = (LPCSTR)IDC_TESTI2;
+       wcex.lpszClassName      = szWindowClass;
+       wcex.hIconSm            = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);
+
+       return RegisterClassEx(&wcex);
+}
+
+//
+//   FUNCTION: InitInstance(HANDLE, int)
+//
+//   PURPOSE: Saves instance handle and creates main window
+//
+//   COMMENTS:
+//
+//        In this function, we save the instance handle in a global variable and
+//        create and display the main program window.
+//
+BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
+{
+   HWND hWnd;
+
+   hInst = hInstance; // Store instance handle in our global variable
+
+   hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
+      CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
+
+   if (!hWnd)
+   {
+                       LPVOID lpMsgBuf;
+                       FormatMessage( 
+                         FORMAT_MESSAGE_ALLOCATE_BUFFER | 
+                         FORMAT_MESSAGE_FROM_SYSTEM | 
+                         FORMAT_MESSAGE_IGNORE_INSERTS,
+                         NULL,
+                         GetLastError(),
+                         0, // Default language
+                         (LPTSTR) &lpMsgBuf,
+                         0,
+                         NULL 
+                       );
+                       // Process any inserts in lpMsgBuf.
+                       // ...
+                       // Display the string.
+                       MessageBox( NULL, (LPCTSTR)lpMsgBuf, "Error", MB_OK | MB_ICONINFORMATION );
+                       // Free the buffer.
+                       LocalFree( lpMsgBuf );
+
+      return FALSE;
+   }
+
+   ShowWindow(hWnd, nCmdShow);
+   UpdateWindow(hWnd);
+
+   return TRUE;
+}
+
+//
+//  FUNCTION: WndProc(HWND, unsigned, WORD, LONG)
+//
+//  PURPOSE:  Processes messages for the main window.
+//
+//  WM_COMMAND - process the application menu
+//  WM_PAINT   - Paint the main window
+//  WM_DESTROY - post a quit message and return
+//
+//
+LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+       int wmId, wmEvent;
+       PAINTSTRUCT ps;
+       HDC hdc;
+       TCHAR szHello[MAX_LOADSTRING];
+       LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);
+
+       switch (message) 
+       {
+               case WM_COMMAND:
+                       wmId    = LOWORD(wParam); 
+                       wmEvent = HIWORD(wParam); 
+                       // Parse the menu selections:
+                       switch (wmId)
+                       {
+                               case IDM_ABOUT:
+                                  DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
+                                  break;
+                               case IDM_EXIT:
+                                  DestroyWindow(hWnd);
+                                  break;
+                               default:
+                                  return DefWindowProc(hWnd, message, wParam, lParam);
+                       }
+                       break;
+               case WM_PAINT:
+                       hdc = BeginPaint(hWnd, &ps);
+                       // TODO: Add any drawing code here...
+                       RECT rt;
+                       GetClientRect(hWnd, &rt);
+                       DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER);
+                       EndPaint(hWnd, &ps);
+                       break;
+               case WM_DESTROY:
+                       PostQuitMessage(0);
+                       break;
+               default:
+                       return DefWindowProc(hWnd, message, wParam, lParam);
+   }
+   return 0;
+}
+
+// Mesage handler for about box.
+LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+       switch (message)
+       {
+               case WM_INITDIALOG:
+                               return TRUE;
+
+               case WM_COMMAND:
+                       if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) 
+                       {
+                               EndDialog(hDlg, LOWORD(wParam));
+                               return TRUE;
+                       }
+                       break;
+       }
+    return FALSE;
+}