Integer type name change.
[silc.git] / apps / silcd / server_backup.h
index 42df86e28f3a8b9c60a202017f443bfc80cf8758..d8a2ab3d10467c7fed46036bf74fb68d0660833a 100644 (file)
 #define SILC_SERVER_BACKUP_REPLACED         20
 
 /* Adds the `backup_server' to be one of our backup router. This can be
-   called multiple times to set multiple backup routers. If `local' is
-   TRUE then the `backup_server' is in the local cell, if FALSE it is
-   in some other cell. */
+   called multiple times to set multiple backup routers. The `replacing' is
+   the IP and port that the `backup_router' will replace if the `replacing'
+   will become unresponsive. If `local' is TRUE then the `backup_server' is
+   in the local cell, if FALSE it is in some other cell. */
 void silc_server_backup_add(SilcServer server, SilcServerEntry backup_server,
-                           bool local);
+                           const char *ip, int port, bool local);
 
-/* Returns the first backup router context. Returns NULL if we do not have
-   any backup servers. This removes the returned server from being 
-   backup router and needs to be added later with silc_server_backup_add
-   if it needs to be backup router again. */
-SilcServerEntry silc_server_backup_get(SilcServer server);
+/* Returns backup router for IP and port in `replacing' or NULL if there
+   does not exist backup router. */
+SilcServerEntry silc_server_backup_get(SilcServer server, 
+                                      SilcServerID *server_id);
 
-/* Deletes the backup server `server_entry. */
-void silc_server_backup_del(SilcServer server, 
-                           SilcServerEntry server_entry);
+/* Deletes the backup server `server_entry'. */
+void silc_server_backup_del(SilcServer server, SilcServerEntry server_entry);
 
 /* Marks the IP address and port from the `server_id' as  being replaced
    by backup router indicated by the `server'. If the router connects at
@@ -88,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);
 
@@ -103,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);
 
@@ -118,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);