summaryrefslogtreecommitdiff
path: root/src/nse/nse.h
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2011-07-14 10:51:11 +0000
committerNathan S. Evans <evans@in.tum.de>2011-07-14 10:51:11 +0000
commit4db7c5604fe7fa1609dea044b0c3850d15c02138 (patch)
tree6cb82a082ecf51369305065ef869456daadf0c63 /src/nse/nse.h
parent2eeb8a2ae3d491a03e2a2d8b5aab4a42882dd4e0 (diff)
downloadgnunet-4db7c5604fe7fa1609dea044b0c3850d15c02138.tar.gz
gnunet-4db7c5604fe7fa1609dea044b0c3850d15c02138.zip
nse changes
Diffstat (limited to 'src/nse/nse.h')
-rw-r--r--src/nse/nse.h42
1 files changed, 27 insertions, 15 deletions
diff --git a/src/nse/nse.h b/src/nse/nse.h
index ee9832dc6..59dd6bc1b 100644
--- a/src/nse/nse.h
+++ b/src/nse/nse.h
@@ -32,14 +32,6 @@
32 32
33#define DEBUG_NSE GNUNET_YES 33#define DEBUG_NSE GNUNET_YES
34 34
35#define SIGNED_TIMESTAMP_SIZE sizeof(struct GNUNET_TIME_Absolute)
36
37/** FIXME: define NSE message types here. */
38
39struct GNUNET_Signed_Timestamp
40{
41 char data[SIGNED_TIMESTAMP_SIZE];
42};
43 35
44/** 36/**
45 * Network size estimate sent from the service 37 * Network size estimate sent from the service
@@ -95,25 +87,45 @@ struct GNUNET_NSE_ClientMessage
95 * doesn't allow us to verify that the 87 * doesn't allow us to verify that the
96 * public/private key pair were generated, right? 88 * public/private key pair were generated, right?
97 */ 89 */
98struct GNUNET_NSE_ReplyMessage 90struct GNUNET_NSE_FloodMessage
99{ 91{
100 /** 92 /**
101 * Type: GNUNET_MESSAGE_TYPE_NSE_REPLY 93 * Type: GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD
102 */ 94 */
103 struct GNUNET_MessageHeader header; 95 struct GNUNET_MessageHeader header;
104 96
105 /** 97 /**
98 * Magic header code(?)
99 */
100 uint16_t enc_type;
101
102 /**
103 * Number of matching bits between the hash
104 * of timestamp and the initiator's public
105 * key.
106 */
107 uint16_t distance;
108
109 /**
106 * The current timestamp value (which all 110 * The current timestamp value (which all
107 * peers should agree on) signed by the 111 * peers should agree on).
108 * private key of the initiating peer.
109 */ 112 */
110 struct GNUNET_Signed_Timestamp timestamp; 113 struct GNUNET_TIME_AbsoluteNBO timestamp;
111 114
112 /** 115 /**
113 * Public key of the originator, signed timestamp 116 * Public key of the originator.
114 * is decrypted by this.
115 */ 117 */
116 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey; 118 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
119
120 /**
121 * FIXME: use, document.
122 */
123 uint32_t proof_of_work;
124
125 /**
126 * FIXME: use, document.
127 */
128 struct GNUNET_CRYPTO_RsaSignature signature;
117}; 129};
118 130
119#endif 131#endif