Added example files for backup router in doc/examples.
[silc.git] / apps / silcd / server_backup.h
index 57f6a05d001562df797b97c41b194023a556ed5c..2ca105b3a9ce47b4dd1429dadd709148bef2aa13 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2001 Pekka Riikonen
+  Copyright (C) 2001 - 2002 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -45,6 +45,11 @@ SilcServerEntry silc_server_backup_get(SilcServer server,
 /* Deletes the backup server `server_entry'. */
 void silc_server_backup_del(SilcServer server, SilcServerEntry server_entry);
 
+/* Frees all data allocated for backup routers.  Call this after deleting
+   all backup routers and when new routers are added no more, for example
+   when shutting down the server. */
+void silc_server_backup_free(SilcServer server);
+
 /* 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
    a later time we can check whether it has been replaced by an backup
@@ -87,7 +92,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 +107,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 +122,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);