typedef struct {
SilcServerEntry server;
SilcIDIP ip;
- uint16 port;
+ SilcUInt16 port;
bool local;
} SilcServerBackupEntry;
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;
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;
SilcPacketType type,
SilcPacketFlags flags,
unsigned char *data,
- uint32 data_len,
+ SilcUInt32 data_len,
bool force_send,
bool local)
{
void *dst_id,
SilcIdType dst_id_type,
unsigned char *data,
- uint32 data_len,
+ SilcUInt32 data_len,
bool force_send,
bool local)
{
SilcSocketConnection sock,
SilcPacketContext *packet)
{
- uint8 type, session;
+ SilcUInt8 type, session;
SilcServerBackupProtocolContext ctx;
int i, ret;
connection is created. */
void silc_server_backup_reconnect(SilcServer server,
- const char *ip, uint16 port,
+ const char *ip, SilcUInt16 port,
SilcServerConnectRouterCallback callback,
void *context)
{
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
protocol->state++;
} else {
/* Responder of the protocol. */
- SilcServerConfigSectionRouter *primary;
+ SilcServerConfigRouter *primary;
/* We should have received START or START_GLOBAL packet */
if (ctx->type != SILC_SERVER_BACKUP_START &&
/* Connect to the primary router that was down that is now supposed
to be back online. We send the CONNECTED packet after we've
established the connection to the primary router. */
- primary = silc_server_config_get_primary_router(server->config);
+ primary = silc_server_config_get_primary_router(server);
if (primary && server->backup_primary) {
silc_server_backup_reconnect(server,
primary->host, primary->port,
to next state. */
if (server->router &&
!(server->router->data.status & SILC_IDLIST_STATUS_DISABLED) &&
- silc_server_config_is_primary_route(server->config)) {
+ silc_server_config_is_primary_route(server)) {
/* We'll wait for RESUMED packet */
protocol->state = SILC_PROTOCOL_STATE_END;
break;