f4f1daaeb9ed692447fe9ecad914b2ffd1997101
[oweals/gnunet.git] / src / core / gnunet-service-core_kx.h
1 struct GSC_KeyExchangeInfo
2 {
3
4   /**
5    * SetKeyMessage to transmit, NULL if we are not currently trying
6    * to send one.
7    */
8   struct SetKeyMessage *skm;
9
10   /**
11    * Non-NULL if we are currently looking up HELLOs for this peer.
12    * for this peer.
13    */
14   struct GNUNET_PEERINFO_IteratorContext *pitr;
15
16   /**
17    * Public key of the neighbour, NULL if we don't have it yet.
18    */
19   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *public_key;
20
21   /**
22    * We received a PING message before we got the "public_key"
23    * (or the SET_KEY).  We keep it here until we have a key
24    * to decrypt it.  NULL if no PING is pending.
25    */
26   struct PingMessage *pending_ping;
27
28   /**
29    * We received a PONG message before we got the "public_key"
30    * (or the SET_KEY).  We keep it here until we have a key
31    * to decrypt it.  NULL if no PONG is pending.
32    */
33   struct PongMessage *pending_pong;
34
35   /**
36    * Key we use to encrypt our messages for the other peer
37    * (initialized by us when we do the handshake).
38    */
39   struct GNUNET_CRYPTO_AesSessionKey encrypt_key;
40
41   /**
42    * Key we use to decrypt messages from the other peer
43    * (given to us by the other peer during the handshake).
44    */
45   struct GNUNET_CRYPTO_AesSessionKey decrypt_key;
46
47   /**
48    * At what time did we generate our encryption key?
49    */
50   struct GNUNET_TIME_Absolute encrypt_key_created;
51
52   /**
53    * At what time did the other peer generate the decryption key?
54    */
55   struct GNUNET_TIME_Absolute decrypt_key_created;
56
57   /**
58    * At what frequency are we currently re-trying SET_KEY messages?
59    */
60   struct GNUNET_TIME_Relative set_key_retry_frequency;
61
62   /**
63    * ID of task used for re-trying SET_KEY and PING message.
64    */
65   GNUNET_SCHEDULER_TaskIdentifier retry_set_key_task;
66
67   /**
68    * What was our PING challenge number (for this peer)?
69    */
70   uint32_t ping_challenge;
71
72   /**
73    * What is our connection status?
74    */
75   enum PeerStateMachine status;
76
77 };