aboutsummaryrefslogtreecommitdiff
path: root/src/rps/rps.h
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2015-02-22 18:47:59 +0000
committerJulius Bünger <buenger@mytum.de>2015-02-22 18:47:59 +0000
commitdb554c393137201c6a5c846eee77b0f11882b18c (patch)
treeb00b33d73202222b08062d60022f6738d01624ec /src/rps/rps.h
parenta76817c408f2d8cf3b0b8619ff38f163ee882be6 (diff)
downloadgnunet-db554c393137201c6a5c846eee77b0f11882b18c.tar.gz
gnunet-db554c393137201c6a5c846eee77b0f11882b18c.zip
baseline for test with malicious peers
Diffstat (limited to 'src/rps/rps.h')
-rw-r--r--src/rps/rps.h33
1 files changed, 30 insertions, 3 deletions
diff --git a/src/rps/rps.h b/src/rps/rps.h
index 3f76326a3..9aaa19a0c 100644
--- a/src/rps/rps.h
+++ b/src/rps/rps.h
@@ -96,7 +96,7 @@ struct GNUNET_RPS_CS_ReplyMessage
96 /** 96 /**
97 * Identifyer of the message. 97 * Identifyer of the message.
98 */ 98 */
99 uint64_t n; 99 uint64_t n GNUNET_PACKED;
100 100
101 /** 101 /**
102 * Number of random peer replied 102 * Number of random peer replied
@@ -107,7 +107,7 @@ struct GNUNET_RPS_CS_ReplyMessage
107}; 107};
108 108
109/** 109/**
110 * Message from client to service with seed of peers 110 * Message from client to service with seed of peers.
111 */ 111 */
112struct GNUNET_RPS_CS_SeedMessage 112struct GNUNET_RPS_CS_SeedMessage
113{ 113{
@@ -119,7 +119,34 @@ struct GNUNET_RPS_CS_SeedMessage
119 /** 119 /**
120 * Number of peers 120 * Number of peers
121 */ 121 */
122 uint64_t num_peers; 122 uint64_t num_peers GNUNET_PACKED;
123
124 /* Followed by num_peers * GNUNET_PeerIdentity */
125};
126
127/**
128 * Message from client to service to turn service malicious.
129 */
130struct GNUNET_RPS_CS_ActMaliciousMessage
131{
132 /**
133 * Header including size and type in NBO
134 */
135 struct GNUNET_MessageHeader header;
136
137 /**
138 * Type of malicious behaviour.
139 *
140 * 0 No malicious bahaviour at all
141 * 1 Try to maximise representation
142 * 2 Try to partition the network
143 */
144 uint32_t type GNUNET_PACKED;
145
146 /**
147 * Number of peers
148 */
149 uint64_t num_peers GNUNET_PACKED;
123 150
124 /* Followed by num_peers * GNUNET_PeerIdentity */ 151 /* Followed by num_peers * GNUNET_PeerIdentity */
125}; 152};