diff options
Diffstat (limited to 'src/namestore/namestore.h')
-rw-r--r-- | src/namestore/namestore.h | 65 |
1 files changed, 49 insertions, 16 deletions
diff --git a/src/namestore/namestore.h b/src/namestore/namestore.h index f8aa71f0e..c34422e13 100644 --- a/src/namestore/namestore.h +++ b/src/namestore/namestore.h | |||
@@ -37,13 +37,14 @@ | |||
37 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_CREATE_RESPONSE 436 | 37 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_CREATE_RESPONSE 436 |
38 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_REMOVE 437 | 38 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_REMOVE 437 |
39 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_REMOVE_RESPONSE 438 | 39 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_REMOVE_RESPONSE 438 |
40 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME 439 | ||
41 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE 440 | ||
40 | 42 | ||
41 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START 439 | 43 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START 445 |
42 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_RESPONSE 440 | 44 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_RESPONSE 446 |
43 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT 441 | 45 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT 447 |
44 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_STOP 442 | 46 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_STOP 448 |
45 | 47 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_DISCONNECT 449 | |
46 | #define GNUNET_MESSAGE_TYPE_NAMESTORE_DISCONNECT 443 | ||
47 | 48 | ||
48 | /** | 49 | /** |
49 | * Sign name and records | 50 | * Sign name and records |
@@ -299,6 +300,7 @@ struct RecordCreateResponseMessage | |||
299 | 300 | ||
300 | }; | 301 | }; |
301 | 302 | ||
303 | |||
302 | /** | 304 | /** |
303 | * Remove a record from the namestore | 305 | * Remove a record from the namestore |
304 | * Memory layout: | 306 | * Memory layout: |
@@ -325,13 +327,11 @@ struct RecordRemoveMessage | |||
325 | /* Length of pubkey */ | 327 | /* Length of pubkey */ |
326 | uint16_t key_len; | 328 | uint16_t key_len; |
327 | }; | 329 | }; |
328 | GNUNET_NETWORK_STRUCT_END | ||
329 | 330 | ||
330 | 331 | ||
331 | /** | 332 | /** |
332 | * Remove a record from the namestore response | 333 | * Remove a record from the namestore response |
333 | */ | 334 | */ |
334 | GNUNET_NETWORK_STRUCT_BEGIN | ||
335 | struct RecordRemoveResponseMessage | 335 | struct RecordRemoveResponseMessage |
336 | { | 336 | { |
337 | /** | 337 | /** |
@@ -351,13 +351,51 @@ struct RecordRemoveResponseMessage | |||
351 | */ | 351 | */ |
352 | uint16_t op_result; | 352 | uint16_t op_result; |
353 | }; | 353 | }; |
354 | GNUNET_NETWORK_STRUCT_END | 354 | |
355 | |||
356 | /** | ||
357 | * Connect to namestore service | ||
358 | */ | ||
359 | struct ZoneToNameMessage | ||
360 | { | ||
361 | struct GNUNET_NAMESTORE_Header gns_header; | ||
362 | |||
363 | /* The hash of public key of the zone to look up in */ | ||
364 | GNUNET_HashCode zone; | ||
365 | |||
366 | /* The hash of the public key of the target zone */ | ||
367 | GNUNET_HashCode value_zone; | ||
368 | }; | ||
369 | |||
370 | /** | ||
371 | * Connect to namestore service | ||
372 | */ | ||
373 | struct ZoneToNameResponseMessage | ||
374 | { | ||
375 | struct GNUNET_NAMESTORE_Header gns_header; | ||
376 | |||
377 | struct GNUNET_TIME_AbsoluteNBO expire; | ||
378 | |||
379 | uint16_t name_len; | ||
380 | |||
381 | uint16_t rd_len; | ||
382 | |||
383 | uint16_t rd_count; | ||
384 | |||
385 | int32_t contains_sig; | ||
386 | |||
387 | /* result in NBO: GNUNET_OK on success, GNUNET_NO if there were no results, GNUNET_SYSERR on error */ | ||
388 | int16_t res; | ||
389 | |||
390 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded zone_key; | ||
391 | |||
392 | }; | ||
393 | |||
355 | 394 | ||
356 | 395 | ||
357 | /** | 396 | /** |
358 | * Start a zone iteration for the given zone | 397 | * Start a zone iteration for the given zone |
359 | */ | 398 | */ |
360 | GNUNET_NETWORK_STRUCT_BEGIN | ||
361 | struct ZoneIterationStartMessage | 399 | struct ZoneIterationStartMessage |
362 | { | 400 | { |
363 | /** | 401 | /** |
@@ -372,12 +410,11 @@ struct ZoneIterationStartMessage | |||
372 | 410 | ||
373 | GNUNET_HashCode zone; | 411 | GNUNET_HashCode zone; |
374 | }; | 412 | }; |
375 | GNUNET_NETWORK_STRUCT_END | 413 | |
376 | 414 | ||
377 | /** | 415 | /** |
378 | * Ask for next result of zone iteration for the given operation | 416 | * Ask for next result of zone iteration for the given operation |
379 | */ | 417 | */ |
380 | GNUNET_NETWORK_STRUCT_BEGIN | ||
381 | struct ZoneIterationNextMessage | 418 | struct ZoneIterationNextMessage |
382 | { | 419 | { |
383 | /** | 420 | /** |
@@ -385,13 +422,11 @@ struct ZoneIterationNextMessage | |||
385 | */ | 422 | */ |
386 | struct GNUNET_NAMESTORE_Header gns_header; | 423 | struct GNUNET_NAMESTORE_Header gns_header; |
387 | }; | 424 | }; |
388 | GNUNET_NETWORK_STRUCT_END | ||
389 | 425 | ||
390 | 426 | ||
391 | /** | 427 | /** |
392 | * Stop zone iteration for the given operation | 428 | * Stop zone iteration for the given operation |
393 | */ | 429 | */ |
394 | GNUNET_NETWORK_STRUCT_BEGIN | ||
395 | struct ZoneIterationStopMessage | 430 | struct ZoneIterationStopMessage |
396 | { | 431 | { |
397 | /** | 432 | /** |
@@ -399,12 +434,10 @@ struct ZoneIterationStopMessage | |||
399 | */ | 434 | */ |
400 | struct GNUNET_NAMESTORE_Header gns_header; | 435 | struct GNUNET_NAMESTORE_Header gns_header; |
401 | }; | 436 | }; |
402 | GNUNET_NETWORK_STRUCT_END | ||
403 | 437 | ||
404 | /** | 438 | /** |
405 | * Ask for next result of zone iteration for the given operation | 439 | * Ask for next result of zone iteration for the given operation |
406 | */ | 440 | */ |
407 | GNUNET_NETWORK_STRUCT_BEGIN | ||
408 | struct ZoneIterationResponseMessage | 441 | struct ZoneIterationResponseMessage |
409 | { | 442 | { |
410 | /** | 443 | /** |