aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-dht-put.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/gnunet-dht-put.c')
-rw-r--r--src/dht/gnunet-dht-put.c75
1 files changed, 42 insertions, 33 deletions
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c
index 7ee4ec185..531107ef2 100644
--- a/src/dht/gnunet-dht-put.c
+++ b/src/dht/gnunet-dht-put.c
@@ -179,48 +179,57 @@ run (void *cls,
179int 179int
180main (int argc, char *const *argv) 180main (int argc, char *const *argv)
181{ 181{
182 struct GNUNET_GETOPT_CommandLineOption options[] = 182 struct GNUNET_GETOPT_CommandLineOption options[] = {
183 { GNUNET_GETOPT_option_string ('d', 183 GNUNET_GETOPT_option_string (
184 "data", 184 'd',
185 "DATA", 185 "data",
186 gettext_noop ( 186 "DATA",
187 "the data to insert under the key"), 187 gettext_noop (
188 &data), 188 "the data to insert under the key"),
189 &data),
189 GNUNET_GETOPT_option_relative_time ( 190 GNUNET_GETOPT_option_relative_time (
190 'e', 191 'e',
191 "expiration", 192 "expiration",
192 "EXPIRATION", 193 "EXPIRATION",
193 gettext_noop ("how long to store this entry in the dht (in seconds)"), 194 gettext_noop ("how long to store this entry in the dht (in seconds)"),
194 &expiration), 195 &expiration),
195 GNUNET_GETOPT_option_string ('k', 196 GNUNET_GETOPT_option_string (
196 "key", 197 'k',
197 "KEY", 198 "key",
198 gettext_noop ("the query key"), 199 "KEY",
199 &query_key), 200 gettext_noop ("the query key"),
200 GNUNET_GETOPT_option_flag ('x', 201 &query_key),
201 "demultiplex", 202 GNUNET_GETOPT_option_flag (
202 gettext_noop ( 203 'x',
203 "use DHT's demultiplex everywhere option"), 204 "demultiplex",
204 &demultixplex_everywhere), 205 gettext_noop (
205 GNUNET_GETOPT_option_uint ('r', 206 "use DHT's demultiplex everywhere option"),
206 "replication", 207 &demultixplex_everywhere),
207 "LEVEL", 208 GNUNET_GETOPT_option_uint (
208 gettext_noop ("how many replicas to create"), 209 'r',
209 &replication), 210 "replication",
210 GNUNET_GETOPT_option_flag ('R', 211 "LEVEL",
211 "record", 212 gettext_noop ("how many replicas to create"),
212 gettext_noop ("use DHT's record route option"), 213 &replication),
213 &record_route), 214 GNUNET_GETOPT_option_flag (
214 GNUNET_GETOPT_option_uint ('t', 215 'R',
215 "type", 216 "record",
216 "TYPE", 217 gettext_noop ("use DHT's record route option"),
217 gettext_noop ("the type to insert data as"), 218 &record_route),
218 &query_type), 219 GNUNET_GETOPT_option_uint (
220 't',
221 "type",
222 "TYPE",
223 gettext_noop ("the type to insert data as"),
224 &query_type),
219 GNUNET_GETOPT_option_verbose (&verbose), 225 GNUNET_GETOPT_option_verbose (&verbose),
220 GNUNET_GETOPT_OPTION_END }; 226 GNUNET_GETOPT_OPTION_END
227 };
221 228
222 229
223 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) 230 if (GNUNET_OK !=
231 GNUNET_STRINGS_get_utf8_args (argc, argv,
232 &argc, &argv))
224 return 2; 233 return 2;
225 expiration = GNUNET_TIME_UNIT_HOURS; 234 expiration = GNUNET_TIME_UNIT_HOURS;
226 return (GNUNET_OK == 235 return (GNUNET_OK ==