X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcske%2Fsilcske_i.h;h=caa491a90f5ee95d5c3015654438063385478470;hb=HEAD;hp=ae61adf75e30332679a9bad5015937ac76088b18;hpb=9bccc0b6c7413815b70b4c8554a886a021f0dd83;p=silc.git diff --git a/lib/silcske/silcske_i.h b/lib/silcske/silcske_i.h index ae61adf7..caa491a9 100644 --- a/lib/silcske/silcske_i.h +++ b/lib/silcske/silcske_i.h @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 2005 - 2006 Pekka Riikonen + Copyright (C) 2005 - 2007 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 @@ -20,6 +20,12 @@ #ifndef SILCSKE_I_H #define SILCSKE_I_H +/* Packet retry counter and timer defines for UDP transport. */ +#define SILC_SKE_RETRY_COUNT 4 /* Max packet retry count */ +#define SILC_SKE_RETRY_MUL 2 /* Retry timer interval growth */ +#define SILC_SKE_RETRY_RAND 2 /* Randomizer, timeout += rnd % 2 */ +#define SILC_SKE_RETRY_MIN 1 /* Min retry timeout, seconds */ + /* Length of cookie in Start Payload */ #define SILC_SKE_COOKIE_LEN 16 @@ -69,10 +75,27 @@ struct SilcSKEStruct { SilcSchedule schedule; SilcFSMStruct fsm; SilcAsyncOperationStruct op; + SilcAsyncOperation key_op; SilcUInt16 session_port; - unsigned int aborted : 1; - unsigned int responder : 1; + /* Packet retransmission */ + SilcUInt16 retry_timer; + SilcUInt16 retry_count; + struct SilcSKEPacketRetransmission { + SilcPacketType type; + SilcPacketFlags flags; + unsigned char *data; + SilcUInt32 data_len; + } retrans; + + SilcUInt16 timeout; /* SKE timeout */ + SilcUInt16 refcnt; /* Reference counter */ + + unsigned int aborted : 1; /* Set when SKE aborted */ + unsigned int freed : 1; /* Set when freed during session */ + unsigned int responder : 1; /* Set when we are responder side */ + unsigned int running : 1; /* Set when SKE is running */ + unsigned int rekeying : 1; /* Set when rekeying */ }; #endif /* SILCSKE_I_H */