X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fserver_backup.h;h=57f6a05d001562df797b97c41b194023a556ed5c;hb=90b680ff05ea4a658865085e7be524854d5861e2;hp=42df86e28f3a8b9c60a202017f443bfc80cf8758;hpb=497c9f7c515609bf22606494ca4a48f0677acf6f;p=silc.git diff --git a/apps/silcd/server_backup.h b/apps/silcd/server_backup.h index 42df86e2..57f6a05d 100644 --- a/apps/silcd/server_backup.h +++ b/apps/silcd/server_backup.h @@ -30,21 +30,20 @@ #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