diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-16 20:21:27 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-16 20:21:27 +0000 |
commit | accfd6bd85274da2f19e7230c8da6b273cfb2ece (patch) | |
tree | 60966194963795ff07b4da94f4efb6c46d6a23cf /src | |
parent | 3d670727232e79b7e49a1df7ba9260db4e5798a0 (diff) | |
download | gnunet-accfd6bd85274da2f19e7230c8da6b273cfb2ece.tar.gz gnunet-accfd6bd85274da2f19e7230c8da6b273cfb2ece.zip |
-another renaming fest for GNUNET_NAMESTORE_ to GNUNET_GNSRECORD_ symbols that were moved
Diffstat (limited to 'src')
59 files changed, 427 insertions, 427 deletions
diff --git a/src/conversation/conversation_api.c b/src/conversation/conversation_api.c index 7ee303866..58945d447 100644 --- a/src/conversation/conversation_api.c +++ b/src/conversation/conversation_api.c | |||
@@ -163,14 +163,14 @@ handle_caller_name (void *cls, | |||
163 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 163 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
164 | const char *label, | 164 | const char *label, |
165 | unsigned int rd_count, | 165 | unsigned int rd_count, |
166 | const struct GNUNET_NAMESTORE_RecordData *rd) | 166 | const struct GNUNET_GNSRECORD_Data *rd) |
167 | { | 167 | { |
168 | struct GNUNET_CONVERSATION_Phone *phone = cls; | 168 | struct GNUNET_CONVERSATION_Phone *phone = cls; |
169 | char *name; | 169 | char *name; |
170 | 170 | ||
171 | phone->qe = NULL; | 171 | phone->qe = NULL; |
172 | if (NULL == label) | 172 | if (NULL == label) |
173 | name = GNUNET_strdup (GNUNET_NAMESTORE_pkey_to_zkey (&phone->caller_id)); | 173 | name = GNUNET_strdup (GNUNET_GNSRECORD_pkey_to_zkey (&phone->caller_id)); |
174 | else | 174 | else |
175 | GNUNET_asprintf (&name, "%.gnu", label); | 175 | GNUNET_asprintf (&name, "%.gnu", label); |
176 | phone->event_handler (phone->event_handler_cls, | 176 | phone->event_handler (phone->event_handler_cls, |
@@ -452,13 +452,13 @@ GNUNET_CONVERSATION_phone_create (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
452 | */ | 452 | */ |
453 | void | 453 | void |
454 | GNUNET_CONVERSATION_phone_get_record (struct GNUNET_CONVERSATION_Phone *phone, | 454 | GNUNET_CONVERSATION_phone_get_record (struct GNUNET_CONVERSATION_Phone *phone, |
455 | struct GNUNET_NAMESTORE_RecordData *rd) | 455 | struct GNUNET_GNSRECORD_Data *rd) |
456 | { | 456 | { |
457 | rd->data = &phone->my_record; | 457 | rd->data = &phone->my_record; |
458 | rd->expiration_time = 0; | 458 | rd->expiration_time = 0; |
459 | rd->data_size = sizeof (struct GNUNET_CONVERSATION_PhoneRecord); | 459 | rd->data_size = sizeof (struct GNUNET_CONVERSATION_PhoneRecord); |
460 | rd->record_type = GNUNET_GNSRECORD_TYPE_PHONE; | 460 | rd->record_type = GNUNET_GNSRECORD_TYPE_PHONE; |
461 | rd->flags = GNUNET_NAMESTORE_RF_NONE; | 461 | rd->flags = GNUNET_GNSRECORD_RF_NONE; |
462 | } | 462 | } |
463 | 463 | ||
464 | 464 | ||
@@ -904,7 +904,7 @@ handle_call_audio_message (void *cls, | |||
904 | static void | 904 | static void |
905 | handle_gns_response (void *cls, | 905 | handle_gns_response (void *cls, |
906 | uint32_t rd_count, | 906 | uint32_t rd_count, |
907 | const struct GNUNET_NAMESTORE_RecordData *rd) | 907 | const struct GNUNET_GNSRECORD_Data *rd) |
908 | { | 908 | { |
909 | struct GNUNET_CONVERSATION_Call *call = cls; | 909 | struct GNUNET_CONVERSATION_Call *call = cls; |
910 | uint32_t i; | 910 | uint32_t i; |
diff --git a/src/conversation/gnunet-conversation.c b/src/conversation/gnunet-conversation.c index 5acdb3812..b0813df78 100644 --- a/src/conversation/gnunet-conversation.c +++ b/src/conversation/gnunet-conversation.c | |||
@@ -218,7 +218,7 @@ phone_event_handler (void *cls, | |||
218 | static void | 218 | static void |
219 | start_phone () | 219 | start_phone () |
220 | { | 220 | { |
221 | struct GNUNET_NAMESTORE_RecordData rd; | 221 | struct GNUNET_GNSRECORD_Data rd; |
222 | 222 | ||
223 | if (NULL == caller_id) | 223 | if (NULL == caller_id) |
224 | { | 224 | { |
diff --git a/src/gns/gns.h b/src/gns/gns.h index 17a7c7323..b3cd10304 100644 --- a/src/gns/gns.h +++ b/src/gns/gns.h | |||
@@ -109,7 +109,7 @@ struct GNUNET_GNS_ClientLookupResultMessage | |||
109 | */ | 109 | */ |
110 | uint32_t rd_count GNUNET_PACKED; | 110 | uint32_t rd_count GNUNET_PACKED; |
111 | 111 | ||
112 | /* followed by rd_count GNUNET_NAMESTORE_RecordData structs*/ | 112 | /* followed by rd_count GNUNET_GNSRECORD_Data structs*/ |
113 | 113 | ||
114 | }; | 114 | }; |
115 | 115 | ||
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c index 3d58922ad..95c2d54b3 100644 --- a/src/gns/gns_api.c +++ b/src/gns/gns_api.c | |||
@@ -366,7 +366,7 @@ process_lookup_reply (struct GNUNET_GNS_LookupRequest *qe, | |||
366 | struct GNUNET_GNS_Handle *handle = qe->gns_handle; | 366 | struct GNUNET_GNS_Handle *handle = qe->gns_handle; |
367 | struct PendingMessage *p = (struct PendingMessage *) &qe[1]; | 367 | struct PendingMessage *p = (struct PendingMessage *) &qe[1]; |
368 | uint32_t rd_count = ntohl (msg->rd_count); | 368 | uint32_t rd_count = ntohl (msg->rd_count); |
369 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; | 369 | struct GNUNET_GNSRECORD_Data rd[rd_count]; |
370 | size_t mlen; | 370 | size_t mlen; |
371 | 371 | ||
372 | if (GNUNET_YES != p->transmitted) | 372 | if (GNUNET_YES != p->transmitted) |
@@ -378,7 +378,7 @@ process_lookup_reply (struct GNUNET_GNS_LookupRequest *qe, | |||
378 | } | 378 | } |
379 | mlen = ntohs (msg->header.size); | 379 | mlen = ntohs (msg->header.size); |
380 | mlen -= sizeof (struct GNUNET_GNS_ClientLookupResultMessage); | 380 | mlen -= sizeof (struct GNUNET_GNS_ClientLookupResultMessage); |
381 | if (GNUNET_SYSERR == GNUNET_NAMESTORE_records_deserialize (mlen, | 381 | if (GNUNET_SYSERR == GNUNET_GNSRECORD_records_deserialize (mlen, |
382 | (const char*) &msg[1], | 382 | (const char*) &msg[1], |
383 | rd_count, | 383 | rd_count, |
384 | rd)) | 384 | rd)) |
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c index 6b7afdb59..3d55bc045 100644 --- a/src/gns/gnunet-dns2gns.c +++ b/src/gns/gnunet-dns2gns.c | |||
@@ -296,7 +296,7 @@ dns_result_processor (void *cls, | |||
296 | static void | 296 | static void |
297 | result_processor (void *cls, | 297 | result_processor (void *cls, |
298 | uint32_t rd_count, | 298 | uint32_t rd_count, |
299 | const struct GNUNET_NAMESTORE_RecordData *rd) | 299 | const struct GNUNET_GNSRECORD_Data *rd) |
300 | { | 300 | { |
301 | struct Request *request = cls; | 301 | struct Request *request = cls; |
302 | struct GNUNET_DNSPARSER_Packet *packet; | 302 | struct GNUNET_DNSPARSER_Packet *packet; |
@@ -316,7 +316,7 @@ result_processor (void *cls, | |||
316 | //packet->flags.opcode = GNUNET_TUN_DNS_OPCODE_STATUS; // ??? | 316 | //packet->flags.opcode = GNUNET_TUN_DNS_OPCODE_STATUS; // ??? |
317 | for (i=0;i<rd_count;i++) | 317 | for (i=0;i<rd_count;i++) |
318 | { | 318 | { |
319 | // FIXME: do we need to hanlde #GNUNET_NAMESTORE_RF_SHADOW_RECORD | 319 | // FIXME: do we need to hanlde #GNUNET_GNSRECORD_RF_SHADOW_RECORD |
320 | // here? Or should we do this in libgnunetgns? | 320 | // here? Or should we do this in libgnunetgns? |
321 | rec.expiration_time.abs_value_us = rd[i].expiration_time; | 321 | rec.expiration_time.abs_value_us = rd[i].expiration_time; |
322 | switch (rd[i].record_type) | 322 | switch (rd[i].record_type) |
diff --git a/src/gns/gnunet-gns-helper-service-w32.c b/src/gns/gnunet-gns-helper-service-w32.c index 78eb1e0a3..02afa7ac2 100644 --- a/src/gns/gnunet-gns-helper-service-w32.c +++ b/src/gns/gnunet-gns-helper-service-w32.c | |||
@@ -244,7 +244,7 @@ MarshallWSAQUERYSETW (WSAQUERYSETW *qs, GUID *sc) | |||
244 | static void | 244 | static void |
245 | process_ip_lookup_result (void* cls, | 245 | process_ip_lookup_result (void* cls, |
246 | uint32_t rd_count, | 246 | uint32_t rd_count, |
247 | const struct GNUNET_NAMESTORE_RecordData *rd) | 247 | const struct GNUNET_GNSRECORD_Data *rd) |
248 | { | 248 | { |
249 | int i, j, csanum; | 249 | int i, j, csanum; |
250 | struct request *rq = (struct request *) cls; | 250 | struct request *rq = (struct request *) cls; |
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 93f33218b..f41d820eb 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c | |||
@@ -2208,11 +2208,11 @@ signal_socks_success (struct Socks5Request *s5r) | |||
2208 | static void | 2208 | static void |
2209 | handle_gns_result (void *cls, | 2209 | handle_gns_result (void *cls, |
2210 | uint32_t rd_count, | 2210 | uint32_t rd_count, |
2211 | const struct GNUNET_NAMESTORE_RecordData *rd) | 2211 | const struct GNUNET_GNSRECORD_Data *rd) |
2212 | { | 2212 | { |
2213 | struct Socks5Request *s5r = cls; | 2213 | struct Socks5Request *s5r = cls; |
2214 | uint32_t i; | 2214 | uint32_t i; |
2215 | const struct GNUNET_NAMESTORE_RecordData *r; | 2215 | const struct GNUNET_GNSRECORD_Data *r; |
2216 | int got_ip; | 2216 | int got_ip; |
2217 | 2217 | ||
2218 | s5r->gns_lookup = NULL; | 2218 | s5r->gns_lookup = NULL; |
diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c index 736fb8af2..864d1d0ad 100644 --- a/src/gns/gnunet-gns.c +++ b/src/gns/gnunet-gns.c | |||
@@ -138,7 +138,7 @@ do_shutdown (void *cls, | |||
138 | */ | 138 | */ |
139 | static void | 139 | static void |
140 | process_lookup_result (void *cls, uint32_t rd_count, | 140 | process_lookup_result (void *cls, uint32_t rd_count, |
141 | const struct GNUNET_NAMESTORE_RecordData *rd) | 141 | const struct GNUNET_GNSRECORD_Data *rd) |
142 | { | 142 | { |
143 | const char *name = cls; | 143 | const char *name = cls; |
144 | uint32_t i; | 144 | uint32_t i; |
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c index d3728ee00..ff574c3a1 100644 --- a/src/gns/gnunet-service-gns.c +++ b/src/gns/gnunet-service-gns.c | |||
@@ -321,14 +321,14 @@ put_gns_record (void *cls, | |||
321 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | 321 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, |
322 | const char *name, | 322 | const char *name, |
323 | unsigned int rd_count, | 323 | unsigned int rd_count, |
324 | const struct GNUNET_NAMESTORE_RecordData *rd) | 324 | const struct GNUNET_GNSRECORD_Data *rd) |
325 | { | 325 | { |
326 | struct GNUNET_NAMESTORE_Block *block; | 326 | struct GNUNET_GNSRECORD_Block *block; |
327 | struct GNUNET_HashCode query; | 327 | struct GNUNET_HashCode query; |
328 | struct GNUNET_TIME_Absolute expire; | 328 | struct GNUNET_TIME_Absolute expire; |
329 | struct GNUNET_TIME_Absolute now; | 329 | struct GNUNET_TIME_Absolute now; |
330 | size_t block_size; | 330 | size_t block_size; |
331 | struct GNUNET_NAMESTORE_RecordData rd_public[rd_count]; | 331 | struct GNUNET_GNSRECORD_Data rd_public[rd_count]; |
332 | unsigned int rd_public_count; | 332 | unsigned int rd_public_count; |
333 | unsigned int i; | 333 | unsigned int i; |
334 | 334 | ||
@@ -387,13 +387,13 @@ put_gns_record (void *cls, | |||
387 | rd_public_count = 0; | 387 | rd_public_count = 0; |
388 | now = GNUNET_TIME_absolute_get (); | 388 | now = GNUNET_TIME_absolute_get (); |
389 | for (i=0;i<rd_count;i++) | 389 | for (i=0;i<rd_count;i++) |
390 | if (0 == (rd[i].flags & (GNUNET_NAMESTORE_RF_PRIVATE | | 390 | if (0 == (rd[i].flags & (GNUNET_GNSRECORD_RF_PRIVATE | |
391 | GNUNET_NAMESTORE_RF_PENDING))) | 391 | GNUNET_GNSRECORD_RF_PENDING))) |
392 | { | 392 | { |
393 | rd_public[rd_public_count] = rd[i]; | 393 | rd_public[rd_public_count] = rd[i]; |
394 | if (0 != (rd[i].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)) | 394 | if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) |
395 | { | 395 | { |
396 | rd_public[rd_public_count].flags &= ~GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION; | 396 | rd_public[rd_public_count].flags &= ~GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION; |
397 | rd_public[rd_public_count].expiration_time += now.abs_value_us; | 397 | rd_public[rd_public_count].expiration_time += now.abs_value_us; |
398 | } | 398 | } |
399 | rd_public_count++; | 399 | rd_public_count++; |
@@ -406,9 +406,9 @@ put_gns_record (void *cls, | |||
406 | NULL); | 406 | NULL); |
407 | return; | 407 | return; |
408 | } | 408 | } |
409 | expire = GNUNET_NAMESTORE_record_get_expiration_time (rd_public_count, | 409 | expire = GNUNET_GNSRECORD_record_get_expiration_time (rd_public_count, |
410 | rd_public); | 410 | rd_public); |
411 | block = GNUNET_NAMESTORE_block_create (key, | 411 | block = GNUNET_GNSRECORD_block_create (key, |
412 | expire, | 412 | expire, |
413 | name, | 413 | name, |
414 | rd_public, | 414 | rd_public, |
@@ -416,7 +416,7 @@ put_gns_record (void *cls, | |||
416 | block_size = ntohl (block->purpose.size) | 416 | block_size = ntohl (block->purpose.size) |
417 | + sizeof (struct GNUNET_CRYPTO_EcdsaSignature) | 417 | + sizeof (struct GNUNET_CRYPTO_EcdsaSignature) |
418 | + sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey); | 418 | + sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey); |
419 | GNUNET_NAMESTORE_query_from_private_key (key, | 419 | GNUNET_GNSRECORD_query_from_private_key (key, |
420 | name, | 420 | name, |
421 | &query); | 421 | &query); |
422 | 422 | ||
@@ -475,7 +475,7 @@ publish_zone_dht_start (void *cls, | |||
475 | static void | 475 | static void |
476 | send_lookup_response (void* cls, | 476 | send_lookup_response (void* cls, |
477 | uint32_t rd_count, | 477 | uint32_t rd_count, |
478 | const struct GNUNET_NAMESTORE_RecordData *rd) | 478 | const struct GNUNET_GNSRECORD_Data *rd) |
479 | { | 479 | { |
480 | struct ClientLookupHandle *clh = cls; | 480 | struct ClientLookupHandle *clh = cls; |
481 | struct GNUNET_GNS_ClientLookupResultMessage *rmsg; | 481 | struct GNUNET_GNS_ClientLookupResultMessage *rmsg; |
@@ -486,13 +486,13 @@ send_lookup_response (void* cls, | |||
486 | "LOOKUP_RESULT", | 486 | "LOOKUP_RESULT", |
487 | rd_count); | 487 | rd_count); |
488 | 488 | ||
489 | len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); | 489 | len = GNUNET_GNSRECORD_records_get_size (rd_count, rd); |
490 | rmsg = GNUNET_malloc (len + sizeof (struct GNUNET_GNS_ClientLookupResultMessage)); | 490 | rmsg = GNUNET_malloc (len + sizeof (struct GNUNET_GNS_ClientLookupResultMessage)); |
491 | rmsg->header.type = htons (GNUNET_MESSAGE_TYPE_GNS_LOOKUP_RESULT); | 491 | rmsg->header.type = htons (GNUNET_MESSAGE_TYPE_GNS_LOOKUP_RESULT); |
492 | rmsg->header.size = htons (len + sizeof(struct GNUNET_GNS_ClientLookupResultMessage)); | 492 | rmsg->header.size = htons (len + sizeof(struct GNUNET_GNS_ClientLookupResultMessage)); |
493 | rmsg->id = clh->request_id; | 493 | rmsg->id = clh->request_id; |
494 | rmsg->rd_count = htonl (rd_count); | 494 | rmsg->rd_count = htonl (rd_count); |
495 | GNUNET_NAMESTORE_records_serialize (rd_count, rd, len, | 495 | GNUNET_GNSRECORD_records_serialize (rd_count, rd, len, |
496 | (char*) &rmsg[1]); | 496 | (char*) &rmsg[1]); |
497 | GNUNET_SERVER_notification_context_unicast (nc, | 497 | GNUNET_SERVER_notification_context_unicast (nc, |
498 | clh->client, | 498 | clh->client, |
diff --git a/src/gns/gnunet-service-gns_interceptor.c b/src/gns/gnunet-service-gns_interceptor.c index 61568c438..efa6e49bb 100644 --- a/src/gns/gnunet-service-gns_interceptor.c +++ b/src/gns/gnunet-service-gns_interceptor.c | |||
@@ -97,7 +97,7 @@ static struct InterceptLookupHandle *ilh_tail; | |||
97 | */ | 97 | */ |
98 | static void | 98 | static void |
99 | reply_to_dns (void *cls, uint32_t rd_count, | 99 | reply_to_dns (void *cls, uint32_t rd_count, |
100 | const struct GNUNET_NAMESTORE_RecordData *rd) | 100 | const struct GNUNET_GNSRECORD_Data *rd) |
101 | { | 101 | { |
102 | struct InterceptLookupHandle *ilh = cls; | 102 | struct InterceptLookupHandle *ilh = cls; |
103 | struct GNUNET_DNSPARSER_Packet *packet = ilh->packet; | 103 | struct GNUNET_DNSPARSER_Packet *packet = ilh->packet; |
@@ -125,7 +125,7 @@ reply_to_dns (void *cls, uint32_t rd_count, | |||
125 | 125 | ||
126 | packet->answers = answer_records; | 126 | packet->answers = answer_records; |
127 | packet->additional_records = additional_records; | 127 | packet->additional_records = additional_records; |
128 | /* FIXME: need to handle #GNUNET_NAMESTORE_RF_SHADOW_RECORD option | 128 | /* FIXME: need to handle #GNUNET_GNSRECORD_RF_SHADOW_RECORD option |
129 | (by ignoring records where this flag is set if there is any | 129 | (by ignoring records where this flag is set if there is any |
130 | other record of that type in the result set) */ | 130 | other record of that type in the result set) */ |
131 | for (i=0; i < rd_count; i++) | 131 | for (i=0; i < rd_count; i++) |
@@ -183,7 +183,7 @@ reply_to_dns (void *cls, uint32_t rd_count, | |||
183 | answer_records[i - skip_answers].data.raw.data = (char*)rd[i].data; | 183 | answer_records[i - skip_answers].data.raw.data = (char*)rd[i].data; |
184 | break; | 184 | break; |
185 | } | 185 | } |
186 | GNUNET_break (0 == (rd[i - skip_answers].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)); | 186 | GNUNET_break (0 == (rd[i - skip_answers].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)); |
187 | answer_records[i - skip_answers].expiration_time.abs_value_us = rd[i].expiration_time; | 187 | answer_records[i - skip_answers].expiration_time.abs_value_us = rd[i].expiration_time; |
188 | answer_records[i - skip_answers].dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET; | 188 | answer_records[i - skip_answers].dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET; |
189 | } | 189 | } |
@@ -240,7 +240,7 @@ reply_to_dns (void *cls, uint32_t rd_count, | |||
240 | additional_records[i - skip_additional].data.raw.data = (char*)rd[i].data; | 240 | additional_records[i - skip_additional].data.raw.data = (char*)rd[i].data; |
241 | break; | 241 | break; |
242 | } | 242 | } |
243 | GNUNET_break (0 == (rd[i - skip_additional].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)); | 243 | GNUNET_break (0 == (rd[i - skip_additional].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)); |
244 | additional_records[i - skip_additional].expiration_time.abs_value_us = rd[i].expiration_time; | 244 | additional_records[i - skip_additional].expiration_time.abs_value_us = rd[i].expiration_time; |
245 | additional_records[i - skip_additional].dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET; | 245 | additional_records[i - skip_additional].dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET; |
246 | } | 246 | } |
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index ad256430c..e0d395a55 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -504,7 +504,7 @@ translate_dot_plus (struct GNS_ResolverHandle *rh, | |||
504 | "%.*s.%s", | 504 | "%.*s.%s", |
505 | (int) (s_len - 2), | 505 | (int) (s_len - 2), |
506 | name, | 506 | name, |
507 | GNUNET_NAMESTORE_pkey_to_zkey (&rh->ac_tail->authority_info.gns_authority)); | 507 | GNUNET_GNSRECORD_pkey_to_zkey (&rh->ac_tail->authority_info.gns_authority)); |
508 | GNUNET_free (name); | 508 | GNUNET_free (name); |
509 | return ret; | 509 | return ret; |
510 | } | 510 | } |
@@ -598,7 +598,7 @@ transmit_lookup_dns_result (struct GNS_ResolverHandle *rh) | |||
598 | for (pos = rh->dns_result_head; NULL != pos; pos = pos->next) | 598 | for (pos = rh->dns_result_head; NULL != pos; pos = pos->next) |
599 | n++; | 599 | n++; |
600 | { | 600 | { |
601 | struct GNUNET_NAMESTORE_RecordData rd[n]; | 601 | struct GNUNET_GNSRECORD_Data rd[n]; |
602 | 602 | ||
603 | i = 0; | 603 | i = 0; |
604 | for (pos = rh->dns_result_head; NULL != pos; pos = pos->next) | 604 | for (pos = rh->dns_result_head; NULL != pos; pos = pos->next) |
@@ -608,12 +608,12 @@ transmit_lookup_dns_result (struct GNS_ResolverHandle *rh) | |||
608 | rd[i].record_type = pos->record_type; | 608 | rd[i].record_type = pos->record_type; |
609 | if (0 == pos->expiration_time) | 609 | if (0 == pos->expiration_time) |
610 | { | 610 | { |
611 | rd[i].flags = GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION; | 611 | rd[i].flags = GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION; |
612 | rd[i].expiration_time = 0; | 612 | rd[i].expiration_time = 0; |
613 | } | 613 | } |
614 | else | 614 | else |
615 | { | 615 | { |
616 | rd[i].flags = GNUNET_NAMESTORE_RF_NONE; | 616 | rd[i].flags = GNUNET_GNSRECORD_RF_NONE; |
617 | rd[i].expiration_time = pos->expiration_time; | 617 | rd[i].expiration_time = pos->expiration_time; |
618 | } | 618 | } |
619 | i++; | 619 | i++; |
@@ -785,7 +785,7 @@ dns_result_parser (void *cls, | |||
785 | /* convert from (parsed) DNS to (binary) GNS format! */ | 785 | /* convert from (parsed) DNS to (binary) GNS format! */ |
786 | rd_count = p->num_answers + p->num_authority_records + p->num_additional_records; | 786 | rd_count = p->num_answers + p->num_authority_records + p->num_additional_records; |
787 | { | 787 | { |
788 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; | 788 | struct GNUNET_GNSRECORD_Data rd[rd_count]; |
789 | unsigned int skip; | 789 | unsigned int skip; |
790 | char buf[UINT16_MAX]; | 790 | char buf[UINT16_MAX]; |
791 | size_t buf_off; | 791 | size_t buf_off; |
@@ -1064,7 +1064,7 @@ handle_gns_cname_result (struct GNS_ResolverHandle *rh, | |||
1064 | static void | 1064 | static void |
1065 | handle_gns_resolution_result (void *cls, | 1065 | handle_gns_resolution_result (void *cls, |
1066 | unsigned int rd_count, | 1066 | unsigned int rd_count, |
1067 | const struct GNUNET_NAMESTORE_RecordData *rd); | 1067 | const struct GNUNET_GNSRECORD_Data *rd); |
1068 | 1068 | ||
1069 | 1069 | ||
1070 | /** | 1070 | /** |
@@ -1088,13 +1088,13 @@ vpn_allocation_cb (void *cls, | |||
1088 | { | 1088 | { |
1089 | struct VpnContext *vpn_ctx = cls; | 1089 | struct VpnContext *vpn_ctx = cls; |
1090 | struct GNS_ResolverHandle *rh = vpn_ctx->rh; | 1090 | struct GNS_ResolverHandle *rh = vpn_ctx->rh; |
1091 | struct GNUNET_NAMESTORE_RecordData rd[vpn_ctx->rd_count]; | 1091 | struct GNUNET_GNSRECORD_Data rd[vpn_ctx->rd_count]; |
1092 | unsigned int i; | 1092 | unsigned int i; |
1093 | 1093 | ||
1094 | vpn_ctx->vpn_request = NULL; | 1094 | vpn_ctx->vpn_request = NULL; |
1095 | rh->vpn_ctx = NULL; | 1095 | rh->vpn_ctx = NULL; |
1096 | GNUNET_assert (GNUNET_OK == | 1096 | GNUNET_assert (GNUNET_OK == |
1097 | GNUNET_NAMESTORE_records_deserialize (vpn_ctx->rd_data_size, | 1097 | GNUNET_GNSRECORD_records_deserialize (vpn_ctx->rd_data_size, |
1098 | vpn_ctx->rd_data, | 1098 | vpn_ctx->rd_data, |
1099 | vpn_ctx->rd_count, | 1099 | vpn_ctx->rd_count, |
1100 | rd)); | 1100 | rd)); |
@@ -1143,7 +1143,7 @@ vpn_allocation_cb (void *cls, | |||
1143 | static void | 1143 | static void |
1144 | handle_gns_resolution_result (void *cls, | 1144 | handle_gns_resolution_result (void *cls, |
1145 | unsigned int rd_count, | 1145 | unsigned int rd_count, |
1146 | const struct GNUNET_NAMESTORE_RecordData *rd) | 1146 | const struct GNUNET_GNSRECORD_Data *rd) |
1147 | { | 1147 | { |
1148 | struct GNS_ResolverHandle *rh = cls; | 1148 | struct GNS_ResolverHandle *rh = cls; |
1149 | struct AuthorityChain *ac; | 1149 | struct AuthorityChain *ac; |
@@ -1163,13 +1163,13 @@ handle_gns_resolution_result (void *cls, | |||
1163 | size_t scratch_off; | 1163 | size_t scratch_off; |
1164 | size_t scratch_start; | 1164 | size_t scratch_start; |
1165 | size_t off; | 1165 | size_t off; |
1166 | struct GNUNET_NAMESTORE_RecordData rd_new[rd_count]; | 1166 | struct GNUNET_GNSRECORD_Data rd_new[rd_count]; |
1167 | unsigned int rd_off; | 1167 | unsigned int rd_off; |
1168 | 1168 | ||
1169 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1169 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1170 | "Resolution succeeded for `%s' in zone %s, got %u records\n", | 1170 | "Resolution succeeded for `%s' in zone %s, got %u records\n", |
1171 | rh->ac_tail->label, | 1171 | rh->ac_tail->label, |
1172 | GNUNET_NAMESTORE_z2s (&rh->ac_tail->authority_info.gns_authority), | 1172 | GNUNET_GNSRECORD_z2s (&rh->ac_tail->authority_info.gns_authority), |
1173 | rd_count); | 1173 | rd_count); |
1174 | if (0 == rh->name_resolution_pos) | 1174 | if (0 == rh->name_resolution_pos) |
1175 | { | 1175 | { |
@@ -1230,10 +1230,10 @@ handle_gns_resolution_result (void *cls, | |||
1230 | vpn_ctx = GNUNET_new (struct VpnContext); | 1230 | vpn_ctx = GNUNET_new (struct VpnContext); |
1231 | rh->vpn_ctx = vpn_ctx; | 1231 | rh->vpn_ctx = vpn_ctx; |
1232 | vpn_ctx->rh = rh; | 1232 | vpn_ctx->rh = rh; |
1233 | vpn_ctx->rd_data_size = GNUNET_NAMESTORE_records_get_size (rd_count, | 1233 | vpn_ctx->rd_data_size = GNUNET_GNSRECORD_records_get_size (rd_count, |
1234 | rd); | 1234 | rd); |
1235 | vpn_ctx->rd_data = GNUNET_malloc (vpn_ctx->rd_data_size); | 1235 | vpn_ctx->rd_data = GNUNET_malloc (vpn_ctx->rd_data_size); |
1236 | (void) GNUNET_NAMESTORE_records_serialize (rd_count, | 1236 | (void) GNUNET_GNSRECORD_records_serialize (rd_count, |
1237 | rd, | 1237 | rd, |
1238 | vpn_ctx->rd_data_size, | 1238 | vpn_ctx->rd_data_size, |
1239 | vpn_ctx->rd_data); | 1239 | vpn_ctx->rd_data); |
@@ -1720,7 +1720,7 @@ handle_dht_response (void *cls, | |||
1720 | { | 1720 | { |
1721 | struct GNS_ResolverHandle *rh = cls; | 1721 | struct GNS_ResolverHandle *rh = cls; |
1722 | struct AuthorityChain *ac = rh->ac_tail; | 1722 | struct AuthorityChain *ac = rh->ac_tail; |
1723 | const struct GNUNET_NAMESTORE_Block *block; | 1723 | const struct GNUNET_GNSRECORD_Block *block; |
1724 | struct CacheOps *co; | 1724 | struct CacheOps *co; |
1725 | 1725 | ||
1726 | GNUNET_DHT_get_stop (rh->get_handle); | 1726 | GNUNET_DHT_get_stop (rh->get_handle); |
@@ -1729,7 +1729,7 @@ handle_dht_response (void *cls, | |||
1729 | rh->dht_heap_node = NULL; | 1729 | rh->dht_heap_node = NULL; |
1730 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1730 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1731 | "Handling response from the DHT\n"); | 1731 | "Handling response from the DHT\n"); |
1732 | if (size < sizeof (struct GNUNET_NAMESTORE_Block)) | 1732 | if (size < sizeof (struct GNUNET_GNSRECORD_Block)) |
1733 | { | 1733 | { |
1734 | /* how did this pass DHT block validation!? */ | 1734 | /* how did this pass DHT block validation!? */ |
1735 | GNUNET_break (0); | 1735 | GNUNET_break (0); |
@@ -1750,7 +1750,7 @@ handle_dht_response (void *cls, | |||
1750 | return; | 1750 | return; |
1751 | } | 1751 | } |
1752 | if (GNUNET_OK != | 1752 | if (GNUNET_OK != |
1753 | GNUNET_NAMESTORE_block_decrypt (block, | 1753 | GNUNET_GNSRECORD_block_decrypt (block, |
1754 | &ac->authority_info.gns_authority, | 1754 | &ac->authority_info.gns_authority, |
1755 | ac->label, | 1755 | ac->label, |
1756 | &handle_gns_resolution_result, | 1756 | &handle_gns_resolution_result, |
@@ -1783,7 +1783,7 @@ handle_dht_response (void *cls, | |||
1783 | */ | 1783 | */ |
1784 | static void | 1784 | static void |
1785 | handle_namestore_block_response (void *cls, | 1785 | handle_namestore_block_response (void *cls, |
1786 | const struct GNUNET_NAMESTORE_Block *block) | 1786 | const struct GNUNET_GNSRECORD_Block *block) |
1787 | { | 1787 | { |
1788 | struct GNS_ResolverHandle *rh = cls; | 1788 | struct GNS_ResolverHandle *rh = cls; |
1789 | struct GNS_ResolverHandle *rx; | 1789 | struct GNS_ResolverHandle *rx; |
@@ -1792,7 +1792,7 @@ handle_namestore_block_response (void *cls, | |||
1792 | const struct GNUNET_CRYPTO_EcdsaPublicKey *auth = &ac->authority_info.gns_authority; | 1792 | const struct GNUNET_CRYPTO_EcdsaPublicKey *auth = &ac->authority_info.gns_authority; |
1793 | struct GNUNET_HashCode query; | 1793 | struct GNUNET_HashCode query; |
1794 | 1794 | ||
1795 | GNUNET_NAMESTORE_query_from_public_key (auth, | 1795 | GNUNET_GNSRECORD_query_from_public_key (auth, |
1796 | label, | 1796 | label, |
1797 | &query); | 1797 | &query); |
1798 | GNUNET_assert (NULL != rh->namestore_qe); | 1798 | GNUNET_assert (NULL != rh->namestore_qe); |
@@ -1805,7 +1805,7 @@ handle_namestore_block_response (void *cls, | |||
1805 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1805 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1806 | "Starting DHT lookup for `%s' in zone %s\n", | 1806 | "Starting DHT lookup for `%s' in zone %s\n", |
1807 | ac->label, | 1807 | ac->label, |
1808 | GNUNET_NAMESTORE_z2s (&ac->authority_info.gns_authority)); | 1808 | GNUNET_GNSRECORD_z2s (&ac->authority_info.gns_authority)); |
1809 | GNUNET_assert (NULL == rh->get_handle); | 1809 | GNUNET_assert (NULL == rh->get_handle); |
1810 | rh->get_handle = GNUNET_DHT_get_start (dht_handle, | 1810 | rh->get_handle = GNUNET_DHT_get_start (dht_handle, |
1811 | GNUNET_BLOCK_TYPE_GNS_NAMERECORD, | 1811 | GNUNET_BLOCK_TYPE_GNS_NAMERECORD, |
@@ -1834,7 +1834,7 @@ handle_namestore_block_response (void *cls, | |||
1834 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1834 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1835 | "Resolution failed for `%s' in zone %s (DHT lookup not permitted by configuration)\n", | 1835 | "Resolution failed for `%s' in zone %s (DHT lookup not permitted by configuration)\n", |
1836 | ac->label, | 1836 | ac->label, |
1837 | GNUNET_NAMESTORE_z2s (&ac->authority_info.gns_authority)); | 1837 | GNUNET_GNSRECORD_z2s (&ac->authority_info.gns_authority)); |
1838 | rh->proc (rh->proc_cls, 0, NULL); | 1838 | rh->proc (rh->proc_cls, 0, NULL); |
1839 | GNS_resolver_lookup_cancel (rh); | 1839 | GNS_resolver_lookup_cancel (rh); |
1840 | return; | 1840 | return; |
@@ -1842,7 +1842,7 @@ handle_namestore_block_response (void *cls, | |||
1842 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1842 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1843 | "Decrypting block from the namestore\n"); | 1843 | "Decrypting block from the namestore\n"); |
1844 | if (GNUNET_OK != | 1844 | if (GNUNET_OK != |
1845 | GNUNET_NAMESTORE_block_decrypt (block, | 1845 | GNUNET_GNSRECORD_block_decrypt (block, |
1846 | auth, | 1846 | auth, |
1847 | label, | 1847 | label, |
1848 | &handle_gns_resolution_result, | 1848 | &handle_gns_resolution_result, |
@@ -1870,8 +1870,8 @@ recursive_gns_resolution_namestore (struct GNS_ResolverHandle *rh) | |||
1870 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1870 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1871 | "Starting GNS resolution for `%s' in zone %s\n", | 1871 | "Starting GNS resolution for `%s' in zone %s\n", |
1872 | ac->label, | 1872 | ac->label, |
1873 | GNUNET_NAMESTORE_z2s (&ac->authority_info.gns_authority)); | 1873 | GNUNET_GNSRECORD_z2s (&ac->authority_info.gns_authority)); |
1874 | GNUNET_NAMESTORE_query_from_public_key (&ac->authority_info.gns_authority, | 1874 | GNUNET_GNSRECORD_query_from_public_key (&ac->authority_info.gns_authority, |
1875 | ac->label, | 1875 | ac->label, |
1876 | &query); | 1876 | &query); |
1877 | rh->namestore_qe = GNUNET_NAMESTORE_lookup_block (namestore_handle, | 1877 | rh->namestore_qe = GNUNET_NAMESTORE_lookup_block (namestore_handle, |
diff --git a/src/gns/gnunet-service-gns_resolver.h b/src/gns/gnunet-service-gns_resolver.h index 06273766a..12d2eec11 100644 --- a/src/gns/gnunet-service-gns_resolver.h +++ b/src/gns/gnunet-service-gns_resolver.h | |||
@@ -66,7 +66,7 @@ struct GNS_ResolverHandle; | |||
66 | */ | 66 | */ |
67 | typedef void (*GNS_ResultProcessor)(void *cls, | 67 | typedef void (*GNS_ResultProcessor)(void *cls, |
68 | uint32_t rd_count, | 68 | uint32_t rd_count, |
69 | const struct GNUNET_NAMESTORE_RecordData *rd); | 69 | const struct GNUNET_GNSRECORD_Data *rd); |
70 | 70 | ||
71 | 71 | ||
72 | /** | 72 | /** |
diff --git a/src/gns/gnunet-service-gns_shorten.c b/src/gns/gnunet-service-gns_shorten.c index 3ec03a5ef..3e612e862 100644 --- a/src/gns/gnunet-service-gns_shorten.c +++ b/src/gns/gnunet-service-gns_shorten.c | |||
@@ -181,7 +181,7 @@ create_pkey_cont (void* cls, | |||
181 | static void | 181 | static void |
182 | process_pseu_lookup_ns (void *cls, | 182 | process_pseu_lookup_ns (void *cls, |
183 | unsigned int rd_count, | 183 | unsigned int rd_count, |
184 | const struct GNUNET_NAMESTORE_RecordData *rd); | 184 | const struct GNUNET_GNSRECORD_Data *rd); |
185 | 185 | ||
186 | 186 | ||
187 | /** | 187 | /** |
@@ -193,7 +193,7 @@ process_pseu_lookup_ns (void *cls, | |||
193 | */ | 193 | */ |
194 | static void | 194 | static void |
195 | process_pseu_block_ns (void *cls, | 195 | process_pseu_block_ns (void *cls, |
196 | const struct GNUNET_NAMESTORE_Block *block) | 196 | const struct GNUNET_GNSRECORD_Block *block) |
197 | { | 197 | { |
198 | struct GetPseuAuthorityHandle *gph = cls; | 198 | struct GetPseuAuthorityHandle *gph = cls; |
199 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; | 199 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; |
@@ -207,7 +207,7 @@ process_pseu_block_ns (void *cls, | |||
207 | GNUNET_CRYPTO_ecdsa_key_get_public (&gph->shorten_zone_key, | 207 | GNUNET_CRYPTO_ecdsa_key_get_public (&gph->shorten_zone_key, |
208 | &pub); | 208 | &pub); |
209 | if (GNUNET_OK != | 209 | if (GNUNET_OK != |
210 | GNUNET_NAMESTORE_block_decrypt (block, | 210 | GNUNET_GNSRECORD_block_decrypt (block, |
211 | &pub, | 211 | &pub, |
212 | gph->current_label, | 212 | gph->current_label, |
213 | &process_pseu_lookup_ns, | 213 | &process_pseu_lookup_ns, |
@@ -237,7 +237,7 @@ perform_pseu_lookup (struct GetPseuAuthorityHandle *gph, | |||
237 | &pub); | 237 | &pub); |
238 | GNUNET_free_non_null (gph->current_label); | 238 | GNUNET_free_non_null (gph->current_label); |
239 | gph->current_label = GNUNET_strdup (label); | 239 | gph->current_label = GNUNET_strdup (label); |
240 | GNUNET_NAMESTORE_query_from_public_key (&pub, | 240 | GNUNET_GNSRECORD_query_from_public_key (&pub, |
241 | label, | 241 | label, |
242 | &query); | 242 | &query); |
243 | gph->namestore_task = GNUNET_NAMESTORE_lookup_block (namestore_handle, | 243 | gph->namestore_task = GNUNET_NAMESTORE_lookup_block (namestore_handle, |
@@ -258,10 +258,10 @@ perform_pseu_lookup (struct GetPseuAuthorityHandle *gph, | |||
258 | static void | 258 | static void |
259 | process_pseu_lookup_ns (void *cls, | 259 | process_pseu_lookup_ns (void *cls, |
260 | unsigned int rd_count, | 260 | unsigned int rd_count, |
261 | const struct GNUNET_NAMESTORE_RecordData *rd) | 261 | const struct GNUNET_GNSRECORD_Data *rd) |
262 | { | 262 | { |
263 | struct GetPseuAuthorityHandle *gph = cls; | 263 | struct GetPseuAuthorityHandle *gph = cls; |
264 | struct GNUNET_NAMESTORE_RecordData new_pkey; | 264 | struct GNUNET_GNSRECORD_Data new_pkey; |
265 | 265 | ||
266 | gph->namestore_task = NULL; | 266 | gph->namestore_task = NULL; |
267 | if (rd_count > 0) | 267 | if (rd_count > 0) |
@@ -285,15 +285,15 @@ process_pseu_lookup_ns (void *cls, | |||
285 | /* name is available */ | 285 | /* name is available */ |
286 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 286 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
287 | "Shortening `%s' to `%s'\n", | 287 | "Shortening `%s' to `%s'\n", |
288 | GNUNET_NAMESTORE_z2s (&gph->target_zone), | 288 | GNUNET_GNSRECORD_z2s (&gph->target_zone), |
289 | gph->current_label); | 289 | gph->current_label); |
290 | new_pkey.expiration_time = UINT64_MAX; | 290 | new_pkey.expiration_time = UINT64_MAX; |
291 | new_pkey.data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey); | 291 | new_pkey.data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey); |
292 | new_pkey.data = &gph->target_zone; | 292 | new_pkey.data = &gph->target_zone; |
293 | new_pkey.record_type = GNUNET_GNSRECORD_TYPE_PKEY; | 293 | new_pkey.record_type = GNUNET_GNSRECORD_TYPE_PKEY; |
294 | new_pkey.flags = GNUNET_NAMESTORE_RF_NONE | 294 | new_pkey.flags = GNUNET_GNSRECORD_RF_NONE |
295 | | GNUNET_NAMESTORE_RF_PRIVATE | 295 | | GNUNET_GNSRECORD_RF_PRIVATE |
296 | | GNUNET_NAMESTORE_RF_PENDING; | 296 | | GNUNET_GNSRECORD_RF_PENDING; |
297 | gph->namestore_task | 297 | gph->namestore_task |
298 | = GNUNET_NAMESTORE_records_store (namestore_handle, | 298 | = GNUNET_NAMESTORE_records_store (namestore_handle, |
299 | &gph->shorten_zone_key, | 299 | &gph->shorten_zone_key, |
@@ -358,7 +358,7 @@ handle_auth_discovery_timeout (void *cls, | |||
358 | static void | 358 | static void |
359 | process_auth_records (void *cls, | 359 | process_auth_records (void *cls, |
360 | unsigned int rd_count, | 360 | unsigned int rd_count, |
361 | const struct GNUNET_NAMESTORE_RecordData *rd) | 361 | const struct GNUNET_GNSRECORD_Data *rd) |
362 | { | 362 | { |
363 | struct GetPseuAuthorityHandle *gph = cls; | 363 | struct GetPseuAuthorityHandle *gph = cls; |
364 | unsigned int i; | 364 | unsigned int i; |
@@ -412,7 +412,7 @@ process_auth_discovery_dht_result (void* cls, | |||
412 | const void *data) | 412 | const void *data) |
413 | { | 413 | { |
414 | struct GetPseuAuthorityHandle *gph = cls; | 414 | struct GetPseuAuthorityHandle *gph = cls; |
415 | const struct GNUNET_NAMESTORE_Block *block; | 415 | const struct GNUNET_GNSRECORD_Block *block; |
416 | 416 | ||
417 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 417 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
418 | "Got DHT result for PSEU request\n"); | 418 | "Got DHT result for PSEU request\n"); |
@@ -428,7 +428,7 @@ process_auth_discovery_dht_result (void* cls, | |||
428 | process_pseu_result (gph, NULL); | 428 | process_pseu_result (gph, NULL); |
429 | return; | 429 | return; |
430 | } | 430 | } |
431 | if (size < sizeof (struct GNUNET_NAMESTORE_Block)) | 431 | if (size < sizeof (struct GNUNET_GNSRECORD_Block)) |
432 | { | 432 | { |
433 | /* how did this pass DHT block validation!? */ | 433 | /* how did this pass DHT block validation!? */ |
434 | GNUNET_break (0); | 434 | GNUNET_break (0); |
@@ -447,7 +447,7 @@ process_auth_discovery_dht_result (void* cls, | |||
447 | return; | 447 | return; |
448 | } | 448 | } |
449 | if (GNUNET_OK != | 449 | if (GNUNET_OK != |
450 | GNUNET_NAMESTORE_block_decrypt (block, | 450 | GNUNET_GNSRECORD_block_decrypt (block, |
451 | &gph->target_zone, | 451 | &gph->target_zone, |
452 | GNUNET_GNS_TLD_PLUS, | 452 | GNUNET_GNS_TLD_PLUS, |
453 | &process_auth_records, | 453 | &process_auth_records, |
@@ -476,7 +476,7 @@ process_zone_to_name_discover (void *cls, | |||
476 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 476 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
477 | const char *name, | 477 | const char *name, |
478 | unsigned int rd_len, | 478 | unsigned int rd_len, |
479 | const struct GNUNET_NAMESTORE_RecordData *rd) | 479 | const struct GNUNET_GNSRECORD_Data *rd) |
480 | { | 480 | { |
481 | struct GetPseuAuthorityHandle* gph = cls; | 481 | struct GetPseuAuthorityHandle* gph = cls; |
482 | struct GNUNET_HashCode lookup_key; | 482 | struct GNUNET_HashCode lookup_key; |
@@ -492,7 +492,7 @@ process_zone_to_name_discover (void *cls, | |||
492 | return; | 492 | return; |
493 | } | 493 | } |
494 | /* record does not yet exist, go into DHT to find PSEU record */ | 494 | /* record does not yet exist, go into DHT to find PSEU record */ |
495 | GNUNET_NAMESTORE_query_from_public_key (&gph->target_zone, | 495 | GNUNET_GNSRECORD_query_from_public_key (&gph->target_zone, |
496 | GNUNET_GNS_TLD_PLUS, | 496 | GNUNET_GNS_TLD_PLUS, |
497 | &lookup_key); | 497 | &lookup_key); |
498 | gph->timeout_task = GNUNET_SCHEDULER_add_delayed (DHT_LOOKUP_TIMEOUT, | 498 | gph->timeout_task = GNUNET_SCHEDULER_add_delayed (DHT_LOOKUP_TIMEOUT, |
@@ -533,7 +533,7 @@ GNS_shorten_start (const char *original_label, | |||
533 | } | 533 | } |
534 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 534 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
535 | "Starting shortening process for `%s' with old label `%s'\n", | 535 | "Starting shortening process for `%s' with old label `%s'\n", |
536 | GNUNET_NAMESTORE_z2s (pub), | 536 | GNUNET_GNSRECORD_z2s (pub), |
537 | original_label); | 537 | original_label); |
538 | gph = GNUNET_new (struct GetPseuAuthorityHandle); | 538 | gph = GNUNET_new (struct GetPseuAuthorityHandle); |
539 | gph->shorten_zone_key = *shorten_zone; | 539 | gph->shorten_zone_key = *shorten_zone; |
diff --git a/src/gns/plugin_block_gns.c b/src/gns/plugin_block_gns.c index ad2e6594e..65cf69f72 100644 --- a/src/gns/plugin_block_gns.c +++ b/src/gns/plugin_block_gns.c | |||
@@ -61,7 +61,7 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, | |||
61 | size_t xquery_size, const void *reply_block, | 61 | size_t xquery_size, const void *reply_block, |
62 | size_t reply_block_size) | 62 | size_t reply_block_size) |
63 | { | 63 | { |
64 | const struct GNUNET_NAMESTORE_Block *block; | 64 | const struct GNUNET_GNSRECORD_Block *block; |
65 | struct GNUNET_HashCode h; | 65 | struct GNUNET_HashCode h; |
66 | struct GNUNET_HashCode chash; | 66 | struct GNUNET_HashCode chash; |
67 | struct GNUNET_HashCode mhash; | 67 | struct GNUNET_HashCode mhash; |
@@ -79,7 +79,7 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, | |||
79 | } | 79 | } |
80 | 80 | ||
81 | /* this is a reply */ | 81 | /* this is a reply */ |
82 | if (reply_block_size < sizeof (struct GNUNET_NAMESTORE_Block)) | 82 | if (reply_block_size < sizeof (struct GNUNET_GNSRECORD_Block)) |
83 | { | 83 | { |
84 | GNUNET_break_op (0); | 84 | GNUNET_break_op (0); |
85 | return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; | 85 | return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; |
@@ -100,7 +100,7 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, | |||
100 | return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; | 100 | return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; |
101 | } | 101 | } |
102 | if (GNUNET_OK != | 102 | if (GNUNET_OK != |
103 | GNUNET_NAMESTORE_block_verify (block)) | 103 | GNUNET_GNSRECORD_block_verify (block)) |
104 | { | 104 | { |
105 | GNUNET_break_op (0); | 105 | GNUNET_break_op (0); |
106 | return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; | 106 | return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; |
@@ -140,11 +140,11 @@ block_plugin_gns_get_key (void *cls, enum GNUNET_BLOCK_Type type, | |||
140 | const void *reply_block, size_t reply_block_size, | 140 | const void *reply_block, size_t reply_block_size, |
141 | struct GNUNET_HashCode *key) | 141 | struct GNUNET_HashCode *key) |
142 | { | 142 | { |
143 | const struct GNUNET_NAMESTORE_Block *block; | 143 | const struct GNUNET_GNSRECORD_Block *block; |
144 | 144 | ||
145 | if (type != GNUNET_BLOCK_TYPE_GNS_NAMERECORD) | 145 | if (type != GNUNET_BLOCK_TYPE_GNS_NAMERECORD) |
146 | return GNUNET_SYSERR; | 146 | return GNUNET_SYSERR; |
147 | if (reply_block_size < sizeof (struct GNUNET_NAMESTORE_Block)) | 147 | if (reply_block_size < sizeof (struct GNUNET_GNSRECORD_Block)) |
148 | { | 148 | { |
149 | GNUNET_break_op (0); | 149 | GNUNET_break_op (0); |
150 | return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; | 150 | return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; |
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c index 25127d747..eac9e4449 100644 --- a/src/gns/test_gns_proxy.c +++ b/src/gns/test_gns_proxy.c | |||
@@ -365,7 +365,7 @@ run (void *cls, | |||
365 | { | 365 | { |
366 | enum MHD_FLAG flags; | 366 | enum MHD_FLAG flags; |
367 | struct GNUNET_CRYPTO_EcdsaPrivateKey *host_key; | 367 | struct GNUNET_CRYPTO_EcdsaPrivateKey *host_key; |
368 | struct GNUNET_NAMESTORE_RecordData rd; | 368 | struct GNUNET_GNSRECORD_Data rd; |
369 | char *zone_keyfile; | 369 | char *zone_keyfile; |
370 | 370 | ||
371 | namestore = GNUNET_NAMESTORE_connect (cfg); | 371 | namestore = GNUNET_NAMESTORE_connect (cfg); |
diff --git a/src/gns/test_gns_pseu_shorten.c b/src/gns/test_gns_pseu_shorten.c index 6bcc18999..5214db8f8 100644 --- a/src/gns/test_gns_pseu_shorten.c +++ b/src/gns/test_gns_pseu_shorten.c | |||
@@ -181,7 +181,7 @@ process_shorten_result (void* cls, const char* sname) | |||
181 | 181 | ||
182 | static void | 182 | static void |
183 | on_lookup_result (void *cls, uint32_t rd_count, | 183 | on_lookup_result (void *cls, uint32_t rd_count, |
184 | const struct GNUNET_NAMESTORE_RecordData *rd) | 184 | const struct GNUNET_GNSRECORD_Data *rd) |
185 | { | 185 | { |
186 | struct in_addr a; | 186 | struct in_addr a; |
187 | int i; | 187 | int i; |
@@ -266,9 +266,9 @@ put_pseu_dht (void *cls, int success) | |||
266 | uint32_t rd_payload_length; | 266 | uint32_t rd_payload_length; |
267 | char* nrb_data = NULL; | 267 | char* nrb_data = NULL; |
268 | struct GNUNET_CRYPTO_EcdsaSignature *sig; | 268 | struct GNUNET_CRYPTO_EcdsaSignature *sig; |
269 | struct GNUNET_NAMESTORE_RecordData rd; | 269 | struct GNUNET_GNSRECORD_Data rd; |
270 | 270 | ||
271 | memset (&rd, 0, sizeof (struct GNUNET_NAMESTORE_RecordData)); | 271 | memset (&rd, 0, sizeof (struct GNUNET_GNSRECORD_Data)); |
272 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; | 272 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; |
273 | rd.data_size = strlen(TEST_PSEU_ALICE)+1; | 273 | rd.data_size = strlen(TEST_PSEU_ALICE)+1; |
274 | rd.data = TEST_PSEU_ALICE; | 274 | rd.data = TEST_PSEU_ALICE; |
@@ -288,7 +288,7 @@ put_pseu_dht (void *cls, int success) | |||
288 | 1, | 288 | 1, |
289 | &rd, | 289 | &rd, |
290 | sig)); | 290 | sig)); |
291 | rd_payload_length = GNUNET_NAMESTORE_records_get_size (1, &rd); | 291 | rd_payload_length = GNUNET_GNSRECORD_records_get_size (1, &rd); |
292 | nrb = GNUNET_malloc(rd_payload_length + strlen(GNUNET_GNS_MASTERZONE_STR) + 1 | 292 | nrb = GNUNET_malloc(rd_payload_length + strlen(GNUNET_GNS_MASTERZONE_STR) + 1 |
293 | + sizeof(struct GNSNameRecordBlock)); | 293 | + sizeof(struct GNSNameRecordBlock)); |
294 | nrb->signature = *sig; | 294 | nrb->signature = *sig; |
@@ -299,7 +299,7 @@ put_pseu_dht (void *cls, int success) | |||
299 | nrb_data = (char*)&nrb[1]; | 299 | nrb_data = (char*)&nrb[1]; |
300 | nrb_data += strlen(GNUNET_GNS_MASTERZONE_STR) + 1; | 300 | nrb_data += strlen(GNUNET_GNS_MASTERZONE_STR) + 1; |
301 | 301 | ||
302 | if (-1 == GNUNET_NAMESTORE_records_serialize (1, | 302 | if (-1 == GNUNET_GNSRECORD_records_serialize (1, |
303 | &rd, | 303 | &rd, |
304 | rd_payload_length, | 304 | rd_payload_length, |
305 | nrb_data)) | 305 | nrb_data)) |
@@ -354,7 +354,7 @@ put_www_dht (void *cls, int success) | |||
354 | uint32_t rd_payload_length; | 354 | uint32_t rd_payload_length; |
355 | char* nrb_data = NULL; | 355 | char* nrb_data = NULL; |
356 | struct GNUNET_CRYPTO_EcdsaSignature *sig; | 356 | struct GNUNET_CRYPTO_EcdsaSignature *sig; |
357 | struct GNUNET_NAMESTORE_RecordData rd; | 357 | struct GNUNET_GNSRECORD_Data rd; |
358 | char* ip = TEST_IP; | 358 | char* ip = TEST_IP; |
359 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); | 359 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); |
360 | 360 | ||
@@ -363,7 +363,7 @@ put_www_dht (void *cls, int success) | |||
363 | rd.data_size = sizeof(struct in_addr); | 363 | rd.data_size = sizeof(struct in_addr); |
364 | rd.data = web; | 364 | rd.data = web; |
365 | rd.record_type = GNUNET_DNSPARSER_TYPE_A; | 365 | rd.record_type = GNUNET_DNSPARSER_TYPE_A; |
366 | rd.flags = GNUNET_NAMESTORE_RF_NONE; | 366 | rd.flags = GNUNET_GNSRECORD_RF_NONE; |
367 | 367 | ||
368 | sig = GNUNET_NAMESTORE_create_signature(alice_key, | 368 | sig = GNUNET_NAMESTORE_create_signature(alice_key, |
369 | GNUNET_TIME_UNIT_FOREVER_ABS, | 369 | GNUNET_TIME_UNIT_FOREVER_ABS, |
@@ -376,7 +376,7 @@ put_www_dht (void *cls, int success) | |||
376 | 1, | 376 | 1, |
377 | &rd, | 377 | &rd, |
378 | sig)); | 378 | sig)); |
379 | rd_payload_length = GNUNET_NAMESTORE_records_get_size (1, &rd); | 379 | rd_payload_length = GNUNET_GNSRECORD_records_get_size (1, &rd); |
380 | nrb = GNUNET_malloc(rd_payload_length + strlen(TEST_RECORD_NAME) + 1 | 380 | nrb = GNUNET_malloc(rd_payload_length + strlen(TEST_RECORD_NAME) + 1 |
381 | + sizeof(struct GNSNameRecordBlock)); | 381 | + sizeof(struct GNSNameRecordBlock)); |
382 | nrb->signature = *sig; | 382 | nrb->signature = *sig; |
@@ -387,7 +387,7 @@ put_www_dht (void *cls, int success) | |||
387 | nrb_data = (char*)&nrb[1]; | 387 | nrb_data = (char*)&nrb[1]; |
388 | nrb_data += strlen(TEST_RECORD_NAME) + 1; | 388 | nrb_data += strlen(TEST_RECORD_NAME) + 1; |
389 | 389 | ||
390 | if (-1 == GNUNET_NAMESTORE_records_serialize (1, | 390 | if (-1 == GNUNET_GNSRECORD_records_serialize (1, |
391 | &rd, | 391 | &rd, |
392 | rd_payload_length, | 392 | rd_payload_length, |
393 | nrb_data)) | 393 | nrb_data)) |
@@ -442,13 +442,13 @@ put_pkey_dht (void *cls, int32_t success, const char *emsg) | |||
442 | uint32_t rd_payload_length; | 442 | uint32_t rd_payload_length; |
443 | char* nrb_data = NULL; | 443 | char* nrb_data = NULL; |
444 | struct GNUNET_CRYPTO_EcdsaSignature *sig; | 444 | struct GNUNET_CRYPTO_EcdsaSignature *sig; |
445 | struct GNUNET_NAMESTORE_RecordData rd; | 445 | struct GNUNET_GNSRECORD_Data rd; |
446 | 446 | ||
447 | rd.expiration_time = UINT64_MAX; | 447 | rd.expiration_time = UINT64_MAX; |
448 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); | 448 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); |
449 | rd.data = &alice_hash; | 449 | rd.data = &alice_hash; |
450 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; | 450 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; |
451 | rd.flags = GNUNET_NAMESTORE_RF_NONE; | 451 | rd.flags = GNUNET_GNSRECORD_RF_NONE; |
452 | 452 | ||
453 | sig = GNUNET_NAMESTORE_create_signature (bob_key, | 453 | sig = GNUNET_NAMESTORE_create_signature (bob_key, |
454 | GNUNET_TIME_UNIT_FOREVER_ABS, | 454 | GNUNET_TIME_UNIT_FOREVER_ABS, |
@@ -456,7 +456,7 @@ put_pkey_dht (void *cls, int32_t success, const char *emsg) | |||
456 | &rd, | 456 | &rd, |
457 | 1); | 457 | 1); |
458 | 458 | ||
459 | rd_payload_length = GNUNET_NAMESTORE_records_get_size (1, &rd); | 459 | rd_payload_length = GNUNET_GNSRECORD_records_get_size (1, &rd); |
460 | nrb = GNUNET_malloc(rd_payload_length + strlen(TEST_AUTHORITY_ALICE) + 1 | 460 | nrb = GNUNET_malloc(rd_payload_length + strlen(TEST_AUTHORITY_ALICE) + 1 |
461 | + sizeof(struct GNSNameRecordBlock)); | 461 | + sizeof(struct GNSNameRecordBlock)); |
462 | nrb->signature = *sig; | 462 | nrb->signature = *sig; |
@@ -467,7 +467,7 @@ put_pkey_dht (void *cls, int32_t success, const char *emsg) | |||
467 | nrb_data = (char*)&nrb[1]; | 467 | nrb_data = (char*)&nrb[1]; |
468 | nrb_data += strlen(TEST_AUTHORITY_ALICE) + 1; | 468 | nrb_data += strlen(TEST_AUTHORITY_ALICE) + 1; |
469 | 469 | ||
470 | if (-1 == GNUNET_NAMESTORE_records_serialize (1, | 470 | if (-1 == GNUNET_GNSRECORD_records_serialize (1, |
471 | &rd, | 471 | &rd, |
472 | rd_payload_length, | 472 | rd_payload_length, |
473 | nrb_data)) | 473 | nrb_data)) |
@@ -514,12 +514,12 @@ put_pkey_dht (void *cls, int32_t success, const char *emsg) | |||
514 | static void | 514 | static void |
515 | fin_init_zone (void *cls, int32_t success, const char *emsg) | 515 | fin_init_zone (void *cls, int32_t success, const char *emsg) |
516 | { | 516 | { |
517 | struct GNUNET_NAMESTORE_RecordData rd; | 517 | struct GNUNET_GNSRECORD_Data rd; |
518 | rd.expiration_time = UINT64_MAX; | 518 | rd.expiration_time = UINT64_MAX; |
519 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); | 519 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); |
520 | rd.data = &bob_hash; | 520 | rd.data = &bob_hash; |
521 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; | 521 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; |
522 | rd.flags = GNUNET_NAMESTORE_RF_NONE; | 522 | rd.flags = GNUNET_GNSRECORD_RF_NONE; |
523 | 523 | ||
524 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, | 524 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, |
525 | our_key, | 525 | our_key, |
@@ -534,13 +534,13 @@ static void | |||
534 | cont_init_zone (void *cls, int32_t success, const char *emsg) | 534 | cont_init_zone (void *cls, int32_t success, const char *emsg) |
535 | { | 535 | { |
536 | 536 | ||
537 | struct GNUNET_NAMESTORE_RecordData rd; | 537 | struct GNUNET_GNSRECORD_Data rd; |
538 | 538 | ||
539 | rd.expiration_time = UINT64_MAX; | 539 | rd.expiration_time = UINT64_MAX; |
540 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); | 540 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); |
541 | rd.data = &short_zone; | 541 | rd.data = &short_zone; |
542 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; | 542 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; |
543 | rd.flags = GNUNET_NAMESTORE_RF_NONE; | 543 | rd.flags = GNUNET_GNSRECORD_RF_NONE; |
544 | 544 | ||
545 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, | 545 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, |
546 | priv_key, | 546 | priv_key, |
@@ -559,7 +559,7 @@ do_check (void *cls, | |||
559 | char *private_keyfile; | 559 | char *private_keyfile; |
560 | char *shorten_keyfile; | 560 | char *shorten_keyfile; |
561 | char *our_keyfile; | 561 | char *our_keyfile; |
562 | struct GNUNET_NAMESTORE_RecordData rd; | 562 | struct GNUNET_GNSRECORD_Data rd; |
563 | 563 | ||
564 | cfg = ccfg; | 564 | cfg = ccfg; |
565 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); | 565 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); |
@@ -641,7 +641,7 @@ do_check (void *cls, | |||
641 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); | 641 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); |
642 | rd.data = &priv_zone; | 642 | rd.data = &priv_zone; |
643 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; | 643 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; |
644 | rd.flags = GNUNET_NAMESTORE_RF_NONE; | 644 | rd.flags = GNUNET_GNSRECORD_RF_NONE; |
645 | 645 | ||
646 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, | 646 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, |
647 | our_key, | 647 | our_key, |
diff --git a/src/gns/test_gns_revocation.c b/src/gns/test_gns_revocation.c index 555e44a20..738bda318 100644 --- a/src/gns/test_gns_revocation.c +++ b/src/gns/test_gns_revocation.c | |||
@@ -104,7 +104,7 @@ shutdown_task (void *cls, | |||
104 | 104 | ||
105 | static void | 105 | static void |
106 | on_lookup_result(void *cls, uint32_t rd_count, | 106 | on_lookup_result(void *cls, uint32_t rd_count, |
107 | const struct GNUNET_NAMESTORE_RecordData *rd) | 107 | const struct GNUNET_GNSRECORD_Data *rd) |
108 | { | 108 | { |
109 | struct in_addr a; | 109 | struct in_addr a; |
110 | int i; | 110 | int i; |
@@ -216,7 +216,7 @@ do_check (void *cls, | |||
216 | GNUNET_CRYPTO_ecdsa_key_get_public (alice_key, &alice_pkey); | 216 | GNUNET_CRYPTO_ecdsa_key_get_public (alice_key, &alice_pkey); |
217 | GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey); | 217 | GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey); |
218 | 218 | ||
219 | struct GNUNET_NAMESTORE_RecordData rd; | 219 | struct GNUNET_GNSRECORD_Data rd; |
220 | char* ip = TEST_IP; | 220 | char* ip = TEST_IP; |
221 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); | 221 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); |
222 | rd.expiration_time = UINT64_MAX; | 222 | rd.expiration_time = UINT64_MAX; |
@@ -227,7 +227,7 @@ do_check (void *cls, | |||
227 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); | 227 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); |
228 | rd.data = &bob_hash; | 228 | rd.data = &bob_hash; |
229 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; | 229 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; |
230 | rd.flags = GNUNET_NAMESTORE_RF_NONE; | 230 | rd.flags = GNUNET_GNSRECORD_RF_NONE; |
231 | 231 | ||
232 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, | 232 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, |
233 | alice_key, | 233 | alice_key, |
diff --git a/src/gns/test_gns_simple_shorten.c b/src/gns/test_gns_simple_shorten.c index 2b4543f4e..74fe77446 100644 --- a/src/gns/test_gns_simple_shorten.c +++ b/src/gns/test_gns_simple_shorten.c | |||
@@ -246,7 +246,7 @@ void do_check (void *cls, | |||
246 | GNUNET_CRYPTO_short_hash(&priv_pkey, sizeof(priv_pkey), &priv_zone); | 246 | GNUNET_CRYPTO_short_hash(&priv_pkey, sizeof(priv_pkey), &priv_zone); |
247 | GNUNET_CRYPTO_short_hash(&short_pkey, sizeof(short_pkey), &short_zone); | 247 | GNUNET_CRYPTO_short_hash(&short_pkey, sizeof(short_pkey), &short_zone); |
248 | 248 | ||
249 | struct GNUNET_NAMESTORE_RecordData rd; | 249 | struct GNUNET_GNSRECORD_Data rd; |
250 | char* ip = TEST_IP; | 250 | char* ip = TEST_IP; |
251 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); | 251 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); |
252 | rd.expiration_time = UINT64_MAX; | 252 | rd.expiration_time = UINT64_MAX; |
@@ -257,7 +257,7 @@ void do_check (void *cls, | |||
257 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); | 257 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); |
258 | rd.data = &bob_hash; | 258 | rd.data = &bob_hash; |
259 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; | 259 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; |
260 | rd.flags = GNUNET_NAMESTORE_RF_NONE; | 260 | rd.flags = GNUNET_GNSRECORD_RF_NONE; |
261 | 261 | ||
262 | /* put bob into our zone */ | 262 | /* put bob into our zone */ |
263 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, | 263 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, |
diff --git a/src/gns/test_gns_simple_srv_lookup.c b/src/gns/test_gns_simple_srv_lookup.c index 162e9dc93..ce8478d7d 100644 --- a/src/gns/test_gns_simple_srv_lookup.c +++ b/src/gns/test_gns_simple_srv_lookup.c | |||
@@ -104,7 +104,7 @@ static void shutdown_task (void *cls, | |||
104 | 104 | ||
105 | static void | 105 | static void |
106 | on_lookup_result(void *cls, uint32_t rd_count, | 106 | on_lookup_result(void *cls, uint32_t rd_count, |
107 | const struct GNUNET_NAMESTORE_RecordData *rd) | 107 | const struct GNUNET_GNSRECORD_Data *rd) |
108 | { | 108 | { |
109 | int i; | 109 | int i; |
110 | uint16_t *srv_data; | 110 | uint16_t *srv_data; |
@@ -219,7 +219,7 @@ do_check (void *cls, | |||
219 | GNUNET_CRYPTO_ecdsa_key_get_public (alice_key, &alice_pkey); | 219 | GNUNET_CRYPTO_ecdsa_key_get_public (alice_key, &alice_pkey); |
220 | GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey); | 220 | GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey); |
221 | 221 | ||
222 | struct GNUNET_NAMESTORE_RecordData rd; | 222 | struct GNUNET_GNSRECORD_Data rd; |
223 | char* ip = TEST_IP; | 223 | char* ip = TEST_IP; |
224 | struct in_addr *sipserver = GNUNET_malloc (sizeof (struct in_addr)); | 224 | struct in_addr *sipserver = GNUNET_malloc (sizeof (struct in_addr)); |
225 | srv_data = GNUNET_malloc (sizeof (struct GNUNET_TUN_DnsSrvRecord) + strlen (TEST_SRV_NAME) + 1); | 225 | srv_data = GNUNET_malloc (sizeof (struct GNUNET_TUN_DnsSrvRecord) + strlen (TEST_SRV_NAME) + 1); |
@@ -235,7 +235,7 @@ do_check (void *cls, | |||
235 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); | 235 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); |
236 | rd.data = &bob_hash; | 236 | rd.data = &bob_hash; |
237 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; | 237 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; |
238 | rd.flags = GNUNET_NAMESTORE_RF_NONE; | 238 | rd.flags = GNUNET_GNSRECORD_RF_NONE; |
239 | 239 | ||
240 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, | 240 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, |
241 | alice_key, | 241 | alice_key, |
diff --git a/src/gns/test_gns_simple_zkey_lookup.c b/src/gns/test_gns_simple_zkey_lookup.c index 6e8ec9ff4..6907362b8 100644 --- a/src/gns/test_gns_simple_zkey_lookup.c +++ b/src/gns/test_gns_simple_zkey_lookup.c | |||
@@ -105,7 +105,7 @@ shutdown_task (void *cls, | |||
105 | 105 | ||
106 | static void | 106 | static void |
107 | on_lookup_result(void *cls, uint32_t rd_count, | 107 | on_lookup_result(void *cls, uint32_t rd_count, |
108 | const struct GNUNET_NAMESTORE_RecordData *rd) | 108 | const struct GNUNET_GNSRECORD_Data *rd) |
109 | { | 109 | { |
110 | struct in_addr a; | 110 | struct in_addr a; |
111 | int i; | 111 | int i; |
@@ -233,7 +233,7 @@ do_check (void *cls, | |||
233 | GNUNET_CRYPTO_ecdsa_key_get_public (alice_key, &alice_pkey); | 233 | GNUNET_CRYPTO_ecdsa_key_get_public (alice_key, &alice_pkey); |
234 | GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey); | 234 | GNUNET_CRYPTO_ecdsa_key_get_public (bob_key, &bob_pkey); |
235 | 235 | ||
236 | struct GNUNET_NAMESTORE_RecordData rd; | 236 | struct GNUNET_GNSRECORD_Data rd; |
237 | char* ip = TEST_IP; | 237 | char* ip = TEST_IP; |
238 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); | 238 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); |
239 | rd.expiration_time = UINT64_MAX; | 239 | rd.expiration_time = UINT64_MAX; |
@@ -244,7 +244,7 @@ do_check (void *cls, | |||
244 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); | 244 | rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode); |
245 | rd.data = &bob_hash; | 245 | rd.data = &bob_hash; |
246 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; | 246 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; |
247 | rd.flags = GNUNET_NAMESTORE_RF_NONE; | 247 | rd.flags = GNUNET_GNSRECORD_RF_NONE; |
248 | 248 | ||
249 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, | 249 | GNUNET_NAMESTORE_record_put_by_authority (namestore_handle, |
250 | alice_key, | 250 | alice_key, |
diff --git a/src/gnsrecord/gnsrecord_crypto.c b/src/gnsrecord/gnsrecord_crypto.c index 823ffcae3..99a97dcdd 100644 --- a/src/gnsrecord/gnsrecord_crypto.c +++ b/src/gnsrecord/gnsrecord_crypto.c | |||
@@ -78,30 +78,30 @@ derive_block_aes_key (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, | |||
78 | * @param rd_count number of records | 78 | * @param rd_count number of records |
79 | * @return NULL on error (block too large) | 79 | * @return NULL on error (block too large) |
80 | */ | 80 | */ |
81 | struct GNUNET_NAMESTORE_Block * | 81 | struct GNUNET_GNSRECORD_Block * |
82 | GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | 82 | GNUNET_GNSRECORD_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, |
83 | struct GNUNET_TIME_Absolute expire, | 83 | struct GNUNET_TIME_Absolute expire, |
84 | const char *label, | 84 | const char *label, |
85 | const struct GNUNET_NAMESTORE_RecordData *rd, | 85 | const struct GNUNET_GNSRECORD_Data *rd, |
86 | unsigned int rd_count) | 86 | unsigned int rd_count) |
87 | { | 87 | { |
88 | size_t payload_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); | 88 | size_t payload_len = GNUNET_GNSRECORD_records_get_size (rd_count, rd); |
89 | char payload[sizeof (uint32_t) + payload_len]; | 89 | char payload[sizeof (uint32_t) + payload_len]; |
90 | struct GNUNET_NAMESTORE_Block *block; | 90 | struct GNUNET_GNSRECORD_Block *block; |
91 | struct GNUNET_CRYPTO_EcdsaPublicKey pkey; | 91 | struct GNUNET_CRYPTO_EcdsaPublicKey pkey; |
92 | struct GNUNET_CRYPTO_EcdsaPrivateKey *dkey; | 92 | struct GNUNET_CRYPTO_EcdsaPrivateKey *dkey; |
93 | struct GNUNET_CRYPTO_SymmetricInitializationVector iv; | 93 | struct GNUNET_CRYPTO_SymmetricInitializationVector iv; |
94 | struct GNUNET_CRYPTO_SymmetricSessionKey skey; | 94 | struct GNUNET_CRYPTO_SymmetricSessionKey skey; |
95 | uint32_t rd_count_nbo; | 95 | uint32_t rd_count_nbo; |
96 | 96 | ||
97 | if (payload_len > GNUNET_NAMESTORE_MAX_VALUE_SIZE) | 97 | if (payload_len > GNUNET_GNSRECORD_MAX_BLOCK_SIZE) |
98 | return NULL; | 98 | return NULL; |
99 | rd_count_nbo = htonl (rd_count); | 99 | rd_count_nbo = htonl (rd_count); |
100 | memcpy (payload, &rd_count_nbo, sizeof (uint32_t)); | 100 | memcpy (payload, &rd_count_nbo, sizeof (uint32_t)); |
101 | GNUNET_assert (payload_len == | 101 | GNUNET_assert (payload_len == |
102 | GNUNET_NAMESTORE_records_serialize (rd_count, rd, | 102 | GNUNET_GNSRECORD_records_serialize (rd_count, rd, |
103 | payload_len, &payload[sizeof (uint32_t)])); | 103 | payload_len, &payload[sizeof (uint32_t)])); |
104 | block = GNUNET_malloc (sizeof (struct GNUNET_NAMESTORE_Block) + | 104 | block = GNUNET_malloc (sizeof (struct GNUNET_GNSRECORD_Block) + |
105 | sizeof (uint32_t) + payload_len); | 105 | sizeof (uint32_t) + payload_len); |
106 | block->purpose.size = htonl (sizeof (uint32_t) + payload_len + | 106 | block->purpose.size = htonl (sizeof (uint32_t) + payload_len + |
107 | sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + | 107 | sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + |
@@ -143,7 +143,7 @@ GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | |||
143 | * @return #GNUNET_OK if the signature is valid | 143 | * @return #GNUNET_OK if the signature is valid |
144 | */ | 144 | */ |
145 | int | 145 | int |
146 | GNUNET_NAMESTORE_block_verify (const struct GNUNET_NAMESTORE_Block *block) | 146 | GNUNET_GNSRECORD_block_verify (const struct GNUNET_GNSRECORD_Block *block) |
147 | { | 147 | { |
148 | return GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN, | 148 | return GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN, |
149 | &block->purpose, | 149 | &block->purpose, |
@@ -164,10 +164,10 @@ GNUNET_NAMESTORE_block_verify (const struct GNUNET_NAMESTORE_Block *block) | |||
164 | * not well-formed | 164 | * not well-formed |
165 | */ | 165 | */ |
166 | int | 166 | int |
167 | GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block, | 167 | GNUNET_GNSRECORD_block_decrypt (const struct GNUNET_GNSRECORD_Block *block, |
168 | const struct GNUNET_CRYPTO_EcdsaPublicKey *zone_key, | 168 | const struct GNUNET_CRYPTO_EcdsaPublicKey *zone_key, |
169 | const char *label, | 169 | const char *label, |
170 | GNUNET_NAMESTORE_RecordCallback proc, | 170 | GNUNET_GNSRECORD_RecordCallback proc, |
171 | void *proc_cls) | 171 | void *proc_cls) |
172 | { | 172 | { |
173 | size_t payload_len = ntohl (block->purpose.size) - | 173 | size_t payload_len = ntohl (block->purpose.size) - |
@@ -203,10 +203,10 @@ GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block, | |||
203 | return GNUNET_SYSERR; | 203 | return GNUNET_SYSERR; |
204 | } | 204 | } |
205 | { | 205 | { |
206 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; | 206 | struct GNUNET_GNSRECORD_Data rd[rd_count]; |
207 | 207 | ||
208 | if (GNUNET_OK != | 208 | if (GNUNET_OK != |
209 | GNUNET_NAMESTORE_records_deserialize (payload_len - sizeof (uint32_t), | 209 | GNUNET_GNSRECORD_records_deserialize (payload_len - sizeof (uint32_t), |
210 | &payload[sizeof (uint32_t)], | 210 | &payload[sizeof (uint32_t)], |
211 | rd_count, | 211 | rd_count, |
212 | rd)) | 212 | rd)) |
@@ -230,14 +230,14 @@ GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block, | |||
230 | * @param query hash to use for the query | 230 | * @param query hash to use for the query |
231 | */ | 231 | */ |
232 | void | 232 | void |
233 | GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 233 | GNUNET_GNSRECORD_query_from_private_key (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
234 | const char *label, | 234 | const char *label, |
235 | struct GNUNET_HashCode *query) | 235 | struct GNUNET_HashCode *query) |
236 | { | 236 | { |
237 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; | 237 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; |
238 | 238 | ||
239 | GNUNET_CRYPTO_ecdsa_key_get_public (zone, &pub); | 239 | GNUNET_CRYPTO_ecdsa_key_get_public (zone, &pub); |
240 | GNUNET_NAMESTORE_query_from_public_key (&pub, label, query); | 240 | GNUNET_GNSRECORD_query_from_public_key (&pub, label, query); |
241 | } | 241 | } |
242 | 242 | ||
243 | 243 | ||
@@ -249,7 +249,7 @@ GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EcdsaPrivate | |||
249 | * @param query hash to use for the query | 249 | * @param query hash to use for the query |
250 | */ | 250 | */ |
251 | void | 251 | void |
252 | GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub, | 252 | GNUNET_GNSRECORD_query_from_public_key (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub, |
253 | const char *label, | 253 | const char *label, |
254 | struct GNUNET_HashCode *query) | 254 | struct GNUNET_HashCode *query) |
255 | { | 255 | { |
diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c index 7d73af376..aee1f9fd2 100644 --- a/src/gnsrecord/gnsrecord_misc.c +++ b/src/gnsrecord/gnsrecord_misc.c | |||
@@ -43,7 +43,7 @@ | |||
43 | * @return converted result | 43 | * @return converted result |
44 | */ | 44 | */ |
45 | char * | 45 | char * |
46 | GNUNET_NAMESTORE_normalize_string (const char *src) | 46 | GNUNET_GNSRECORD_string_to_lowercase (const char *src) |
47 | { | 47 | { |
48 | GNUNET_assert (NULL != src); | 48 | GNUNET_assert (NULL != src); |
49 | char *res = strdup (src); | 49 | char *res = strdup (src); |
@@ -59,10 +59,10 @@ GNUNET_NAMESTORE_normalize_string (const char *src) | |||
59 | * NOT reentrant! | 59 | * NOT reentrant! |
60 | * | 60 | * |
61 | * @param z the zone key | 61 | * @param z the zone key |
62 | * @return string form; will be overwritten by next call to #GNUNET_NAMESTORE_z2s | 62 | * @return string form; will be overwritten by next call to #GNUNET_GNSRECORD_z2s |
63 | */ | 63 | */ |
64 | const char * | 64 | const char * |
65 | GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z) | 65 | GNUNET_GNSRECORD_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z) |
66 | { | 66 | { |
67 | static char buf[sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) * 8]; | 67 | static char buf[sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) * 8]; |
68 | char *end; | 68 | char *end; |
@@ -90,8 +90,8 @@ GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z) | |||
90 | * @return #GNUNET_YES if the records are equal or #GNUNET_NO if they are not | 90 | * @return #GNUNET_YES if the records are equal or #GNUNET_NO if they are not |
91 | */ | 91 | */ |
92 | int | 92 | int |
93 | GNUNET_NAMESTORE_records_cmp (const struct GNUNET_NAMESTORE_RecordData *a, | 93 | GNUNET_GNSRECORD_records_cmp (const struct GNUNET_GNSRECORD_Data *a, |
94 | const struct GNUNET_NAMESTORE_RecordData *b) | 94 | const struct GNUNET_GNSRECORD_Data *b) |
95 | { | 95 | { |
96 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 96 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
97 | "Comparing records\n"); | 97 | "Comparing records\n"); |
@@ -110,13 +110,13 @@ GNUNET_NAMESTORE_records_cmp (const struct GNUNET_NAMESTORE_RecordData *a, | |||
110 | b->expiration_time); | 110 | b->expiration_time); |
111 | return GNUNET_NO; | 111 | return GNUNET_NO; |
112 | } | 112 | } |
113 | if ((a->flags & GNUNET_NAMESTORE_RF_RCMP_FLAGS) | 113 | if ((a->flags & GNUNET_GNSRECORD_RF_RCMP_FLAGS) |
114 | != (b->flags & GNUNET_NAMESTORE_RF_RCMP_FLAGS)) | 114 | != (b->flags & GNUNET_GNSRECORD_RF_RCMP_FLAGS)) |
115 | { | 115 | { |
116 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 116 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
117 | "Flags %lu (%lu) != %lu (%lu)\n", a->flags, | 117 | "Flags %lu (%lu) != %lu (%lu)\n", a->flags, |
118 | a->flags & GNUNET_NAMESTORE_RF_RCMP_FLAGS, b->flags, | 118 | a->flags & GNUNET_GNSRECORD_RF_RCMP_FLAGS, b->flags, |
119 | b->flags & GNUNET_NAMESTORE_RF_RCMP_FLAGS); | 119 | b->flags & GNUNET_GNSRECORD_RF_RCMP_FLAGS); |
120 | return GNUNET_NO; | 120 | return GNUNET_NO; |
121 | } | 121 | } |
122 | if (a->data_size != b->data_size) | 122 | if (a->data_size != b->data_size) |
@@ -149,8 +149,8 @@ GNUNET_NAMESTORE_records_cmp (const struct GNUNET_NAMESTORE_RecordData *a, | |||
149 | * @return absolute expiration time | 149 | * @return absolute expiration time |
150 | */ | 150 | */ |
151 | struct GNUNET_TIME_Absolute | 151 | struct GNUNET_TIME_Absolute |
152 | GNUNET_NAMESTORE_record_get_expiration_time (unsigned int rd_count, | 152 | GNUNET_GNSRECORD_record_get_expiration_time (unsigned int rd_count, |
153 | const struct GNUNET_NAMESTORE_RecordData *rd) | 153 | const struct GNUNET_GNSRECORD_Data *rd) |
154 | { | 154 | { |
155 | unsigned int c; | 155 | unsigned int c; |
156 | struct GNUNET_TIME_Absolute expire; | 156 | struct GNUNET_TIME_Absolute expire; |
@@ -162,7 +162,7 @@ GNUNET_NAMESTORE_record_get_expiration_time (unsigned int rd_count, | |||
162 | expire = GNUNET_TIME_UNIT_FOREVER_ABS; | 162 | expire = GNUNET_TIME_UNIT_FOREVER_ABS; |
163 | for (c = 0; c < rd_count; c++) | 163 | for (c = 0; c < rd_count; c++) |
164 | { | 164 | { |
165 | if (0 != (rd[c].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)) | 165 | if (0 != (rd[c].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) |
166 | { | 166 | { |
167 | rt.rel_value_us = rd[c].expiration_time; | 167 | rt.rel_value_us = rd[c].expiration_time; |
168 | at = GNUNET_TIME_relative_to_absolute (rt); | 168 | at = GNUNET_TIME_relative_to_absolute (rt); |
@@ -188,11 +188,11 @@ GNUNET_NAMESTORE_record_get_expiration_time (unsigned int rd_count, | |||
188 | * #GNUNET_NO if not | 188 | * #GNUNET_NO if not |
189 | */ | 189 | */ |
190 | int | 190 | int |
191 | GNUNET_NAMESTORE_is_expired (const struct GNUNET_NAMESTORE_RecordData *rd) | 191 | GNUNET_GNSRECORD_is_expired (const struct GNUNET_GNSRECORD_Data *rd) |
192 | { | 192 | { |
193 | struct GNUNET_TIME_Absolute at; | 193 | struct GNUNET_TIME_Absolute at; |
194 | 194 | ||
195 | if (0 != (rd->flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)) | 195 | if (0 != (rd->flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) |
196 | return GNUNET_NO; | 196 | return GNUNET_NO; |
197 | at.abs_value_us = rd->expiration_time; | 197 | at.abs_value_us = rd->expiration_time; |
198 | return (0 == GNUNET_TIME_absolute_get_remaining (at).rel_value_us) ? GNUNET_YES : GNUNET_NO; | 198 | return (0 == GNUNET_TIME_absolute_get_remaining (at).rel_value_us) ? GNUNET_YES : GNUNET_NO; |
@@ -210,7 +210,7 @@ GNUNET_NAMESTORE_is_expired (const struct GNUNET_NAMESTORE_RecordData *rd) | |||
210 | * key in an encoding suitable for DNS labels. | 210 | * key in an encoding suitable for DNS labels. |
211 | */ | 211 | */ |
212 | const char * | 212 | const char * |
213 | GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey) | 213 | GNUNET_GNSRECORD_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey) |
214 | { | 214 | { |
215 | static char ret[128]; | 215 | static char ret[128]; |
216 | char *pkeys; | 216 | char *pkeys; |
@@ -235,7 +235,7 @@ GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey) | |||
235 | * @return #GNUNET_SYSERR if @a zkey has the wrong syntax | 235 | * @return #GNUNET_SYSERR if @a zkey has the wrong syntax |
236 | */ | 236 | */ |
237 | int | 237 | int |
238 | GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey, | 238 | GNUNET_GNSRECORD_zkey_to_pkey (const char *zkey, |
239 | struct GNUNET_CRYPTO_EcdsaPublicKey *pkey) | 239 | struct GNUNET_CRYPTO_EcdsaPublicKey *pkey) |
240 | { | 240 | { |
241 | char *cpy; | 241 | char *cpy; |
diff --git a/src/gnsrecord/gnsrecord_serialization.c b/src/gnsrecord/gnsrecord_serialization.c index 0fd10b3e0..4b54bd366 100644 --- a/src/gnsrecord/gnsrecord_serialization.c +++ b/src/gnsrecord/gnsrecord_serialization.c | |||
@@ -77,12 +77,12 @@ GNUNET_NETWORK_STRUCT_END | |||
77 | * records. | 77 | * records. |
78 | * | 78 | * |
79 | * @param rd_count number of records in the rd array | 79 | * @param rd_count number of records in the rd array |
80 | * @param rd array of #GNUNET_NAMESTORE_RecordData with @a rd_count elements | 80 | * @param rd array of #GNUNET_GNSRECORD_Data with @a rd_count elements |
81 | * @return the required size to serialize | 81 | * @return the required size to serialize |
82 | */ | 82 | */ |
83 | size_t | 83 | size_t |
84 | GNUNET_NAMESTORE_records_get_size (unsigned int rd_count, | 84 | GNUNET_GNSRECORD_records_get_size (unsigned int rd_count, |
85 | const struct GNUNET_NAMESTORE_RecordData *rd) | 85 | const struct GNUNET_GNSRECORD_Data *rd) |
86 | { | 86 | { |
87 | unsigned int i; | 87 | unsigned int i; |
88 | size_t ret; | 88 | size_t ret; |
@@ -101,14 +101,14 @@ GNUNET_NAMESTORE_records_get_size (unsigned int rd_count, | |||
101 | * Serialize the given records to the given destination buffer. | 101 | * Serialize the given records to the given destination buffer. |
102 | * | 102 | * |
103 | * @param rd_count number of records in the rd array | 103 | * @param rd_count number of records in the rd array |
104 | * @param rd array of #GNUNET_NAMESTORE_RecordData with @a rd_count elements | 104 | * @param rd array of #GNUNET_GNSRECORD_Data with @a rd_count elements |
105 | * @param dest_size size of the destination array | 105 | * @param dest_size size of the destination array |
106 | * @param dest where to write the result | 106 | * @param dest where to write the result |
107 | * @return the size of serialized records, -1 if records do not fit | 107 | * @return the size of serialized records, -1 if records do not fit |
108 | */ | 108 | */ |
109 | ssize_t | 109 | ssize_t |
110 | GNUNET_NAMESTORE_records_serialize (unsigned int rd_count, | 110 | GNUNET_GNSRECORD_records_serialize (unsigned int rd_count, |
111 | const struct GNUNET_NAMESTORE_RecordData *rd, | 111 | const struct GNUNET_GNSRECORD_Data *rd, |
112 | size_t dest_size, | 112 | size_t dest_size, |
113 | char *dest) | 113 | char *dest) |
114 | { | 114 | { |
@@ -151,10 +151,10 @@ GNUNET_NAMESTORE_records_serialize (unsigned int rd_count, | |||
151 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 151 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
152 | */ | 152 | */ |
153 | int | 153 | int |
154 | GNUNET_NAMESTORE_records_deserialize (size_t len, | 154 | GNUNET_GNSRECORD_records_deserialize (size_t len, |
155 | const char *src, | 155 | const char *src, |
156 | unsigned int rd_count, | 156 | unsigned int rd_count, |
157 | struct GNUNET_NAMESTORE_RecordData *dest) | 157 | struct GNUNET_GNSRECORD_Data *dest) |
158 | { | 158 | { |
159 | struct NetworkRecord rec; | 159 | struct NetworkRecord rec; |
160 | unsigned int i; | 160 | unsigned int i; |
diff --git a/src/gnsrecord/test_gnsrecord_crypto.c b/src/gnsrecord/test_gnsrecord_crypto.c index 345bf353b..91bafdf21 100644 --- a/src/gnsrecord/test_gnsrecord_crypto.c +++ b/src/gnsrecord/test_gnsrecord_crypto.c | |||
@@ -42,20 +42,20 @@ | |||
42 | 42 | ||
43 | static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey; | 43 | static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey; |
44 | 44 | ||
45 | static struct GNUNET_NAMESTORE_RecordData *s_rd; | 45 | static struct GNUNET_GNSRECORD_Data *s_rd; |
46 | 46 | ||
47 | static char *s_name; | 47 | static char *s_name; |
48 | 48 | ||
49 | static int res; | 49 | static int res; |
50 | 50 | ||
51 | 51 | ||
52 | static struct GNUNET_NAMESTORE_RecordData * | 52 | static struct GNUNET_GNSRECORD_Data * |
53 | create_record (int count) | 53 | create_record (int count) |
54 | { | 54 | { |
55 | unsigned int c; | 55 | unsigned int c; |
56 | struct GNUNET_NAMESTORE_RecordData * rd; | 56 | struct GNUNET_GNSRECORD_Data * rd; |
57 | 57 | ||
58 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData)); | 58 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_GNSRECORD_Data)); |
59 | for (c = 0; c < count; c++) | 59 | for (c = 0; c < count; c++) |
60 | { | 60 | { |
61 | rd[c].expiration_time = GNUNET_TIME_absolute_get().abs_value_us; | 61 | rd[c].expiration_time = GNUNET_TIME_absolute_get().abs_value_us; |
@@ -71,7 +71,7 @@ create_record (int count) | |||
71 | static void | 71 | static void |
72 | rd_decrypt_cb (void *cls, | 72 | rd_decrypt_cb (void *cls, |
73 | unsigned int rd_count, | 73 | unsigned int rd_count, |
74 | const struct GNUNET_NAMESTORE_RecordData *rd) | 74 | const struct GNUNET_GNSRECORD_Data *rd) |
75 | { | 75 | { |
76 | char rd_cmp_data[TEST_RECORD_DATALEN]; | 76 | char rd_cmp_data[TEST_RECORD_DATALEN]; |
77 | 77 | ||
@@ -98,7 +98,7 @@ static void | |||
98 | run (void *cls, char *const *args, const char *cfgfile, | 98 | run (void *cls, char *const *args, const char *cfgfile, |
99 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 99 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
100 | { | 100 | { |
101 | struct GNUNET_NAMESTORE_Block *block; | 101 | struct GNUNET_GNSRECORD_Block *block; |
102 | struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 102 | struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; |
103 | 103 | ||
104 | /* load privat key */ | 104 | /* load privat key */ |
@@ -118,9 +118,9 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
118 | s_rd = create_record (RECORDS); | 118 | s_rd = create_record (RECORDS); |
119 | 119 | ||
120 | /* Create block */ | 120 | /* Create block */ |
121 | GNUNET_assert (NULL != (block = GNUNET_NAMESTORE_block_create (privkey, expire,s_name, s_rd, RECORDS))); | 121 | GNUNET_assert (NULL != (block = GNUNET_GNSRECORD_block_create (privkey, expire,s_name, s_rd, RECORDS))); |
122 | GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_block_verify (block)); | 122 | GNUNET_assert (GNUNET_OK == GNUNET_GNSRECORD_block_verify (block)); |
123 | GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_block_decrypt (block, &pubkey, s_name, &rd_decrypt_cb, s_name)); | 123 | GNUNET_assert (GNUNET_OK == GNUNET_GNSRECORD_block_decrypt (block, &pubkey, s_name, &rd_decrypt_cb, s_name)); |
124 | 124 | ||
125 | GNUNET_free (block); | 125 | GNUNET_free (block); |
126 | } | 126 | } |
diff --git a/src/gnsrecord/test_gnsrecord_serialization.c b/src/gnsrecord/test_gnsrecord_serialization.c index de6a7ba1d..7ef2f1559 100644 --- a/src/gnsrecord/test_gnsrecord_serialization.c +++ b/src/gnsrecord/test_gnsrecord_serialization.c | |||
@@ -39,9 +39,9 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
39 | 39 | ||
40 | int rd_count = 3; | 40 | int rd_count = 3; |
41 | size_t data_len; | 41 | size_t data_len; |
42 | struct GNUNET_NAMESTORE_RecordData src[rd_count]; | 42 | struct GNUNET_GNSRECORD_Data src[rd_count]; |
43 | 43 | ||
44 | memset(src, '\0', rd_count * sizeof (struct GNUNET_NAMESTORE_RecordData)); | 44 | memset(src, '\0', rd_count * sizeof (struct GNUNET_GNSRECORD_Data)); |
45 | 45 | ||
46 | data_len = 0; | 46 | data_len = 0; |
47 | for (c = 0; c < rd_count; c++) | 47 | for (c = 0; c < rd_count; c++) |
@@ -56,16 +56,16 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
56 | } | 56 | } |
57 | res = 0; | 57 | res = 0; |
58 | 58 | ||
59 | len = GNUNET_NAMESTORE_records_get_size(rd_count, src); | 59 | len = GNUNET_GNSRECORD_records_get_size(rd_count, src); |
60 | char rd_ser[len]; | 60 | char rd_ser[len]; |
61 | GNUNET_assert (len == GNUNET_NAMESTORE_records_serialize(rd_count, src, len, rd_ser)); | 61 | GNUNET_assert (len == GNUNET_GNSRECORD_records_serialize(rd_count, src, len, rd_ser)); |
62 | 62 | ||
63 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Serialized data len: %u\n",len); | 63 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Serialized data len: %u\n",len); |
64 | 64 | ||
65 | GNUNET_assert (rd_ser != NULL); | 65 | GNUNET_assert (rd_ser != NULL); |
66 | 66 | ||
67 | struct GNUNET_NAMESTORE_RecordData dst[rd_count]; | 67 | struct GNUNET_GNSRECORD_Data dst[rd_count]; |
68 | GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_records_deserialize (len, rd_ser, rd_count, dst)); | 68 | GNUNET_assert (GNUNET_OK == GNUNET_GNSRECORD_records_deserialize (len, rd_ser, rd_count, dst)); |
69 | 69 | ||
70 | GNUNET_assert (dst != NULL); | 70 | GNUNET_assert (dst != NULL); |
71 | 71 | ||
diff --git a/src/include/gnunet_conversation_service.h b/src/include/gnunet_conversation_service.h index 3ef3c2f3d..70dd013d6 100644 --- a/src/include/gnunet_conversation_service.h +++ b/src/include/gnunet_conversation_service.h | |||
@@ -203,7 +203,7 @@ GNUNET_CONVERSATION_phone_create (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
203 | */ | 203 | */ |
204 | void | 204 | void |
205 | GNUNET_CONVERSATION_phone_get_record (struct GNUNET_CONVERSATION_Phone *phone, | 205 | GNUNET_CONVERSATION_phone_get_record (struct GNUNET_CONVERSATION_Phone *phone, |
206 | struct GNUNET_NAMESTORE_RecordData *rd); | 206 | struct GNUNET_GNSRECORD_Data *rd); |
207 | 207 | ||
208 | 208 | ||
209 | /** | 209 | /** |
diff --git a/src/include/gnunet_gns_service.h b/src/include/gnunet_gns_service.h index f26b44265..36ca0ab5e 100644 --- a/src/include/gnunet_gns_service.h +++ b/src/include/gnunet_gns_service.h | |||
@@ -84,7 +84,7 @@ GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle); | |||
84 | */ | 84 | */ |
85 | typedef void (*GNUNET_GNS_LookupResultProcessor) (void *cls, | 85 | typedef void (*GNUNET_GNS_LookupResultProcessor) (void *cls, |
86 | uint32_t rd_count, | 86 | uint32_t rd_count, |
87 | const struct GNUNET_NAMESTORE_RecordData *rd); | 87 | const struct GNUNET_GNSRECORD_Data *rd); |
88 | 88 | ||
89 | 89 | ||
90 | /** | 90 | /** |
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h index aefdeb4a4..96e7e3aee 100644 --- a/src/include/gnunet_gnsrecord_lib.h +++ b/src/include/gnunet_gnsrecord_lib.h | |||
@@ -37,7 +37,7 @@ extern "C" | |||
37 | /** | 37 | /** |
38 | * Maximum size of a value that can be stored in a GNS block. | 38 | * Maximum size of a value that can be stored in a GNS block. |
39 | */ | 39 | */ |
40 | #define GNUNET_NAMESTORE_MAX_VALUE_SIZE (63 * 1024) | 40 | #define GNUNET_GNSRECORD_MAX_BLOCK_SIZE (63 * 1024) |
41 | 41 | ||
42 | 42 | ||
43 | /** | 43 | /** |
@@ -84,37 +84,37 @@ extern "C" | |||
84 | /** | 84 | /** |
85 | * Flags that can be set for a record. | 85 | * Flags that can be set for a record. |
86 | */ | 86 | */ |
87 | enum GNUNET_NAMESTORE_RecordFlags | 87 | enum GNUNET_GNSRECORD_Flags |
88 | { | 88 | { |
89 | 89 | ||
90 | /** | 90 | /** |
91 | * No special options. | 91 | * No special options. |
92 | */ | 92 | */ |
93 | GNUNET_NAMESTORE_RF_NONE = 0, | 93 | GNUNET_GNSRECORD_RF_NONE = 0, |
94 | 94 | ||
95 | /** | 95 | /** |
96 | * This is a private record of this peer and it should | 96 | * This is a private record of this peer and it should |
97 | * thus not be handed out to other peers. | 97 | * thus not be handed out to other peers. |
98 | */ | 98 | */ |
99 | GNUNET_NAMESTORE_RF_PRIVATE = 2, | 99 | GNUNET_GNSRECORD_RF_PRIVATE = 2, |
100 | 100 | ||
101 | /** | 101 | /** |
102 | * This record was added automatically by the system | 102 | * This record was added automatically by the system |
103 | * and is pending user confimation. | 103 | * and is pending user confimation. |
104 | */ | 104 | */ |
105 | GNUNET_NAMESTORE_RF_PENDING = 4, | 105 | GNUNET_GNSRECORD_RF_PENDING = 4, |
106 | 106 | ||
107 | /** | 107 | /** |
108 | * This expiration time of the record is a relative | 108 | * This expiration time of the record is a relative |
109 | * time (not an absolute time). | 109 | * time (not an absolute time). |
110 | */ | 110 | */ |
111 | GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION = 8, | 111 | GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION = 8, |
112 | 112 | ||
113 | /** | 113 | /** |
114 | * This record should not be used unless all (other) records with an absolute | 114 | * This record should not be used unless all (other) records with an absolute |
115 | * expiration time have expired. | 115 | * expiration time have expired. |
116 | */ | 116 | */ |
117 | GNUNET_NAMESTORE_RF_SHADOW_RECORD = 16 | 117 | GNUNET_GNSRECORD_RF_SHADOW_RECORD = 16 |
118 | 118 | ||
119 | /** | 119 | /** |
120 | * When comparing flags for record equality for removal, | 120 | * When comparing flags for record equality for removal, |
@@ -125,16 +125,16 @@ enum GNUNET_NAMESTORE_RecordFlags | |||
125 | * pass the '--private' option when removing a record from | 125 | * pass the '--private' option when removing a record from |
126 | * the namestore, hence we don't require this particular option | 126 | * the namestore, hence we don't require this particular option |
127 | * to match upon removal). See also | 127 | * to match upon removal). See also |
128 | * #GNUNET_NAMESTORE_records_cmp. | 128 | * #GNUNET_GNSRECORD_records_cmp. |
129 | */ | 129 | */ |
130 | #define GNUNET_NAMESTORE_RF_RCMP_FLAGS (GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION) | 130 | #define GNUNET_GNSRECORD_RF_RCMP_FLAGS (GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION) |
131 | }; | 131 | }; |
132 | 132 | ||
133 | 133 | ||
134 | /** | 134 | /** |
135 | * A GNS record. | 135 | * A GNS record. |
136 | */ | 136 | */ |
137 | struct GNUNET_NAMESTORE_RecordData | 137 | struct GNUNET_GNSRECORD_Data |
138 | { | 138 | { |
139 | 139 | ||
140 | /** | 140 | /** |
@@ -164,7 +164,7 @@ struct GNUNET_NAMESTORE_RecordData | |||
164 | /** | 164 | /** |
165 | * Flags for the record. | 165 | * Flags for the record. |
166 | */ | 166 | */ |
167 | enum GNUNET_NAMESTORE_RecordFlags flags; | 167 | enum GNUNET_GNSRECORD_Flags flags; |
168 | }; | 168 | }; |
169 | 169 | ||
170 | 170 | ||
@@ -175,7 +175,7 @@ GNUNET_NETWORK_STRUCT_BEGIN | |||
175 | /** | 175 | /** |
176 | * Information we have in an encrypted block with record data (i.e. in the DHT). | 176 | * Information we have in an encrypted block with record data (i.e. in the DHT). |
177 | */ | 177 | */ |
178 | struct GNUNET_NAMESTORE_Block | 178 | struct GNUNET_GNSRECORD_Block |
179 | { | 179 | { |
180 | 180 | ||
181 | /** | 181 | /** |
@@ -212,9 +212,9 @@ GNUNET_NETWORK_STRUCT_END | |||
212 | * @param rd_count number of entries in @a rd array | 212 | * @param rd_count number of entries in @a rd array |
213 | * @param rd array of records with data to store | 213 | * @param rd array of records with data to store |
214 | */ | 214 | */ |
215 | typedef void (*GNUNET_NAMESTORE_RecordCallback) (void *cls, | 215 | typedef void (*GNUNET_GNSRECORD_RecordCallback) (void *cls, |
216 | unsigned int rd_count, | 216 | unsigned int rd_count, |
217 | const struct GNUNET_NAMESTORE_RecordData *rd); | 217 | const struct GNUNET_GNSRECORD_Data *rd); |
218 | 218 | ||
219 | 219 | ||
220 | 220 | ||
@@ -279,26 +279,26 @@ GNUNET_GNSRECORD_number_to_typename (uint32_t type); | |||
279 | * records. | 279 | * records. |
280 | * | 280 | * |
281 | * @param rd_count number of records in the @a rd array | 281 | * @param rd_count number of records in the @a rd array |
282 | * @param rd array of #GNUNET_NAMESTORE_RecordData with @a rd_count elements | 282 | * @param rd array of #GNUNET_GNSRECORD_Data with @a rd_count elements |
283 | * @return the required size to serialize | 283 | * @return the required size to serialize |
284 | */ | 284 | */ |
285 | size_t | 285 | size_t |
286 | GNUNET_NAMESTORE_records_get_size (unsigned int rd_count, | 286 | GNUNET_GNSRECORD_records_get_size (unsigned int rd_count, |
287 | const struct GNUNET_NAMESTORE_RecordData *rd); | 287 | const struct GNUNET_GNSRECORD_Data *rd); |
288 | 288 | ||
289 | 289 | ||
290 | /** | 290 | /** |
291 | * Serialize the given records to the given destination buffer. | 291 | * Serialize the given records to the given destination buffer. |
292 | * | 292 | * |
293 | * @param rd_count number of records in the @a rd array | 293 | * @param rd_count number of records in the @a rd array |
294 | * @param rd array of #GNUNET_NAMESTORE_RecordData with @a rd_count elements | 294 | * @param rd array of #GNUNET_GNSRECORD_Data with @a rd_count elements |
295 | * @param dest_size size of the destination array @a dst | 295 | * @param dest_size size of the destination array @a dst |
296 | * @param dest where to write the result | 296 | * @param dest where to write the result |
297 | * @return the size of serialized records, -1 if records do not fit | 297 | * @return the size of serialized records, -1 if records do not fit |
298 | */ | 298 | */ |
299 | ssize_t | 299 | ssize_t |
300 | GNUNET_NAMESTORE_records_serialize (unsigned int rd_count, | 300 | GNUNET_GNSRECORD_records_serialize (unsigned int rd_count, |
301 | const struct GNUNET_NAMESTORE_RecordData *rd, | 301 | const struct GNUNET_GNSRECORD_Data *rd, |
302 | size_t dest_size, | 302 | size_t dest_size, |
303 | char *dest); | 303 | char *dest); |
304 | 304 | ||
@@ -313,10 +313,10 @@ GNUNET_NAMESTORE_records_serialize (unsigned int rd_count, | |||
313 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 313 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
314 | */ | 314 | */ |
315 | int | 315 | int |
316 | GNUNET_NAMESTORE_records_deserialize (size_t len, | 316 | GNUNET_GNSRECORD_records_deserialize (size_t len, |
317 | const char *src, | 317 | const char *src, |
318 | unsigned int rd_count, | 318 | unsigned int rd_count, |
319 | struct GNUNET_NAMESTORE_RecordData *dest); | 319 | struct GNUNET_GNSRECORD_Data *dest); |
320 | 320 | ||
321 | 321 | ||
322 | /* ******* general APIs relating to blocks, records and labels ******** */ | 322 | /* ******* general APIs relating to blocks, records and labels ******** */ |
@@ -331,7 +331,7 @@ GNUNET_NAMESTORE_records_deserialize (size_t len, | |||
331 | * #GNUNET_NO if not | 331 | * #GNUNET_NO if not |
332 | */ | 332 | */ |
333 | int | 333 | int |
334 | GNUNET_NAMESTORE_is_expired (const struct GNUNET_NAMESTORE_RecordData *rd); | 334 | GNUNET_GNSRECORD_is_expired (const struct GNUNET_GNSRECORD_Data *rd); |
335 | 335 | ||
336 | 336 | ||
337 | /** | 337 | /** |
@@ -340,7 +340,7 @@ GNUNET_NAMESTORE_is_expired (const struct GNUNET_NAMESTORE_RecordData *rd); | |||
340 | * @return converted result | 340 | * @return converted result |
341 | */ | 341 | */ |
342 | char * | 342 | char * |
343 | GNUNET_NAMESTORE_normalize_string (const char *src); | 343 | GNUNET_GNSRECORD_string_to_lowercase (const char *src); |
344 | 344 | ||
345 | 345 | ||
346 | /** | 346 | /** |
@@ -349,10 +349,10 @@ GNUNET_NAMESTORE_normalize_string (const char *src); | |||
349 | * NOT reentrant! | 349 | * NOT reentrant! |
350 | * | 350 | * |
351 | * @param z public key of a zone | 351 | * @param z public key of a zone |
352 | * @return string form; will be overwritten by next call to #GNUNET_NAMESTORE_z2s. | 352 | * @return string form; will be overwritten by next call to #GNUNET_GNSRECORD_z2s. |
353 | */ | 353 | */ |
354 | const char * | 354 | const char * |
355 | GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z); | 355 | GNUNET_GNSRECORD_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z); |
356 | 356 | ||
357 | 357 | ||
358 | /** | 358 | /** |
@@ -366,7 +366,7 @@ GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z); | |||
366 | * key in an encoding suitable for DNS labels. | 366 | * key in an encoding suitable for DNS labels. |
367 | */ | 367 | */ |
368 | const char * | 368 | const char * |
369 | GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey); | 369 | GNUNET_GNSRECORD_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey); |
370 | 370 | ||
371 | 371 | ||
372 | /** | 372 | /** |
@@ -379,7 +379,7 @@ GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey); | |||
379 | * @return #GNUNET_SYSERR if @a zkey has the wrong syntax | 379 | * @return #GNUNET_SYSERR if @a zkey has the wrong syntax |
380 | */ | 380 | */ |
381 | int | 381 | int |
382 | GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey, | 382 | GNUNET_GNSRECORD_zkey_to_pkey (const char *zkey, |
383 | struct GNUNET_CRYPTO_EcdsaPublicKey *pkey); | 383 | struct GNUNET_CRYPTO_EcdsaPublicKey *pkey); |
384 | 384 | ||
385 | 385 | ||
@@ -391,7 +391,7 @@ GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey, | |||
391 | * @param query hash to use for the query | 391 | * @param query hash to use for the query |
392 | */ | 392 | */ |
393 | void | 393 | void |
394 | GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 394 | GNUNET_GNSRECORD_query_from_private_key (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
395 | const char *label, | 395 | const char *label, |
396 | struct GNUNET_HashCode *query); | 396 | struct GNUNET_HashCode *query); |
397 | 397 | ||
@@ -404,7 +404,7 @@ GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EcdsaPrivate | |||
404 | * @param query hash to use for the query | 404 | * @param query hash to use for the query |
405 | */ | 405 | */ |
406 | void | 406 | void |
407 | GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub, | 407 | GNUNET_GNSRECORD_query_from_public_key (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub, |
408 | const char *label, | 408 | const char *label, |
409 | struct GNUNET_HashCode *query); | 409 | struct GNUNET_HashCode *query); |
410 | 410 | ||
@@ -418,11 +418,11 @@ GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EcdsaPublicKe | |||
418 | * @param rd record data | 418 | * @param rd record data |
419 | * @param rd_count number of records in @a rd | 419 | * @param rd_count number of records in @a rd |
420 | */ | 420 | */ |
421 | struct GNUNET_NAMESTORE_Block * | 421 | struct GNUNET_GNSRECORD_Block * |
422 | GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | 422 | GNUNET_GNSRECORD_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, |
423 | struct GNUNET_TIME_Absolute expire, | 423 | struct GNUNET_TIME_Absolute expire, |
424 | const char *label, | 424 | const char *label, |
425 | const struct GNUNET_NAMESTORE_RecordData *rd, | 425 | const struct GNUNET_GNSRECORD_Data *rd, |
426 | unsigned int rd_count); | 426 | unsigned int rd_count); |
427 | 427 | ||
428 | 428 | ||
@@ -434,7 +434,7 @@ GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | |||
434 | * @return #GNUNET_OK if the signature is valid | 434 | * @return #GNUNET_OK if the signature is valid |
435 | */ | 435 | */ |
436 | int | 436 | int |
437 | GNUNET_NAMESTORE_block_verify (const struct GNUNET_NAMESTORE_Block *block); | 437 | GNUNET_GNSRECORD_block_verify (const struct GNUNET_GNSRECORD_Block *block); |
438 | 438 | ||
439 | 439 | ||
440 | /** | 440 | /** |
@@ -449,10 +449,10 @@ GNUNET_NAMESTORE_block_verify (const struct GNUNET_NAMESTORE_Block *block); | |||
449 | * not well-formed | 449 | * not well-formed |
450 | */ | 450 | */ |
451 | int | 451 | int |
452 | GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block, | 452 | GNUNET_GNSRECORD_block_decrypt (const struct GNUNET_GNSRECORD_Block *block, |
453 | const struct GNUNET_CRYPTO_EcdsaPublicKey *zone_key, | 453 | const struct GNUNET_CRYPTO_EcdsaPublicKey *zone_key, |
454 | const char *label, | 454 | const char *label, |
455 | GNUNET_NAMESTORE_RecordCallback proc, | 455 | GNUNET_GNSRECORD_RecordCallback proc, |
456 | void *proc_cls); | 456 | void *proc_cls); |
457 | 457 | ||
458 | 458 | ||
@@ -464,8 +464,8 @@ GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block, | |||
464 | * @return #GNUNET_YES if the records are equal, or #GNUNET_NO if not. | 464 | * @return #GNUNET_YES if the records are equal, or #GNUNET_NO if not. |
465 | */ | 465 | */ |
466 | int | 466 | int |
467 | GNUNET_NAMESTORE_records_cmp (const struct GNUNET_NAMESTORE_RecordData *a, | 467 | GNUNET_GNSRECORD_records_cmp (const struct GNUNET_GNSRECORD_Data *a, |
468 | const struct GNUNET_NAMESTORE_RecordData *b); | 468 | const struct GNUNET_GNSRECORD_Data *b); |
469 | 469 | ||
470 | 470 | ||
471 | /** | 471 | /** |
@@ -478,8 +478,8 @@ GNUNET_NAMESTORE_records_cmp (const struct GNUNET_NAMESTORE_RecordData *a, | |||
478 | * @return absolute expiration time | 478 | * @return absolute expiration time |
479 | */ | 479 | */ |
480 | struct GNUNET_TIME_Absolute | 480 | struct GNUNET_TIME_Absolute |
481 | GNUNET_NAMESTORE_record_get_expiration_time (unsigned int rd_count, | 481 | GNUNET_GNSRECORD_record_get_expiration_time (unsigned int rd_count, |
482 | const struct GNUNET_NAMESTORE_RecordData *rd); | 482 | const struct GNUNET_GNSRECORD_Data *rd); |
483 | 483 | ||
484 | 484 | ||
485 | 485 | ||
diff --git a/src/include/gnunet_namecache_plugin.h b/src/include/gnunet_namecache_plugin.h index 0955d110c..408b8a699 100644 --- a/src/include/gnunet_namecache_plugin.h +++ b/src/include/gnunet_namecache_plugin.h | |||
@@ -46,7 +46,7 @@ extern "C" | |||
46 | * @param block lookup result | 46 | * @param block lookup result |
47 | */ | 47 | */ |
48 | typedef void (*GNUNET_NAMECACHE_BlockCallback) (void *cls, | 48 | typedef void (*GNUNET_NAMECACHE_BlockCallback) (void *cls, |
49 | const struct GNUNET_NAMESTORE_Block *block); | 49 | const struct GNUNET_GNSRECORD_Block *block); |
50 | 50 | ||
51 | 51 | ||
52 | /** | 52 | /** |
@@ -69,7 +69,7 @@ struct GNUNET_NAMECACHE_PluginFunctions | |||
69 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR | 69 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR |
70 | */ | 70 | */ |
71 | int (*cache_block) (void *cls, | 71 | int (*cache_block) (void *cls, |
72 | const struct GNUNET_NAMESTORE_Block *block); | 72 | const struct GNUNET_GNSRECORD_Block *block); |
73 | 73 | ||
74 | 74 | ||
75 | /** | 75 | /** |
diff --git a/src/include/gnunet_namecache_service.h b/src/include/gnunet_namecache_service.h index 1a71f1ebd..e244d51a4 100644 --- a/src/include/gnunet_namecache_service.h +++ b/src/include/gnunet_namecache_service.h | |||
@@ -107,7 +107,7 @@ typedef void (*GNUNET_NAMECACHE_ContinuationWithStatus) (void *cls, | |||
107 | */ | 107 | */ |
108 | struct GNUNET_NAMECACHE_QueueEntry * | 108 | struct GNUNET_NAMECACHE_QueueEntry * |
109 | GNUNET_NAMECACHE_block_cache (struct GNUNET_NAMECACHE_Handle *h, | 109 | GNUNET_NAMECACHE_block_cache (struct GNUNET_NAMECACHE_Handle *h, |
110 | const struct GNUNET_NAMESTORE_Block *block, | 110 | const struct GNUNET_GNSRECORD_Block *block, |
111 | GNUNET_NAMECACHE_ContinuationWithStatus cont, | 111 | GNUNET_NAMECACHE_ContinuationWithStatus cont, |
112 | void *cont_cls); | 112 | void *cont_cls); |
113 | 113 | ||
@@ -119,7 +119,7 @@ GNUNET_NAMECACHE_block_cache (struct GNUNET_NAMECACHE_Handle *h, | |||
119 | * @param block block that was stored in the namecache | 119 | * @param block block that was stored in the namecache |
120 | */ | 120 | */ |
121 | typedef void (*GNUNET_NAMECACHE_BlockProcessor) (void *cls, | 121 | typedef void (*GNUNET_NAMECACHE_BlockProcessor) (void *cls, |
122 | const struct GNUNET_NAMESTORE_Block *block); | 122 | const struct GNUNET_GNSRECORD_Block *block); |
123 | 123 | ||
124 | 124 | ||
125 | /** | 125 | /** |
diff --git a/src/include/gnunet_namestore_plugin.h b/src/include/gnunet_namestore_plugin.h index 5c7408eec..037c6927a 100644 --- a/src/include/gnunet_namestore_plugin.h +++ b/src/include/gnunet_namestore_plugin.h | |||
@@ -44,8 +44,8 @@ extern "C" | |||
44 | * @param cls closure | 44 | * @param cls closure |
45 | * @param block lookup result | 45 | * @param block lookup result |
46 | */ | 46 | */ |
47 | typedef void (*GNUNET_NAMESTORE_BlockCallback) (void *cls, | 47 | typedef void (*GNUNET_GNSRECORD_BlockCallback) (void *cls, |
48 | const struct GNUNET_NAMESTORE_Block *block); | 48 | const struct GNUNET_GNSRECORD_Block *block); |
49 | 49 | ||
50 | 50 | ||
51 | /** | 51 | /** |
@@ -61,7 +61,7 @@ typedef void (*GNUNET_NAMESTORE_RecordIterator) (void *cls, | |||
61 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *private_key, | 61 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *private_key, |
62 | const char *label, | 62 | const char *label, |
63 | unsigned int rd_count, | 63 | unsigned int rd_count, |
64 | const struct GNUNET_NAMESTORE_RecordData *rd); | 64 | const struct GNUNET_GNSRECORD_Data *rd); |
65 | 65 | ||
66 | 66 | ||
67 | /** | 67 | /** |
@@ -84,7 +84,7 @@ struct GNUNET_NAMESTORE_PluginFunctions | |||
84 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR | 84 | * @return #GNUNET_OK on success, else #GNUNET_SYSERR |
85 | */ | 85 | */ |
86 | int (*cache_block) (void *cls, | 86 | int (*cache_block) (void *cls, |
87 | const struct GNUNET_NAMESTORE_Block *block); | 87 | const struct GNUNET_GNSRECORD_Block *block); |
88 | 88 | ||
89 | 89 | ||
90 | /** | 90 | /** |
@@ -99,7 +99,7 @@ struct GNUNET_NAMESTORE_PluginFunctions | |||
99 | */ | 99 | */ |
100 | int (*lookup_block) (void *cls, | 100 | int (*lookup_block) (void *cls, |
101 | const struct GNUNET_HashCode *query, | 101 | const struct GNUNET_HashCode *query, |
102 | GNUNET_NAMESTORE_BlockCallback iter, void *iter_cls); | 102 | GNUNET_GNSRECORD_BlockCallback iter, void *iter_cls); |
103 | 103 | ||
104 | 104 | ||
105 | 105 | ||
@@ -118,7 +118,7 @@ struct GNUNET_NAMESTORE_PluginFunctions | |||
118 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 118 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
119 | const char *label, | 119 | const char *label, |
120 | unsigned int rd_count, | 120 | unsigned int rd_count, |
121 | const struct GNUNET_NAMESTORE_RecordData *rd); | 121 | const struct GNUNET_GNSRECORD_Data *rd); |
122 | 122 | ||
123 | 123 | ||
124 | /** | 124 | /** |
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h index 30098832c..b37cecf50 100644 --- a/src/include/gnunet_namestore_service.h +++ b/src/include/gnunet_namestore_service.h | |||
@@ -106,7 +106,7 @@ typedef void (*GNUNET_NAMESTORE_ContinuationWithStatus) (void *cls, | |||
106 | */ | 106 | */ |
107 | struct GNUNET_NAMESTORE_QueueEntry * | 107 | struct GNUNET_NAMESTORE_QueueEntry * |
108 | GNUNET_NAMESTORE_block_cache (struct GNUNET_NAMESTORE_Handle *h, | 108 | GNUNET_NAMESTORE_block_cache (struct GNUNET_NAMESTORE_Handle *h, |
109 | const struct GNUNET_NAMESTORE_Block *block, | 109 | const struct GNUNET_GNSRECORD_Block *block, |
110 | GNUNET_NAMESTORE_ContinuationWithStatus cont, | 110 | GNUNET_NAMESTORE_ContinuationWithStatus cont, |
111 | void *cont_cls); | 111 | void *cont_cls); |
112 | 112 | ||
@@ -130,7 +130,7 @@ GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h, | |||
130 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, | 130 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, |
131 | const char *label, | 131 | const char *label, |
132 | unsigned int rd_count, | 132 | unsigned int rd_count, |
133 | const struct GNUNET_NAMESTORE_RecordData *rd, | 133 | const struct GNUNET_GNSRECORD_Data *rd, |
134 | GNUNET_NAMESTORE_ContinuationWithStatus cont, | 134 | GNUNET_NAMESTORE_ContinuationWithStatus cont, |
135 | void *cont_cls); | 135 | void *cont_cls); |
136 | 136 | ||
@@ -141,8 +141,8 @@ GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h, | |||
141 | * @param cls closure | 141 | * @param cls closure |
142 | * @param block block that was stored in the namestore | 142 | * @param block block that was stored in the namestore |
143 | */ | 143 | */ |
144 | typedef void (*GNUNET_NAMESTORE_BlockProcessor) (void *cls, | 144 | typedef void (*GNUNET_GNSRECORD_BlockProcessor) (void *cls, |
145 | const struct GNUNET_NAMESTORE_Block *block); | 145 | const struct GNUNET_GNSRECORD_Block *block); |
146 | 146 | ||
147 | 147 | ||
148 | /** | 148 | /** |
@@ -160,7 +160,7 @@ typedef void (*GNUNET_NAMESTORE_BlockProcessor) (void *cls, | |||
160 | struct GNUNET_NAMESTORE_QueueEntry * | 160 | struct GNUNET_NAMESTORE_QueueEntry * |
161 | GNUNET_NAMESTORE_lookup_block (struct GNUNET_NAMESTORE_Handle *h, | 161 | GNUNET_NAMESTORE_lookup_block (struct GNUNET_NAMESTORE_Handle *h, |
162 | const struct GNUNET_HashCode *derived_hash, | 162 | const struct GNUNET_HashCode *derived_hash, |
163 | GNUNET_NAMESTORE_BlockProcessor proc, void *proc_cls); | 163 | GNUNET_GNSRECORD_BlockProcessor proc, void *proc_cls); |
164 | 164 | ||
165 | 165 | ||
166 | /** | 166 | /** |
@@ -176,7 +176,7 @@ typedef void (*GNUNET_NAMESTORE_RecordMonitor) (void *cls, | |||
176 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 176 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
177 | const char *label, | 177 | const char *label, |
178 | unsigned int rd_count, | 178 | unsigned int rd_count, |
179 | const struct GNUNET_NAMESTORE_RecordData *rd); | 179 | const struct GNUNET_GNSRECORD_Data *rd); |
180 | 180 | ||
181 | 181 | ||
182 | /** | 182 | /** |
diff --git a/src/namecache/gnunet-namecache.c b/src/namecache/gnunet-namecache.c index cda40fae9..8635fa75f 100644 --- a/src/namecache/gnunet-namecache.c +++ b/src/namecache/gnunet-namecache.c | |||
@@ -99,7 +99,7 @@ do_shutdown (void *cls, | |||
99 | static void | 99 | static void |
100 | display_records_from_block (void *cls, | 100 | display_records_from_block (void *cls, |
101 | unsigned int rd_len, | 101 | unsigned int rd_len, |
102 | const struct GNUNET_NAMESTORE_RecordData *rd) | 102 | const struct GNUNET_GNSRECORD_Data *rd) |
103 | { | 103 | { |
104 | const char *typestring; | 104 | const char *typestring; |
105 | char *s; | 105 | char *s; |
@@ -145,7 +145,7 @@ display_records_from_block (void *cls, | |||
145 | */ | 145 | */ |
146 | static void | 146 | static void |
147 | handle_block (void *cls, | 147 | handle_block (void *cls, |
148 | const struct GNUNET_NAMESTORE_Block *block) | 148 | const struct GNUNET_GNSRECORD_Block *block) |
149 | { | 149 | { |
150 | qe = NULL; | 150 | qe = NULL; |
151 | if (NULL == block) | 151 | if (NULL == block) |
@@ -154,7 +154,7 @@ handle_block (void *cls, | |||
154 | "No matching block found\n"); | 154 | "No matching block found\n"); |
155 | } | 155 | } |
156 | else if (GNUNET_OK != | 156 | else if (GNUNET_OK != |
157 | GNUNET_NAMESTORE_block_decrypt (block, | 157 | GNUNET_GNSRECORD_block_decrypt (block, |
158 | &pubkey, | 158 | &pubkey, |
159 | name, | 159 | name, |
160 | &display_records_from_block, | 160 | &display_records_from_block, |
@@ -202,7 +202,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
202 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, | 202 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, |
203 | &do_shutdown, | 203 | &do_shutdown, |
204 | NULL); | 204 | NULL); |
205 | GNUNET_NAMESTORE_query_from_public_key (&pubkey, | 205 | GNUNET_GNSRECORD_query_from_public_key (&pubkey, |
206 | name, | 206 | name, |
207 | &dhash); | 207 | &dhash); |
208 | qe = GNUNET_NAMECACHE_lookup_block (ns, | 208 | qe = GNUNET_NAMECACHE_lookup_block (ns, |
diff --git a/src/namecache/gnunet-service-namecache.c b/src/namecache/gnunet-service-namecache.c index 832f02b45..701bac4ae 100644 --- a/src/namecache/gnunet-service-namecache.c +++ b/src/namecache/gnunet-service-namecache.c | |||
@@ -215,7 +215,7 @@ struct LookupBlockContext | |||
215 | */ | 215 | */ |
216 | static void | 216 | static void |
217 | handle_lookup_block_it (void *cls, | 217 | handle_lookup_block_it (void *cls, |
218 | const struct GNUNET_NAMESTORE_Block *block) | 218 | const struct GNUNET_GNSRECORD_Block *block) |
219 | { | 219 | { |
220 | struct LookupBlockContext *lnc = cls; | 220 | struct LookupBlockContext *lnc = cls; |
221 | struct LookupBlockResponseMessage *r; | 221 | struct LookupBlockResponseMessage *r; |
@@ -316,7 +316,7 @@ handle_block_cache (void *cls, | |||
316 | struct NamecacheClient *nc; | 316 | struct NamecacheClient *nc; |
317 | const struct BlockCacheMessage *rp_msg; | 317 | const struct BlockCacheMessage *rp_msg; |
318 | struct BlockCacheResponseMessage rpr_msg; | 318 | struct BlockCacheResponseMessage rpr_msg; |
319 | struct GNUNET_NAMESTORE_Block *block; | 319 | struct GNUNET_GNSRECORD_Block *block; |
320 | size_t esize; | 320 | size_t esize; |
321 | int res; | 321 | int res; |
322 | 322 | ||
@@ -329,7 +329,7 @@ handle_block_cache (void *cls, | |||
329 | } | 329 | } |
330 | rp_msg = (const struct BlockCacheMessage *) message; | 330 | rp_msg = (const struct BlockCacheMessage *) message; |
331 | esize = ntohs (rp_msg->gns_header.header.size) - sizeof (struct BlockCacheMessage); | 331 | esize = ntohs (rp_msg->gns_header.header.size) - sizeof (struct BlockCacheMessage); |
332 | block = GNUNET_malloc (sizeof (struct GNUNET_NAMESTORE_Block) + esize); | 332 | block = GNUNET_malloc (sizeof (struct GNUNET_GNSRECORD_Block) + esize); |
333 | block->signature = rp_msg->signature; | 333 | block->signature = rp_msg->signature; |
334 | block->derived_key = rp_msg->derived_key; | 334 | block->derived_key = rp_msg->derived_key; |
335 | block->purpose.size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + | 335 | block->purpose.size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + |
diff --git a/src/namecache/namecache_api.c b/src/namecache/namecache_api.c index a28ed7d53..942272b99 100644 --- a/src/namecache/namecache_api.c +++ b/src/namecache/namecache_api.c | |||
@@ -76,7 +76,7 @@ struct GNUNET_NAMECACHE_QueueEntry | |||
76 | /** | 76 | /** |
77 | * Function to call with the blocks we get back; or NULL. | 77 | * Function to call with the blocks we get back; or NULL. |
78 | */ | 78 | */ |
79 | GNUNET_NAMESTORE_BlockProcessor block_proc; | 79 | GNUNET_GNSRECORD_BlockProcessor block_proc; |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * Closure for @e block_proc. | 82 | * Closure for @e block_proc. |
@@ -208,8 +208,8 @@ handle_lookup_block_response (struct GNUNET_NAMECACHE_QueueEntry *qe, | |||
208 | const struct LookupBlockResponseMessage *msg, | 208 | const struct LookupBlockResponseMessage *msg, |
209 | size_t size) | 209 | size_t size) |
210 | { | 210 | { |
211 | struct GNUNET_NAMESTORE_Block *block; | 211 | struct GNUNET_GNSRECORD_Block *block; |
212 | char buf[size + sizeof (struct GNUNET_NAMESTORE_Block) | 212 | char buf[size + sizeof (struct GNUNET_GNSRECORD_Block) |
213 | - sizeof (struct LookupBlockResponseMessage)]; | 213 | - sizeof (struct LookupBlockResponseMessage)]; |
214 | 214 | ||
215 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 215 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
@@ -223,7 +223,7 @@ handle_lookup_block_response (struct GNUNET_NAMECACHE_QueueEntry *qe, | |||
223 | return GNUNET_OK; | 223 | return GNUNET_OK; |
224 | } | 224 | } |
225 | 225 | ||
226 | block = (struct GNUNET_NAMESTORE_Block *) buf; | 226 | block = (struct GNUNET_GNSRECORD_Block *) buf; |
227 | block->signature = msg->signature; | 227 | block->signature = msg->signature; |
228 | block->derived_key = msg->derived_key; | 228 | block->derived_key = msg->derived_key; |
229 | block->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN); | 229 | block->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN); |
@@ -235,7 +235,7 @@ handle_lookup_block_response (struct GNUNET_NAMECACHE_QueueEntry *qe, | |||
235 | &msg[1], | 235 | &msg[1], |
236 | size - sizeof (struct LookupBlockResponseMessage)); | 236 | size - sizeof (struct LookupBlockResponseMessage)); |
237 | if (GNUNET_OK != | 237 | if (GNUNET_OK != |
238 | GNUNET_NAMESTORE_block_verify (block)) | 238 | GNUNET_GNSRECORD_block_verify (block)) |
239 | { | 239 | { |
240 | GNUNET_break (0); | 240 | GNUNET_break (0); |
241 | return GNUNET_SYSERR; | 241 | return GNUNET_SYSERR; |
@@ -623,7 +623,7 @@ GNUNET_NAMECACHE_disconnect (struct GNUNET_NAMECACHE_Handle *h) | |||
623 | */ | 623 | */ |
624 | struct GNUNET_NAMECACHE_QueueEntry * | 624 | struct GNUNET_NAMECACHE_QueueEntry * |
625 | GNUNET_NAMECACHE_block_cache (struct GNUNET_NAMECACHE_Handle *h, | 625 | GNUNET_NAMECACHE_block_cache (struct GNUNET_NAMECACHE_Handle *h, |
626 | const struct GNUNET_NAMESTORE_Block *block, | 626 | const struct GNUNET_GNSRECORD_Block *block, |
627 | GNUNET_NAMECACHE_ContinuationWithStatus cont, | 627 | GNUNET_NAMECACHE_ContinuationWithStatus cont, |
628 | void *cont_cls) | 628 | void *cont_cls) |
629 | { | 629 | { |
@@ -683,7 +683,7 @@ GNUNET_NAMECACHE_block_cache (struct GNUNET_NAMECACHE_Handle *h, | |||
683 | struct GNUNET_NAMECACHE_QueueEntry * | 683 | struct GNUNET_NAMECACHE_QueueEntry * |
684 | GNUNET_NAMECACHE_lookup_block (struct GNUNET_NAMECACHE_Handle *h, | 684 | GNUNET_NAMECACHE_lookup_block (struct GNUNET_NAMECACHE_Handle *h, |
685 | const struct GNUNET_HashCode *derived_hash, | 685 | const struct GNUNET_HashCode *derived_hash, |
686 | GNUNET_NAMESTORE_BlockProcessor proc, void *proc_cls) | 686 | GNUNET_GNSRECORD_BlockProcessor proc, void *proc_cls) |
687 | { | 687 | { |
688 | struct GNUNET_NAMECACHE_QueueEntry *qe; | 688 | struct GNUNET_NAMECACHE_QueueEntry *qe; |
689 | struct PendingMessage *pe; | 689 | struct PendingMessage *pe; |
diff --git a/src/namecache/plugin_namecache_postgres.c b/src/namecache/plugin_namecache_postgres.c index 72cfcf243..7135375dc 100644 --- a/src/namecache/plugin_namecache_postgres.c +++ b/src/namecache/plugin_namecache_postgres.c | |||
@@ -255,7 +255,7 @@ delete_old_block (struct Plugin *plugin, | |||
255 | */ | 255 | */ |
256 | static int | 256 | static int |
257 | namecache_postgres_cache_block (void *cls, | 257 | namecache_postgres_cache_block (void *cls, |
258 | const struct GNUNET_NAMESTORE_Block *block) | 258 | const struct GNUNET_GNSRECORD_Block *block) |
259 | { | 259 | { |
260 | struct Plugin *plugin = cls; | 260 | struct Plugin *plugin = cls; |
261 | struct GNUNET_HashCode query; | 261 | struct GNUNET_HashCode query; |
@@ -327,7 +327,7 @@ namecache_postgres_lookup_block (void *cls, | |||
327 | PGresult *res; | 327 | PGresult *res; |
328 | unsigned int cnt; | 328 | unsigned int cnt; |
329 | size_t bsize; | 329 | size_t bsize; |
330 | const struct GNUNET_NAMESTORE_Block *block; | 330 | const struct GNUNET_GNSRECORD_Block *block; |
331 | 331 | ||
332 | res = PQexecPrepared (plugin->dbh, | 332 | res = PQexecPrepared (plugin->dbh, |
333 | "lookup_block", 1, | 333 | "lookup_block", 1, |
@@ -353,7 +353,7 @@ namecache_postgres_lookup_block (void *cls, | |||
353 | GNUNET_assert (1 == cnt); | 353 | GNUNET_assert (1 == cnt); |
354 | GNUNET_assert (1 != PQnfields (res)); | 354 | GNUNET_assert (1 != PQnfields (res)); |
355 | bsize = PQgetlength (res, 0, 0); | 355 | bsize = PQgetlength (res, 0, 0); |
356 | block = (const struct GNUNET_NAMESTORE_Block *) PQgetvalue (res, 0, 0); | 356 | block = (const struct GNUNET_GNSRECORD_Block *) PQgetvalue (res, 0, 0); |
357 | if ( (bsize < sizeof (*block)) || | 357 | if ( (bsize < sizeof (*block)) || |
358 | (bsize != ntohl (block->purpose.size) + | 358 | (bsize != ntohl (block->purpose.size) + |
359 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) + | 359 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) + |
diff --git a/src/namecache/plugin_namecache_sqlite.c b/src/namecache/plugin_namecache_sqlite.c index 7eb8b4503..2e78fee44 100644 --- a/src/namecache/plugin_namecache_sqlite.c +++ b/src/namecache/plugin_namecache_sqlite.c | |||
@@ -366,7 +366,7 @@ namecache_sqlite_expire_blocks (struct Plugin *plugin) | |||
366 | */ | 366 | */ |
367 | static int | 367 | static int |
368 | namecache_sqlite_cache_block (void *cls, | 368 | namecache_sqlite_cache_block (void *cls, |
369 | const struct GNUNET_NAMESTORE_Block *block) | 369 | const struct GNUNET_GNSRECORD_Block *block) |
370 | { | 370 | { |
371 | struct Plugin *plugin = cls; | 371 | struct Plugin *plugin = cls; |
372 | struct GNUNET_HashCode query; | 372 | struct GNUNET_HashCode query; |
@@ -495,7 +495,7 @@ namecache_sqlite_lookup_block (void *cls, | |||
495 | int ret; | 495 | int ret; |
496 | int sret; | 496 | int sret; |
497 | size_t block_size; | 497 | size_t block_size; |
498 | const struct GNUNET_NAMESTORE_Block *block; | 498 | const struct GNUNET_GNSRECORD_Block *block; |
499 | 499 | ||
500 | if (SQLITE_OK != sqlite3_bind_blob (plugin->lookup_block, 1, | 500 | if (SQLITE_OK != sqlite3_bind_blob (plugin->lookup_block, 1, |
501 | query, sizeof (struct GNUNET_HashCode), | 501 | query, sizeof (struct GNUNET_HashCode), |
@@ -514,7 +514,7 @@ namecache_sqlite_lookup_block (void *cls, | |||
514 | { | 514 | { |
515 | block = sqlite3_column_blob (plugin->lookup_block, 0); | 515 | block = sqlite3_column_blob (plugin->lookup_block, 0); |
516 | block_size = sqlite3_column_bytes (plugin->lookup_block, 0); | 516 | block_size = sqlite3_column_bytes (plugin->lookup_block, 0); |
517 | if ( (block_size < sizeof (struct GNUNET_NAMESTORE_Block)) || | 517 | if ( (block_size < sizeof (struct GNUNET_GNSRECORD_Block)) || |
518 | (ntohl (block->purpose.size) + | 518 | (ntohl (block->purpose.size) + |
519 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) + | 519 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) + |
520 | sizeof (struct GNUNET_CRYPTO_EcdsaSignature) != block_size) ) | 520 | sizeof (struct GNUNET_CRYPTO_EcdsaSignature) != block_size) ) |
diff --git a/src/namecache/test_namecache_api_cache_block.c b/src/namecache/test_namecache_api_cache_block.c index f28016cd1..cbc74211f 100644 --- a/src/namecache/test_namecache_api_cache_block.c +++ b/src/namecache/test_namecache_api_cache_block.c | |||
@@ -94,7 +94,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
94 | static void | 94 | static void |
95 | rd_decrypt_cb (void *cls, | 95 | rd_decrypt_cb (void *cls, |
96 | unsigned int rd_count, | 96 | unsigned int rd_count, |
97 | const struct GNUNET_NAMESTORE_RecordData *rd) | 97 | const struct GNUNET_GNSRECORD_Data *rd) |
98 | { | 98 | { |
99 | char rd_cmp_data[TEST_RECORD_DATALEN]; | 99 | char rd_cmp_data[TEST_RECORD_DATALEN]; |
100 | 100 | ||
@@ -115,7 +115,7 @@ rd_decrypt_cb (void *cls, | |||
115 | 115 | ||
116 | static void | 116 | static void |
117 | name_lookup_proc (void *cls, | 117 | name_lookup_proc (void *cls, |
118 | const struct GNUNET_NAMESTORE_Block *block) | 118 | const struct GNUNET_GNSRECORD_Block *block) |
119 | { | 119 | { |
120 | const char *name = cls; | 120 | const char *name = cls; |
121 | nsqe = NULL; | 121 | nsqe = NULL; |
@@ -140,7 +140,7 @@ name_lookup_proc (void *cls, | |||
140 | 140 | ||
141 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 141 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
142 | "Namecache returned block, decrypting \n"); | 142 | "Namecache returned block, decrypting \n"); |
143 | GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_block_decrypt(block, | 143 | GNUNET_assert (GNUNET_OK == GNUNET_GNSRECORD_block_decrypt(block, |
144 | &pubkey, name, &rd_decrypt_cb, (void *) name)); | 144 | &pubkey, name, &rd_decrypt_cb, (void *) name)); |
145 | } | 145 | } |
146 | 146 | ||
@@ -158,7 +158,7 @@ cache_cont (void *cls, int32_t success, const char *emsg) | |||
158 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); | 158 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); |
159 | 159 | ||
160 | /* Create derived hash */ | 160 | /* Create derived hash */ |
161 | GNUNET_NAMESTORE_query_from_public_key (&pubkey, name, &derived_hash); | 161 | GNUNET_GNSRECORD_query_from_public_key (&pubkey, name, &derived_hash); |
162 | 162 | ||
163 | nsqe = GNUNET_NAMECACHE_lookup_block (nsh, &derived_hash, | 163 | nsqe = GNUNET_NAMECACHE_lookup_block (nsh, &derived_hash, |
164 | &name_lookup_proc, (void *) name); | 164 | &name_lookup_proc, (void *) name); |
@@ -170,8 +170,8 @@ run (void *cls, | |||
170 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 170 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
171 | struct GNUNET_TESTING_Peer *peer) | 171 | struct GNUNET_TESTING_Peer *peer) |
172 | { | 172 | { |
173 | struct GNUNET_NAMESTORE_RecordData rd; | 173 | struct GNUNET_GNSRECORD_Data rd; |
174 | struct GNUNET_NAMESTORE_Block *block; | 174 | struct GNUNET_GNSRECORD_Block *block; |
175 | char *hostkey_file; | 175 | char *hostkey_file; |
176 | const char * name = "dummy.dummy.gnunet"; | 176 | const char * name = "dummy.dummy.gnunet"; |
177 | 177 | ||
@@ -193,7 +193,7 @@ run (void *cls, | |||
193 | rd.data_size = TEST_RECORD_DATALEN; | 193 | rd.data_size = TEST_RECORD_DATALEN; |
194 | rd.data = GNUNET_malloc (TEST_RECORD_DATALEN); | 194 | rd.data = GNUNET_malloc (TEST_RECORD_DATALEN); |
195 | memset ((char *) rd.data, 'a', TEST_RECORD_DATALEN); | 195 | memset ((char *) rd.data, 'a', TEST_RECORD_DATALEN); |
196 | block = GNUNET_NAMESTORE_block_create (privkey, | 196 | block = GNUNET_GNSRECORD_block_create (privkey, |
197 | GNUNET_TIME_UNIT_FOREVER_ABS, name, &rd, 1 ); | 197 | GNUNET_TIME_UNIT_FOREVER_ABS, name, &rd, 1 ); |
198 | if (NULL == block) | 198 | if (NULL == block) |
199 | { | 199 | { |
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c index 701cdd558..198d0a9dc 100644 --- a/src/namestore/gnunet-namestore-fcfsd.c +++ b/src/namestore/gnunet-namestore-fcfsd.c | |||
@@ -246,7 +246,7 @@ iterate_cb (void *cls, | |||
246 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 246 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
247 | const char *name, | 247 | const char *name, |
248 | unsigned int rd_len, | 248 | unsigned int rd_len, |
249 | const struct GNUNET_NAMESTORE_RecordData *rd) | 249 | const struct GNUNET_GNSRECORD_Data *rd) |
250 | { | 250 | { |
251 | struct ZoneinfoRequest *zr = cls; | 251 | struct ZoneinfoRequest *zr = cls; |
252 | struct MHD_Response *response; | 252 | struct MHD_Response *response; |
@@ -508,10 +508,10 @@ zone_to_name_cb (void *cls, | |||
508 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 508 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
509 | const char *name, | 509 | const char *name, |
510 | unsigned int rd_count, | 510 | unsigned int rd_count, |
511 | const struct GNUNET_NAMESTORE_RecordData *rd) | 511 | const struct GNUNET_GNSRECORD_Data *rd) |
512 | { | 512 | { |
513 | struct Request *request = cls; | 513 | struct Request *request = cls; |
514 | struct GNUNET_NAMESTORE_RecordData r; | 514 | struct GNUNET_GNSRECORD_Data r; |
515 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; | 515 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; |
516 | 516 | ||
517 | request->qe = NULL; | 517 | request->qe = NULL; |
@@ -530,7 +530,7 @@ zone_to_name_cb (void *cls, | |||
530 | r.data_size = sizeof (pub); | 530 | r.data_size = sizeof (pub); |
531 | r.expiration_time = UINT64_MAX; | 531 | r.expiration_time = UINT64_MAX; |
532 | r.record_type = GNUNET_GNSRECORD_TYPE_PKEY; | 532 | r.record_type = GNUNET_GNSRECORD_TYPE_PKEY; |
533 | r.flags = GNUNET_NAMESTORE_RF_NONE; | 533 | r.flags = GNUNET_GNSRECORD_RF_NONE; |
534 | request->qe = GNUNET_NAMESTORE_records_store (ns, | 534 | request->qe = GNUNET_NAMESTORE_records_store (ns, |
535 | &fcfs_zone_pkey, | 535 | &fcfs_zone_pkey, |
536 | request->domain_name, | 536 | request->domain_name, |
@@ -552,7 +552,7 @@ zone_to_name_cb (void *cls, | |||
552 | static void | 552 | static void |
553 | lookup_result_processor (void *cls, | 553 | lookup_result_processor (void *cls, |
554 | unsigned int rd_count, | 554 | unsigned int rd_count, |
555 | const struct GNUNET_NAMESTORE_RecordData *rd) | 555 | const struct GNUNET_GNSRECORD_Data *rd) |
556 | { | 556 | { |
557 | struct Request *request = cls; | 557 | struct Request *request = cls; |
558 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; | 558 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; |
@@ -594,7 +594,7 @@ lookup_result_processor (void *cls, | |||
594 | */ | 594 | */ |
595 | static void | 595 | static void |
596 | lookup_block_processor (void *cls, | 596 | lookup_block_processor (void *cls, |
597 | const struct GNUNET_NAMESTORE_Block *block) | 597 | const struct GNUNET_GNSRECORD_Block *block) |
598 | { | 598 | { |
599 | struct Request *request = cls; | 599 | struct Request *request = cls; |
600 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; | 600 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; |
@@ -608,7 +608,7 @@ lookup_block_processor (void *cls, | |||
608 | GNUNET_CRYPTO_ecdsa_key_get_public (&fcfs_zone_pkey, | 608 | GNUNET_CRYPTO_ecdsa_key_get_public (&fcfs_zone_pkey, |
609 | &pub); | 609 | &pub); |
610 | if (GNUNET_OK != | 610 | if (GNUNET_OK != |
611 | GNUNET_NAMESTORE_block_decrypt (block, | 611 | GNUNET_GNSRECORD_block_decrypt (block, |
612 | &pub, | 612 | &pub, |
613 | request->domain_name, | 613 | request->domain_name, |
614 | &lookup_result_processor, | 614 | &lookup_result_processor, |
@@ -738,7 +738,7 @@ create_response (void *cls, | |||
738 | request->phase = RP_LOOKUP; | 738 | request->phase = RP_LOOKUP; |
739 | GNUNET_CRYPTO_ecdsa_key_get_public (&fcfs_zone_pkey, | 739 | GNUNET_CRYPTO_ecdsa_key_get_public (&fcfs_zone_pkey, |
740 | &pub); | 740 | &pub); |
741 | GNUNET_NAMESTORE_query_from_public_key (&pub, | 741 | GNUNET_GNSRECORD_query_from_public_key (&pub, |
742 | request->domain_name, | 742 | request->domain_name, |
743 | &query); | 743 | &query); |
744 | request->qe = GNUNET_NAMESTORE_lookup_block (ns, | 744 | request->qe = GNUNET_NAMESTORE_lookup_block (ns, |
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 1ed203f1d..45e721b89 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -100,12 +100,12 @@ static struct GNUNET_NAMESTORE_ZoneIterator *list_it; | |||
100 | static int del; | 100 | static int del; |
101 | 101 | ||
102 | /** | 102 | /** |
103 | * Is record public (opposite of #GNUNET_NAMESTORE_RF_PRIVATE) | 103 | * Is record public (opposite of #GNUNET_GNSRECORD_RF_PRIVATE) |
104 | */ | 104 | */ |
105 | static int public; | 105 | static int public; |
106 | 106 | ||
107 | /** | 107 | /** |
108 | * Is record a shadow record (#GNUNET_NAMESTORE_RF_SHADOW_RECORD) | 108 | * Is record a shadow record (#GNUNET_GNSRECORD_RF_SHADOW_RECORD) |
109 | */ | 109 | */ |
110 | static int shadow; | 110 | static int shadow; |
111 | 111 | ||
@@ -338,7 +338,7 @@ display_record (void *cls, | |||
338 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 338 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
339 | const char *name, | 339 | const char *name, |
340 | unsigned int rd_len, | 340 | unsigned int rd_len, |
341 | const struct GNUNET_NAMESTORE_RecordData *rd) | 341 | const struct GNUNET_GNSRECORD_Data *rd) |
342 | { | 342 | { |
343 | const char *typestring; | 343 | const char *typestring; |
344 | char *s; | 344 | char *s; |
@@ -368,7 +368,7 @@ display_record (void *cls, | |||
368 | (unsigned int) rd[i].record_type); | 368 | (unsigned int) rd[i].record_type); |
369 | continue; | 369 | continue; |
370 | } | 370 | } |
371 | if (0 != (rd[i].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)) | 371 | if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) |
372 | { | 372 | { |
373 | rt.rel_value_us = rd[i].expiration_time; | 373 | rt.rel_value_us = rd[i].expiration_time; |
374 | ets = GNUNET_STRINGS_relative_time_to_string (rt, GNUNET_YES); | 374 | ets = GNUNET_STRINGS_relative_time_to_string (rt, GNUNET_YES); |
@@ -417,10 +417,10 @@ get_existing_record (void *cls, | |||
417 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 417 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
418 | const char *rec_name, | 418 | const char *rec_name, |
419 | unsigned int rd_count, | 419 | unsigned int rd_count, |
420 | const struct GNUNET_NAMESTORE_RecordData *rd) | 420 | const struct GNUNET_GNSRECORD_Data *rd) |
421 | { | 421 | { |
422 | struct GNUNET_NAMESTORE_RecordData rdn[rd_count + 1]; | 422 | struct GNUNET_GNSRECORD_Data rdn[rd_count + 1]; |
423 | struct GNUNET_NAMESTORE_RecordData *rde; | 423 | struct GNUNET_GNSRECORD_Data *rde; |
424 | 424 | ||
425 | if ( (NULL != zone_key) && | 425 | if ( (NULL != zone_key) && |
426 | (0 != strcmp (rec_name, name)) ) | 426 | (0 != strcmp (rec_name, name)) ) |
@@ -428,8 +428,8 @@ get_existing_record (void *cls, | |||
428 | GNUNET_NAMESTORE_zone_iterator_next (add_zit); | 428 | GNUNET_NAMESTORE_zone_iterator_next (add_zit); |
429 | return; | 429 | return; |
430 | } | 430 | } |
431 | memset (rdn, 0, sizeof (struct GNUNET_NAMESTORE_RecordData)); | 431 | memset (rdn, 0, sizeof (struct GNUNET_GNSRECORD_Data)); |
432 | memcpy (&rdn[1], rd, rd_count * sizeof (struct GNUNET_NAMESTORE_RecordData)); | 432 | memcpy (&rdn[1], rd, rd_count * sizeof (struct GNUNET_GNSRECORD_Data)); |
433 | /* FIXME: should add some logic to overwrite records if there | 433 | /* FIXME: should add some logic to overwrite records if there |
434 | can only be one record of a particular type, and to check | 434 | can only be one record of a particular type, and to check |
435 | if the combination of records is valid to begin with... */ | 435 | if the combination of records is valid to begin with... */ |
@@ -438,13 +438,13 @@ get_existing_record (void *cls, | |||
438 | rde->data_size = data_size; | 438 | rde->data_size = data_size; |
439 | rde->record_type = type; | 439 | rde->record_type = type; |
440 | if (1 != shadow) | 440 | if (1 != shadow) |
441 | rde->flags |= GNUNET_NAMESTORE_RF_SHADOW_RECORD; | 441 | rde->flags |= GNUNET_GNSRECORD_RF_SHADOW_RECORD; |
442 | if (1 != public) | 442 | if (1 != public) |
443 | rde->flags |= GNUNET_NAMESTORE_RF_PRIVATE; | 443 | rde->flags |= GNUNET_GNSRECORD_RF_PRIVATE; |
444 | if (GNUNET_YES == etime_is_rel) | 444 | if (GNUNET_YES == etime_is_rel) |
445 | { | 445 | { |
446 | rde->expiration_time = etime_rel.rel_value_us; | 446 | rde->expiration_time = etime_rel.rel_value_us; |
447 | rde->flags |= GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION; | 447 | rde->flags |= GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION; |
448 | } | 448 | } |
449 | else if (GNUNET_NO == etime_is_rel) | 449 | else if (GNUNET_NO == etime_is_rel) |
450 | rde->expiration_time = etime_abs.abs_value_us; | 450 | rde->expiration_time = etime_abs.abs_value_us; |
@@ -477,7 +477,7 @@ get_existing_record (void *cls, | |||
477 | static void | 477 | static void |
478 | display_records_from_block (void *cls, | 478 | display_records_from_block (void *cls, |
479 | unsigned int rd_len, | 479 | unsigned int rd_len, |
480 | const struct GNUNET_NAMESTORE_RecordData *rd) | 480 | const struct GNUNET_GNSRECORD_Data *rd) |
481 | { | 481 | { |
482 | const char *typestring; | 482 | const char *typestring; |
483 | char *s; | 483 | char *s; |
@@ -523,7 +523,7 @@ display_records_from_block (void *cls, | |||
523 | */ | 523 | */ |
524 | static void | 524 | static void |
525 | handle_block (void *cls, | 525 | handle_block (void *cls, |
526 | const struct GNUNET_NAMESTORE_Block *block) | 526 | const struct GNUNET_GNSRECORD_Block *block) |
527 | { | 527 | { |
528 | struct GNUNET_CRYPTO_EcdsaPublicKey zone_pubkey; | 528 | struct GNUNET_CRYPTO_EcdsaPublicKey zone_pubkey; |
529 | 529 | ||
@@ -536,7 +536,7 @@ handle_block (void *cls, | |||
536 | "No matching block found\n"); | 536 | "No matching block found\n"); |
537 | } | 537 | } |
538 | else if (GNUNET_OK != | 538 | else if (GNUNET_OK != |
539 | GNUNET_NAMESTORE_block_decrypt (block, | 539 | GNUNET_GNSRECORD_block_decrypt (block, |
540 | &zone_pubkey, | 540 | &zone_pubkey, |
541 | name, | 541 | name, |
542 | &display_records_from_block, | 542 | &display_records_from_block, |
@@ -564,7 +564,7 @@ handle_reverse_lookup (void *cls, | |||
564 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 564 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
565 | const char *label, | 565 | const char *label, |
566 | unsigned int rd_count, | 566 | unsigned int rd_count, |
567 | const struct GNUNET_NAMESTORE_RecordData *rd) | 567 | const struct GNUNET_GNSRECORD_Data *rd) |
568 | { | 568 | { |
569 | reverse_qe = NULL; | 569 | reverse_qe = NULL; |
570 | if (NULL == label) | 570 | if (NULL == label) |
@@ -593,7 +593,7 @@ testservice_task (void *cls, | |||
593 | { | 593 | { |
594 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; | 594 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; |
595 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; | 595 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; |
596 | struct GNUNET_NAMESTORE_RecordData rd; | 596 | struct GNUNET_GNSRECORD_Data rd; |
597 | 597 | ||
598 | if (GNUNET_YES != result) | 598 | if (GNUNET_YES != result) |
599 | { | 599 | { |
@@ -743,7 +743,7 @@ testservice_task (void *cls, | |||
743 | 743 | ||
744 | GNUNET_CRYPTO_ecdsa_key_get_public (&zone_pkey, | 744 | GNUNET_CRYPTO_ecdsa_key_get_public (&zone_pkey, |
745 | &zone_pubkey); | 745 | &zone_pubkey); |
746 | GNUNET_NAMESTORE_query_from_public_key (&zone_pubkey, | 746 | GNUNET_GNSRECORD_query_from_public_key (&zone_pubkey, |
747 | name, | 747 | name, |
748 | &query); | 748 | &query); |
749 | list_qe = GNUNET_NAMESTORE_lookup_block (ns, | 749 | list_qe = GNUNET_NAMESTORE_lookup_block (ns, |
@@ -799,14 +799,14 @@ testservice_task (void *cls, | |||
799 | if (GNUNET_YES == etime_is_rel) | 799 | if (GNUNET_YES == etime_is_rel) |
800 | { | 800 | { |
801 | rd.expiration_time = etime_rel.rel_value_us; | 801 | rd.expiration_time = etime_rel.rel_value_us; |
802 | rd.flags |= GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION; | 802 | rd.flags |= GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION; |
803 | } | 803 | } |
804 | else if (GNUNET_NO == etime_is_rel) | 804 | else if (GNUNET_NO == etime_is_rel) |
805 | rd.expiration_time = etime_abs.abs_value_us; | 805 | rd.expiration_time = etime_abs.abs_value_us; |
806 | else | 806 | else |
807 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; | 807 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; |
808 | if (1 != shadow) | 808 | if (1 != shadow) |
809 | rd.flags |= GNUNET_NAMESTORE_RF_SHADOW_RECORD; | 809 | rd.flags |= GNUNET_GNSRECORD_RF_SHADOW_RECORD; |
810 | add_qe_uri = GNUNET_NAMESTORE_records_store (ns, | 810 | add_qe_uri = GNUNET_NAMESTORE_records_store (ns, |
811 | &zone_pkey, | 811 | &zone_pkey, |
812 | sname, | 812 | sname, |
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index 2cce92635..869be75d5 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -347,14 +347,14 @@ struct LookupBlockContext | |||
347 | 347 | ||
348 | 348 | ||
349 | /** | 349 | /** |
350 | * A #GNUNET_NAMESTORE_BlockCallback for name lookups in #handle_lookup_block | 350 | * A #GNUNET_GNSRECORD_BlockCallback for name lookups in #handle_lookup_block |
351 | * | 351 | * |
352 | * @param cls a `struct LookupNameContext *` with information about the request | 352 | * @param cls a `struct LookupNameContext *` with information about the request |
353 | * @param block the block | 353 | * @param block the block |
354 | */ | 354 | */ |
355 | static void | 355 | static void |
356 | handle_lookup_block_it (void *cls, | 356 | handle_lookup_block_it (void *cls, |
357 | const struct GNUNET_NAMESTORE_Block *block) | 357 | const struct GNUNET_GNSRECORD_Block *block) |
358 | { | 358 | { |
359 | struct LookupBlockContext *lnc = cls; | 359 | struct LookupBlockContext *lnc = cls; |
360 | struct LookupBlockResponseMessage *r; | 360 | struct LookupBlockResponseMessage *r; |
@@ -455,7 +455,7 @@ handle_block_cache (void *cls, | |||
455 | struct NamestoreClient *nc; | 455 | struct NamestoreClient *nc; |
456 | const struct BlockCacheMessage *rp_msg; | 456 | const struct BlockCacheMessage *rp_msg; |
457 | struct BlockCacheResponseMessage rpr_msg; | 457 | struct BlockCacheResponseMessage rpr_msg; |
458 | struct GNUNET_NAMESTORE_Block *block; | 458 | struct GNUNET_GNSRECORD_Block *block; |
459 | size_t esize; | 459 | size_t esize; |
460 | int res; | 460 | int res; |
461 | 461 | ||
@@ -468,7 +468,7 @@ handle_block_cache (void *cls, | |||
468 | } | 468 | } |
469 | rp_msg = (const struct BlockCacheMessage *) message; | 469 | rp_msg = (const struct BlockCacheMessage *) message; |
470 | esize = ntohs (rp_msg->gns_header.header.size) - sizeof (struct BlockCacheMessage); | 470 | esize = ntohs (rp_msg->gns_header.header.size) - sizeof (struct BlockCacheMessage); |
471 | block = GNUNET_malloc (sizeof (struct GNUNET_NAMESTORE_Block) + esize); | 471 | block = GNUNET_malloc (sizeof (struct GNUNET_GNSRECORD_Block) + esize); |
472 | block->signature = rp_msg->signature; | 472 | block->signature = rp_msg->signature; |
473 | block->derived_key = rp_msg->derived_key; | 473 | block->derived_key = rp_msg->derived_key; |
474 | block->purpose.size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + | 474 | block->purpose.size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + |
@@ -515,7 +515,7 @@ send_lookup_response (struct GNUNET_SERVER_NotificationContext *nc, | |||
515 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 515 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
516 | const char *name, | 516 | const char *name, |
517 | unsigned int rd_count, | 517 | unsigned int rd_count, |
518 | const struct GNUNET_NAMESTORE_RecordData *rd) | 518 | const struct GNUNET_GNSRECORD_Data *rd) |
519 | { | 519 | { |
520 | struct RecordResultMessage *zir_msg; | 520 | struct RecordResultMessage *zir_msg; |
521 | size_t name_len; | 521 | size_t name_len; |
@@ -525,7 +525,7 @@ send_lookup_response (struct GNUNET_SERVER_NotificationContext *nc, | |||
525 | char *rd_ser; | 525 | char *rd_ser; |
526 | 526 | ||
527 | name_len = strlen (name) + 1; | 527 | name_len = strlen (name) + 1; |
528 | rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); | 528 | rd_ser_len = GNUNET_GNSRECORD_records_get_size (rd_count, rd); |
529 | msg_size = sizeof (struct RecordResultMessage) + name_len + rd_ser_len; | 529 | msg_size = sizeof (struct RecordResultMessage) + name_len + rd_ser_len; |
530 | 530 | ||
531 | zir_msg = GNUNET_malloc (msg_size); | 531 | zir_msg = GNUNET_malloc (msg_size); |
@@ -539,7 +539,7 @@ send_lookup_response (struct GNUNET_SERVER_NotificationContext *nc, | |||
539 | name_tmp = (char *) &zir_msg[1]; | 539 | name_tmp = (char *) &zir_msg[1]; |
540 | memcpy (name_tmp, name, name_len); | 540 | memcpy (name_tmp, name, name_len); |
541 | rd_ser = &name_tmp[name_len]; | 541 | rd_ser = &name_tmp[name_len]; |
542 | GNUNET_NAMESTORE_records_serialize (rd_count, rd, rd_ser_len, rd_ser); | 542 | GNUNET_GNSRECORD_records_serialize (rd_count, rd, rd_ser_len, rd_ser); |
543 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 543 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
544 | "Sending `%s' message with %u records and size %u\n", | 544 | "Sending `%s' message with %u records and size %u\n", |
545 | "RECORD_RESULT", | 545 | "RECORD_RESULT", |
@@ -566,18 +566,18 @@ static void | |||
566 | refresh_block (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 566 | refresh_block (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
567 | const char *name, | 567 | const char *name, |
568 | unsigned int rd_count, | 568 | unsigned int rd_count, |
569 | const struct GNUNET_NAMESTORE_RecordData *rd) | 569 | const struct GNUNET_GNSRECORD_Data *rd) |
570 | { | 570 | { |
571 | struct GNUNET_NAMESTORE_Block *block; | 571 | struct GNUNET_GNSRECORD_Block *block; |
572 | 572 | ||
573 | if (0 == rd_count) | 573 | if (0 == rd_count) |
574 | block = GNUNET_NAMESTORE_block_create (zone_key, | 574 | block = GNUNET_GNSRECORD_block_create (zone_key, |
575 | GNUNET_TIME_UNIT_ZERO_ABS, | 575 | GNUNET_TIME_UNIT_ZERO_ABS, |
576 | name, | 576 | name, |
577 | rd, rd_count); | 577 | rd, rd_count); |
578 | else | 578 | else |
579 | block = GNUNET_NAMESTORE_block_create (zone_key, | 579 | block = GNUNET_GNSRECORD_block_create (zone_key, |
580 | GNUNET_NAMESTORE_record_get_expiration_time (rd_count, | 580 | GNUNET_GNSRECORD_record_get_expiration_time (rd_count, |
581 | rd), | 581 | rd), |
582 | name, | 582 | name, |
583 | rd, rd_count); | 583 | rd, rd_count); |
@@ -659,10 +659,10 @@ handle_record_store (void *cls, | |||
659 | return; | 659 | return; |
660 | } | 660 | } |
661 | { | 661 | { |
662 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; | 662 | struct GNUNET_GNSRECORD_Data rd[rd_count]; |
663 | 663 | ||
664 | if (GNUNET_OK != | 664 | if (GNUNET_OK != |
665 | GNUNET_NAMESTORE_records_deserialize (rd_ser_len, rd_ser, rd_count, rd)) | 665 | GNUNET_GNSRECORD_records_deserialize (rd_ser_len, rd_ser, rd_count, rd)) |
666 | { | 666 | { |
667 | GNUNET_break (0); | 667 | GNUNET_break (0); |
668 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 668 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
@@ -672,7 +672,7 @@ handle_record_store (void *cls, | |||
672 | /* Extracting and converting private key */ | 672 | /* Extracting and converting private key */ |
673 | GNUNET_CRYPTO_ecdsa_key_get_public (&rp_msg->private_key, | 673 | GNUNET_CRYPTO_ecdsa_key_get_public (&rp_msg->private_key, |
674 | &pubkey); | 674 | &pubkey); |
675 | conv_name = GNUNET_NAMESTORE_normalize_string (name_tmp); | 675 | conv_name = GNUNET_GNSRECORD_string_to_lowercase (name_tmp); |
676 | if (NULL == conv_name) | 676 | if (NULL == conv_name) |
677 | { | 677 | { |
678 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 678 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -684,7 +684,7 @@ handle_record_store (void *cls, | |||
684 | "Creating %u records for name `%s' in zone `%s'\n", | 684 | "Creating %u records for name `%s' in zone `%s'\n", |
685 | (unsigned int) rd_count, | 685 | (unsigned int) rd_count, |
686 | conv_name, | 686 | conv_name, |
687 | GNUNET_NAMESTORE_z2s (&pubkey)); | 687 | GNUNET_GNSRECORD_z2s (&pubkey)); |
688 | 688 | ||
689 | if ( (0 == rd_count) && | 689 | if ( (0 == rd_count) && |
690 | (GNUNET_NO == | 690 | (GNUNET_NO == |
@@ -777,7 +777,7 @@ handle_zone_to_name_it (void *cls, | |||
777 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 777 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
778 | const char *name, | 778 | const char *name, |
779 | unsigned int rd_count, | 779 | unsigned int rd_count, |
780 | const struct GNUNET_NAMESTORE_RecordData *rd) | 780 | const struct GNUNET_GNSRECORD_Data *rd) |
781 | { | 781 | { |
782 | struct ZoneToNameCtx *ztn_ctx = cls; | 782 | struct ZoneToNameCtx *ztn_ctx = cls; |
783 | struct ZoneToNameResponseMessage *ztnr_msg; | 783 | struct ZoneToNameResponseMessage *ztnr_msg; |
@@ -793,7 +793,7 @@ handle_zone_to_name_it (void *cls, | |||
793 | name); | 793 | name); |
794 | res = GNUNET_YES; | 794 | res = GNUNET_YES; |
795 | name_len = (NULL == name) ? 0 : strlen (name) + 1; | 795 | name_len = (NULL == name) ? 0 : strlen (name) + 1; |
796 | rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); | 796 | rd_ser_len = GNUNET_GNSRECORD_records_get_size (rd_count, rd); |
797 | msg_size = sizeof (struct ZoneToNameResponseMessage) + name_len + rd_ser_len; | 797 | msg_size = sizeof (struct ZoneToNameResponseMessage) + name_len + rd_ser_len; |
798 | if (msg_size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) | 798 | if (msg_size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) |
799 | { | 799 | { |
@@ -814,7 +814,7 @@ handle_zone_to_name_it (void *cls, | |||
814 | if (NULL != name) | 814 | if (NULL != name) |
815 | memcpy (name_tmp, name, name_len); | 815 | memcpy (name_tmp, name, name_len); |
816 | rd_tmp = &name_tmp[name_len]; | 816 | rd_tmp = &name_tmp[name_len]; |
817 | GNUNET_NAMESTORE_records_serialize (rd_count, rd, rd_ser_len, rd_tmp); | 817 | GNUNET_GNSRECORD_records_serialize (rd_count, rd, rd_ser_len, rd_tmp); |
818 | ztn_ctx->success = GNUNET_OK; | 818 | ztn_ctx->success = GNUNET_OK; |
819 | GNUNET_SERVER_notification_context_unicast (snc, ztn_ctx->nc->client, | 819 | GNUNET_SERVER_notification_context_unicast (snc, ztn_ctx->nc->client, |
820 | &ztnr_msg->gns_header.header, | 820 | &ztnr_msg->gns_header.header, |
@@ -939,7 +939,7 @@ zone_iteraterate_proc (void *cls, | |||
939 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 939 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
940 | const char *name, | 940 | const char *name, |
941 | unsigned int rd_count, | 941 | unsigned int rd_count, |
942 | const struct GNUNET_NAMESTORE_RecordData *rd) | 942 | const struct GNUNET_GNSRECORD_Data *rd) |
943 | { | 943 | { |
944 | struct ZoneIterationProcResult *proc = cls; | 944 | struct ZoneIterationProcResult *proc = cls; |
945 | unsigned int i; | 945 | unsigned int i; |
@@ -969,8 +969,8 @@ zone_iteraterate_proc (void *cls, | |||
969 | rd); | 969 | rd); |
970 | do_refresh_block = GNUNET_NO; | 970 | do_refresh_block = GNUNET_NO; |
971 | for (i=0;i<rd_count;i++) | 971 | for (i=0;i<rd_count;i++) |
972 | if( (0 != (rd[i].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)) && | 972 | if( (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) && |
973 | (0 == (rd[i].flags & GNUNET_NAMESTORE_RF_PENDING)) ) | 973 | (0 == (rd[i].flags & GNUNET_GNSRECORD_RF_PENDING)) ) |
974 | { | 974 | { |
975 | do_refresh_block = GNUNET_YES; | 975 | do_refresh_block = GNUNET_YES; |
976 | break; | 976 | break; |
@@ -1201,7 +1201,7 @@ monitor_iterate_cb (void *cls, | |||
1201 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 1201 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
1202 | const char *name, | 1202 | const char *name, |
1203 | unsigned int rd_count, | 1203 | unsigned int rd_count, |
1204 | const struct GNUNET_NAMESTORE_RecordData *rd) | 1204 | const struct GNUNET_GNSRECORD_Data *rd) |
1205 | { | 1205 | { |
1206 | struct ZoneMonitor *zm = cls; | 1206 | struct ZoneMonitor *zm = cls; |
1207 | 1207 | ||
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index c4282ec71..03e40ca17 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -85,7 +85,7 @@ struct GNUNET_NAMESTORE_QueueEntry | |||
85 | /** | 85 | /** |
86 | * Function to call with the blocks we get back; or NULL. | 86 | * Function to call with the blocks we get back; or NULL. |
87 | */ | 87 | */ |
88 | GNUNET_NAMESTORE_BlockProcessor block_proc; | 88 | GNUNET_GNSRECORD_BlockProcessor block_proc; |
89 | 89 | ||
90 | /** | 90 | /** |
91 | * Closure for @e block_proc. | 91 | * Closure for @e block_proc. |
@@ -271,8 +271,8 @@ handle_lookup_block_response (struct GNUNET_NAMESTORE_QueueEntry *qe, | |||
271 | const struct LookupBlockResponseMessage *msg, | 271 | const struct LookupBlockResponseMessage *msg, |
272 | size_t size) | 272 | size_t size) |
273 | { | 273 | { |
274 | struct GNUNET_NAMESTORE_Block *block; | 274 | struct GNUNET_GNSRECORD_Block *block; |
275 | char buf[size + sizeof (struct GNUNET_NAMESTORE_Block) | 275 | char buf[size + sizeof (struct GNUNET_GNSRECORD_Block) |
276 | - sizeof (struct LookupBlockResponseMessage)]; | 276 | - sizeof (struct LookupBlockResponseMessage)]; |
277 | 277 | ||
278 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 278 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
@@ -286,7 +286,7 @@ handle_lookup_block_response (struct GNUNET_NAMESTORE_QueueEntry *qe, | |||
286 | return GNUNET_OK; | 286 | return GNUNET_OK; |
287 | } | 287 | } |
288 | 288 | ||
289 | block = (struct GNUNET_NAMESTORE_Block *) buf; | 289 | block = (struct GNUNET_GNSRECORD_Block *) buf; |
290 | block->signature = msg->signature; | 290 | block->signature = msg->signature; |
291 | block->derived_key = msg->derived_key; | 291 | block->derived_key = msg->derived_key; |
292 | block->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN); | 292 | block->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN); |
@@ -298,7 +298,7 @@ handle_lookup_block_response (struct GNUNET_NAMESTORE_QueueEntry *qe, | |||
298 | &msg[1], | 298 | &msg[1], |
299 | size - sizeof (struct LookupBlockResponseMessage)); | 299 | size - sizeof (struct LookupBlockResponseMessage)); |
300 | if (GNUNET_OK != | 300 | if (GNUNET_OK != |
301 | GNUNET_NAMESTORE_block_verify (block)) | 301 | GNUNET_GNSRECORD_block_verify (block)) |
302 | { | 302 | { |
303 | GNUNET_break (0); | 303 | GNUNET_break (0); |
304 | return GNUNET_SYSERR; | 304 | return GNUNET_SYSERR; |
@@ -419,9 +419,9 @@ handle_record_result (struct GNUNET_NAMESTORE_QueueEntry *qe, | |||
419 | } | 419 | } |
420 | rd_tmp = &name[name_len]; | 420 | rd_tmp = &name[name_len]; |
421 | { | 421 | { |
422 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; | 422 | struct GNUNET_GNSRECORD_Data rd[rd_count]; |
423 | 423 | ||
424 | if (GNUNET_OK != GNUNET_NAMESTORE_records_deserialize(rd_len, rd_tmp, rd_count, rd)) | 424 | if (GNUNET_OK != GNUNET_GNSRECORD_records_deserialize(rd_len, rd_tmp, rd_count, rd)) |
425 | { | 425 | { |
426 | GNUNET_break (0); | 426 | GNUNET_break (0); |
427 | return GNUNET_SYSERR; | 427 | return GNUNET_SYSERR; |
@@ -490,9 +490,9 @@ handle_zone_to_name_response (struct GNUNET_NAMESTORE_QueueEntry *qe, | |||
490 | } | 490 | } |
491 | rd_tmp = &name_tmp[name_len]; | 491 | rd_tmp = &name_tmp[name_len]; |
492 | { | 492 | { |
493 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; | 493 | struct GNUNET_GNSRECORD_Data rd[rd_count]; |
494 | 494 | ||
495 | if (GNUNET_OK != GNUNET_NAMESTORE_records_deserialize(rd_ser_len, rd_tmp, rd_count, rd)) | 495 | if (GNUNET_OK != GNUNET_GNSRECORD_records_deserialize(rd_ser_len, rd_tmp, rd_count, rd)) |
496 | { | 496 | { |
497 | GNUNET_break (0); | 497 | GNUNET_break (0); |
498 | return GNUNET_SYSERR; | 498 | return GNUNET_SYSERR; |
@@ -633,9 +633,9 @@ handle_zone_iteration_response (struct GNUNET_NAMESTORE_ZoneIterator *ze, | |||
633 | } | 633 | } |
634 | rd_ser_tmp = (const char *) &name_tmp[name_len]; | 634 | rd_ser_tmp = (const char *) &name_tmp[name_len]; |
635 | { | 635 | { |
636 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; | 636 | struct GNUNET_GNSRECORD_Data rd[rd_count]; |
637 | 637 | ||
638 | if (GNUNET_OK != GNUNET_NAMESTORE_records_deserialize (rd_len, | 638 | if (GNUNET_OK != GNUNET_GNSRECORD_records_deserialize (rd_len, |
639 | rd_ser_tmp, | 639 | rd_ser_tmp, |
640 | rd_count, | 640 | rd_count, |
641 | rd)) | 641 | rd)) |
@@ -1020,7 +1020,7 @@ GNUNET_NAMESTORE_disconnect (struct GNUNET_NAMESTORE_Handle *h) | |||
1020 | */ | 1020 | */ |
1021 | struct GNUNET_NAMESTORE_QueueEntry * | 1021 | struct GNUNET_NAMESTORE_QueueEntry * |
1022 | GNUNET_NAMESTORE_block_cache (struct GNUNET_NAMESTORE_Handle *h, | 1022 | GNUNET_NAMESTORE_block_cache (struct GNUNET_NAMESTORE_Handle *h, |
1023 | const struct GNUNET_NAMESTORE_Block *block, | 1023 | const struct GNUNET_GNSRECORD_Block *block, |
1024 | GNUNET_NAMESTORE_ContinuationWithStatus cont, | 1024 | GNUNET_NAMESTORE_ContinuationWithStatus cont, |
1025 | void *cont_cls) | 1025 | void *cont_cls) |
1026 | { | 1026 | { |
@@ -1085,7 +1085,7 @@ GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h, | |||
1085 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, | 1085 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, |
1086 | const char *label, | 1086 | const char *label, |
1087 | unsigned int rd_count, | 1087 | unsigned int rd_count, |
1088 | const struct GNUNET_NAMESTORE_RecordData *rd, | 1088 | const struct GNUNET_GNSRECORD_Data *rd, |
1089 | GNUNET_NAMESTORE_ContinuationWithStatus cont, | 1089 | GNUNET_NAMESTORE_ContinuationWithStatus cont, |
1090 | void *cont_cls) | 1090 | void *cont_cls) |
1091 | { | 1091 | { |
@@ -1117,7 +1117,7 @@ GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h, | |||
1117 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, qe); | 1117 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, qe); |
1118 | 1118 | ||
1119 | /* setup msg */ | 1119 | /* setup msg */ |
1120 | rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); | 1120 | rd_ser_len = GNUNET_GNSRECORD_records_get_size (rd_count, rd); |
1121 | msg_size = sizeof (struct RecordStoreMessage) + name_len + rd_ser_len; | 1121 | msg_size = sizeof (struct RecordStoreMessage) + name_len + rd_ser_len; |
1122 | pe = GNUNET_malloc (sizeof (struct PendingMessage) + msg_size); | 1122 | pe = GNUNET_malloc (sizeof (struct PendingMessage) + msg_size); |
1123 | pe->size = msg_size; | 1123 | pe->size = msg_size; |
@@ -1135,7 +1135,7 @@ GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h, | |||
1135 | memcpy (name_tmp, label, name_len); | 1135 | memcpy (name_tmp, label, name_len); |
1136 | rd_ser = &name_tmp[name_len]; | 1136 | rd_ser = &name_tmp[name_len]; |
1137 | GNUNET_break (rd_ser_len == | 1137 | GNUNET_break (rd_ser_len == |
1138 | GNUNET_NAMESTORE_records_serialize (rd_count, rd, | 1138 | GNUNET_GNSRECORD_records_serialize (rd_count, rd, |
1139 | rd_ser_len, | 1139 | rd_ser_len, |
1140 | rd_ser)); | 1140 | rd_ser)); |
1141 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1141 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1162,7 +1162,7 @@ GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h, | |||
1162 | struct GNUNET_NAMESTORE_QueueEntry * | 1162 | struct GNUNET_NAMESTORE_QueueEntry * |
1163 | GNUNET_NAMESTORE_lookup_block (struct GNUNET_NAMESTORE_Handle *h, | 1163 | GNUNET_NAMESTORE_lookup_block (struct GNUNET_NAMESTORE_Handle *h, |
1164 | const struct GNUNET_HashCode *derived_hash, | 1164 | const struct GNUNET_HashCode *derived_hash, |
1165 | GNUNET_NAMESTORE_BlockProcessor proc, void *proc_cls) | 1165 | GNUNET_GNSRECORD_BlockProcessor proc, void *proc_cls) |
1166 | { | 1166 | { |
1167 | struct GNUNET_NAMESTORE_QueueEntry *qe; | 1167 | struct GNUNET_NAMESTORE_QueueEntry *qe; |
1168 | struct PendingMessage *pe; | 1168 | struct PendingMessage *pe; |
diff --git a/src/namestore/namestore_api_monitor.c b/src/namestore/namestore_api_monitor.c index c9834e46c..076add1eb 100644 --- a/src/namestore/namestore_api_monitor.c +++ b/src/namestore/namestore_api_monitor.c | |||
@@ -186,9 +186,9 @@ handle_updates (void *cls, | |||
186 | } | 186 | } |
187 | rd_ser_tmp = (const char *) &name_tmp[name_len]; | 187 | rd_ser_tmp = (const char *) &name_tmp[name_len]; |
188 | { | 188 | { |
189 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; | 189 | struct GNUNET_GNSRECORD_Data rd[rd_count]; |
190 | 190 | ||
191 | if (GNUNET_OK != GNUNET_NAMESTORE_records_deserialize (rd_len, rd_ser_tmp, rd_count, rd)) | 191 | if (GNUNET_OK != GNUNET_GNSRECORD_records_deserialize (rd_len, rd_ser_tmp, rd_count, rd)) |
192 | { | 192 | { |
193 | GNUNET_break (0); | 193 | GNUNET_break (0); |
194 | reconnect (zm); | 194 | reconnect (zm); |
diff --git a/src/namestore/plugin_namestore_postgres.c b/src/namestore/plugin_namestore_postgres.c index 0a8f0fbe8..e5cb75eb4 100644 --- a/src/namestore/plugin_namestore_postgres.c +++ b/src/namestore/plugin_namestore_postgres.c | |||
@@ -333,7 +333,7 @@ delete_old_block (struct Plugin *plugin, | |||
333 | */ | 333 | */ |
334 | static int | 334 | static int |
335 | namestore_postgres_cache_block (void *cls, | 335 | namestore_postgres_cache_block (void *cls, |
336 | const struct GNUNET_NAMESTORE_Block *block) | 336 | const struct GNUNET_GNSRECORD_Block *block) |
337 | { | 337 | { |
338 | struct Plugin *plugin = cls; | 338 | struct Plugin *plugin = cls; |
339 | struct GNUNET_HashCode query; | 339 | struct GNUNET_HashCode query; |
@@ -392,7 +392,7 @@ namestore_postgres_cache_block (void *cls, | |||
392 | static int | 392 | static int |
393 | namestore_postgres_lookup_block (void *cls, | 393 | namestore_postgres_lookup_block (void *cls, |
394 | const struct GNUNET_HashCode *query, | 394 | const struct GNUNET_HashCode *query, |
395 | GNUNET_NAMESTORE_BlockCallback iter, void *iter_cls) | 395 | GNUNET_GNSRECORD_BlockCallback iter, void *iter_cls) |
396 | { | 396 | { |
397 | struct Plugin *plugin = cls; | 397 | struct Plugin *plugin = cls; |
398 | const char *paramValues[] = { | 398 | const char *paramValues[] = { |
@@ -405,7 +405,7 @@ namestore_postgres_lookup_block (void *cls, | |||
405 | PGresult *res; | 405 | PGresult *res; |
406 | unsigned int cnt; | 406 | unsigned int cnt; |
407 | size_t bsize; | 407 | size_t bsize; |
408 | const struct GNUNET_NAMESTORE_Block *block; | 408 | const struct GNUNET_GNSRECORD_Block *block; |
409 | 409 | ||
410 | res = PQexecPrepared (plugin->dbh, | 410 | res = PQexecPrepared (plugin->dbh, |
411 | "lookup_block", 1, | 411 | "lookup_block", 1, |
@@ -431,7 +431,7 @@ namestore_postgres_lookup_block (void *cls, | |||
431 | GNUNET_assert (1 == cnt); | 431 | GNUNET_assert (1 == cnt); |
432 | GNUNET_assert (1 != PQnfields (res)); | 432 | GNUNET_assert (1 != PQnfields (res)); |
433 | bsize = PQgetlength (res, 0, 0); | 433 | bsize = PQgetlength (res, 0, 0); |
434 | block = (const struct GNUNET_NAMESTORE_Block *) PQgetvalue (res, 0, 0); | 434 | block = (const struct GNUNET_GNSRECORD_Block *) PQgetvalue (res, 0, 0); |
435 | if ( (bsize < sizeof (*block)) || | 435 | if ( (bsize < sizeof (*block)) || |
436 | (bsize != ntohl (block->purpose.size) + | 436 | (bsize != ntohl (block->purpose.size) + |
437 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) + | 437 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) + |
@@ -465,7 +465,7 @@ namestore_postgres_store_records (void *cls, | |||
465 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 465 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
466 | const char *label, | 466 | const char *label, |
467 | unsigned int rd_count, | 467 | unsigned int rd_count, |
468 | const struct GNUNET_NAMESTORE_RecordData *rd) | 468 | const struct GNUNET_GNSRECORD_Data *rd) |
469 | { | 469 | { |
470 | struct Plugin *plugin = cls; | 470 | struct Plugin *plugin = cls; |
471 | struct GNUNET_CRYPTO_EcdsaPublicKey pkey; | 471 | struct GNUNET_CRYPTO_EcdsaPublicKey pkey; |
@@ -485,7 +485,7 @@ namestore_postgres_store_records (void *cls, | |||
485 | break; | 485 | break; |
486 | } | 486 | } |
487 | rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); | 487 | rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); |
488 | data_size = GNUNET_NAMESTORE_records_get_size (rd_count, rd); | 488 | data_size = GNUNET_GNSRECORD_records_get_size (rd_count, rd); |
489 | if (data_size > 64 * 65536) | 489 | if (data_size > 64 * 65536) |
490 | { | 490 | { |
491 | GNUNET_break (0); | 491 | GNUNET_break (0); |
@@ -512,7 +512,7 @@ namestore_postgres_store_records (void *cls, | |||
512 | const int paramFormats[] = { 1, 1, 1, 1, 1, 1 }; | 512 | const int paramFormats[] = { 1, 1, 1, 1, 1, 1 }; |
513 | PGresult *res; | 513 | PGresult *res; |
514 | 514 | ||
515 | if (data_size != GNUNET_NAMESTORE_records_serialize (rd_count, rd, | 515 | if (data_size != GNUNET_GNSRECORD_records_serialize (rd_count, rd, |
516 | data_size, data)) | 516 | data_size, data)) |
517 | { | 517 | { |
518 | GNUNET_break (0); | 518 | GNUNET_break (0); |
@@ -610,13 +610,13 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
610 | return GNUNET_SYSERR; | 610 | return GNUNET_SYSERR; |
611 | } | 611 | } |
612 | { | 612 | { |
613 | struct GNUNET_NAMESTORE_RecordData rd[record_count]; | 613 | struct GNUNET_GNSRECORD_Data rd[record_count]; |
614 | char buf[label_len + 1]; | 614 | char buf[label_len + 1]; |
615 | 615 | ||
616 | memcpy (buf, label, label_len); | 616 | memcpy (buf, label, label_len); |
617 | buf[label_len] = '\0'; | 617 | buf[label_len] = '\0'; |
618 | if (GNUNET_OK != | 618 | if (GNUNET_OK != |
619 | GNUNET_NAMESTORE_records_deserialize (data_size, data, | 619 | GNUNET_GNSRECORD_records_deserialize (data_size, data, |
620 | record_count, rd)) | 620 | record_count, rd)) |
621 | { | 621 | { |
622 | GNUNET_break (0); | 622 | GNUNET_break (0); |
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c index 06c2a7639..ce7be2a20 100644 --- a/src/namestore/plugin_namestore_sqlite.c +++ b/src/namestore/plugin_namestore_sqlite.c | |||
@@ -457,7 +457,7 @@ namestore_sqlite_expire_blocks (struct Plugin *plugin) | |||
457 | */ | 457 | */ |
458 | static int | 458 | static int |
459 | namestore_sqlite_cache_block (void *cls, | 459 | namestore_sqlite_cache_block (void *cls, |
460 | const struct GNUNET_NAMESTORE_Block *block) | 460 | const struct GNUNET_GNSRECORD_Block *block) |
461 | { | 461 | { |
462 | struct Plugin *plugin = cls; | 462 | struct Plugin *plugin = cls; |
463 | struct GNUNET_HashCode query; | 463 | struct GNUNET_HashCode query; |
@@ -580,13 +580,13 @@ namestore_sqlite_cache_block (void *cls, | |||
580 | static int | 580 | static int |
581 | namestore_sqlite_lookup_block (void *cls, | 581 | namestore_sqlite_lookup_block (void *cls, |
582 | const struct GNUNET_HashCode *query, | 582 | const struct GNUNET_HashCode *query, |
583 | GNUNET_NAMESTORE_BlockCallback iter, void *iter_cls) | 583 | GNUNET_GNSRECORD_BlockCallback iter, void *iter_cls) |
584 | { | 584 | { |
585 | struct Plugin *plugin = cls; | 585 | struct Plugin *plugin = cls; |
586 | int ret; | 586 | int ret; |
587 | int sret; | 587 | int sret; |
588 | size_t block_size; | 588 | size_t block_size; |
589 | const struct GNUNET_NAMESTORE_Block *block; | 589 | const struct GNUNET_GNSRECORD_Block *block; |
590 | 590 | ||
591 | if (SQLITE_OK != sqlite3_bind_blob (plugin->lookup_block, 1, | 591 | if (SQLITE_OK != sqlite3_bind_blob (plugin->lookup_block, 1, |
592 | query, sizeof (struct GNUNET_HashCode), | 592 | query, sizeof (struct GNUNET_HashCode), |
@@ -605,7 +605,7 @@ namestore_sqlite_lookup_block (void *cls, | |||
605 | { | 605 | { |
606 | block = sqlite3_column_blob (plugin->lookup_block, 0); | 606 | block = sqlite3_column_blob (plugin->lookup_block, 0); |
607 | block_size = sqlite3_column_bytes (plugin->lookup_block, 0); | 607 | block_size = sqlite3_column_bytes (plugin->lookup_block, 0); |
608 | if ( (block_size < sizeof (struct GNUNET_NAMESTORE_Block)) || | 608 | if ( (block_size < sizeof (struct GNUNET_GNSRECORD_Block)) || |
609 | (ntohl (block->purpose.size) + | 609 | (ntohl (block->purpose.size) + |
610 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) + | 610 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) + |
611 | sizeof (struct GNUNET_CRYPTO_EcdsaSignature) != block_size) ) | 611 | sizeof (struct GNUNET_CRYPTO_EcdsaSignature) != block_size) ) |
@@ -660,7 +660,7 @@ namestore_sqlite_store_records (void *cls, | |||
660 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 660 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
661 | const char *label, | 661 | const char *label, |
662 | unsigned int rd_count, | 662 | unsigned int rd_count, |
663 | const struct GNUNET_NAMESTORE_RecordData *rd) | 663 | const struct GNUNET_GNSRECORD_Data *rd) |
664 | { | 664 | { |
665 | struct Plugin *plugin = cls; | 665 | struct Plugin *plugin = cls; |
666 | int n; | 666 | int n; |
@@ -680,7 +680,7 @@ namestore_sqlite_store_records (void *cls, | |||
680 | break; | 680 | break; |
681 | } | 681 | } |
682 | rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); | 682 | rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); |
683 | data_size = GNUNET_NAMESTORE_records_get_size (rd_count, rd); | 683 | data_size = GNUNET_GNSRECORD_records_get_size (rd_count, rd); |
684 | if (data_size > 64 * 65536) | 684 | if (data_size > 64 * 65536) |
685 | { | 685 | { |
686 | GNUNET_break (0); | 686 | GNUNET_break (0); |
@@ -689,7 +689,7 @@ namestore_sqlite_store_records (void *cls, | |||
689 | { | 689 | { |
690 | char data[data_size]; | 690 | char data[data_size]; |
691 | 691 | ||
692 | if (data_size != GNUNET_NAMESTORE_records_serialize (rd_count, rd, | 692 | if (data_size != GNUNET_GNSRECORD_records_serialize (rd_count, rd, |
693 | data_size, data)) | 693 | data_size, data)) |
694 | { | 694 | { |
695 | GNUNET_break (0); | 695 | GNUNET_break (0); |
@@ -817,10 +817,10 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
817 | } | 817 | } |
818 | else | 818 | else |
819 | { | 819 | { |
820 | struct GNUNET_NAMESTORE_RecordData rd[record_count]; | 820 | struct GNUNET_GNSRECORD_Data rd[record_count]; |
821 | 821 | ||
822 | if (GNUNET_OK != | 822 | if (GNUNET_OK != |
823 | GNUNET_NAMESTORE_records_deserialize (data_size, data, | 823 | GNUNET_GNSRECORD_records_deserialize (data_size, data, |
824 | record_count, rd)) | 824 | record_count, rd)) |
825 | { | 825 | { |
826 | GNUNET_break (0); | 826 | GNUNET_break (0); |
@@ -935,7 +935,7 @@ namestore_sqlite_zone_to_name (void *cls, | |||
935 | } | 935 | } |
936 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 936 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
937 | "Performing reverse lookup for `%s'\n", | 937 | "Performing reverse lookup for `%s'\n", |
938 | GNUNET_NAMESTORE_z2s (value_zone)); | 938 | GNUNET_GNSRECORD_z2s (value_zone)); |
939 | 939 | ||
940 | return get_record_and_call_iterator (plugin, stmt, zone, iter, iter_cls); | 940 | return get_record_and_call_iterator (plugin, stmt, zone, iter, iter_cls); |
941 | } | 941 | } |
diff --git a/src/namestore/test_namestore_api_cache_block.c b/src/namestore/test_namestore_api_cache_block.c index e13077f81..de0ae75ee 100644 --- a/src/namestore/test_namestore_api_cache_block.c +++ b/src/namestore/test_namestore_api_cache_block.c | |||
@@ -94,7 +94,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
94 | static void | 94 | static void |
95 | rd_decrypt_cb (void *cls, | 95 | rd_decrypt_cb (void *cls, |
96 | unsigned int rd_count, | 96 | unsigned int rd_count, |
97 | const struct GNUNET_NAMESTORE_RecordData *rd) | 97 | const struct GNUNET_GNSRECORD_Data *rd) |
98 | { | 98 | { |
99 | char rd_cmp_data[TEST_RECORD_DATALEN]; | 99 | char rd_cmp_data[TEST_RECORD_DATALEN]; |
100 | 100 | ||
@@ -115,7 +115,7 @@ rd_decrypt_cb (void *cls, | |||
115 | 115 | ||
116 | static void | 116 | static void |
117 | name_lookup_proc (void *cls, | 117 | name_lookup_proc (void *cls, |
118 | const struct GNUNET_NAMESTORE_Block *block) | 118 | const struct GNUNET_GNSRECORD_Block *block) |
119 | { | 119 | { |
120 | const char *name = cls; | 120 | const char *name = cls; |
121 | nsqe = NULL; | 121 | nsqe = NULL; |
@@ -140,7 +140,7 @@ name_lookup_proc (void *cls, | |||
140 | 140 | ||
141 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 141 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
142 | "Namestore returned block, decrypting \n"); | 142 | "Namestore returned block, decrypting \n"); |
143 | GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_block_decrypt(block, | 143 | GNUNET_assert (GNUNET_OK == GNUNET_GNSRECORD_block_decrypt(block, |
144 | &pubkey, name, &rd_decrypt_cb, (void *) name)); | 144 | &pubkey, name, &rd_decrypt_cb, (void *) name)); |
145 | } | 145 | } |
146 | 146 | ||
@@ -158,7 +158,7 @@ cache_cont (void *cls, int32_t success, const char *emsg) | |||
158 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); | 158 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); |
159 | 159 | ||
160 | /* Create derived hash */ | 160 | /* Create derived hash */ |
161 | GNUNET_NAMESTORE_query_from_public_key (&pubkey, name, &derived_hash); | 161 | GNUNET_GNSRECORD_query_from_public_key (&pubkey, name, &derived_hash); |
162 | 162 | ||
163 | nsqe = GNUNET_NAMESTORE_lookup_block (nsh, &derived_hash, | 163 | nsqe = GNUNET_NAMESTORE_lookup_block (nsh, &derived_hash, |
164 | &name_lookup_proc, (void *) name); | 164 | &name_lookup_proc, (void *) name); |
@@ -170,8 +170,8 @@ run (void *cls, | |||
170 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 170 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
171 | struct GNUNET_TESTING_Peer *peer) | 171 | struct GNUNET_TESTING_Peer *peer) |
172 | { | 172 | { |
173 | struct GNUNET_NAMESTORE_RecordData rd; | 173 | struct GNUNET_GNSRECORD_Data rd; |
174 | struct GNUNET_NAMESTORE_Block *block; | 174 | struct GNUNET_GNSRECORD_Block *block; |
175 | char *hostkey_file; | 175 | char *hostkey_file; |
176 | const char * name = "dummy.dummy.gnunet"; | 176 | const char * name = "dummy.dummy.gnunet"; |
177 | 177 | ||
@@ -193,7 +193,7 @@ run (void *cls, | |||
193 | rd.data_size = TEST_RECORD_DATALEN; | 193 | rd.data_size = TEST_RECORD_DATALEN; |
194 | rd.data = GNUNET_malloc (TEST_RECORD_DATALEN); | 194 | rd.data = GNUNET_malloc (TEST_RECORD_DATALEN); |
195 | memset ((char *) rd.data, 'a', TEST_RECORD_DATALEN); | 195 | memset ((char *) rd.data, 'a', TEST_RECORD_DATALEN); |
196 | block = GNUNET_NAMESTORE_block_create (privkey, | 196 | block = GNUNET_GNSRECORD_block_create (privkey, |
197 | GNUNET_TIME_UNIT_FOREVER_ABS, name, &rd, 1 ); | 197 | GNUNET_TIME_UNIT_FOREVER_ABS, name, &rd, 1 ); |
198 | if (NULL == block) | 198 | if (NULL == block) |
199 | { | 199 | { |
diff --git a/src/namestore/test_namestore_api_lookup_public.c b/src/namestore/test_namestore_api_lookup_public.c index 6c6ee55ec..97de58a6c 100644 --- a/src/namestore/test_namestore_api_lookup_public.c +++ b/src/namestore/test_namestore_api_lookup_public.c | |||
@@ -94,7 +94,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
94 | static void | 94 | static void |
95 | rd_decrypt_cb (void *cls, | 95 | rd_decrypt_cb (void *cls, |
96 | unsigned int rd_count, | 96 | unsigned int rd_count, |
97 | const struct GNUNET_NAMESTORE_RecordData *rd) | 97 | const struct GNUNET_GNSRECORD_Data *rd) |
98 | { | 98 | { |
99 | char rd_cmp_data[TEST_RECORD_DATALEN]; | 99 | char rd_cmp_data[TEST_RECORD_DATALEN]; |
100 | 100 | ||
@@ -115,7 +115,7 @@ rd_decrypt_cb (void *cls, | |||
115 | 115 | ||
116 | static void | 116 | static void |
117 | name_lookup_proc (void *cls, | 117 | name_lookup_proc (void *cls, |
118 | const struct GNUNET_NAMESTORE_Block *block) | 118 | const struct GNUNET_GNSRECORD_Block *block) |
119 | { | 119 | { |
120 | const char *name = cls; | 120 | const char *name = cls; |
121 | nsqe = NULL; | 121 | nsqe = NULL; |
@@ -140,7 +140,7 @@ name_lookup_proc (void *cls, | |||
140 | 140 | ||
141 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 141 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
142 | "Namestore returned block, decrypting \n"); | 142 | "Namestore returned block, decrypting \n"); |
143 | GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_block_decrypt(block, | 143 | GNUNET_assert (GNUNET_OK == GNUNET_GNSRECORD_block_decrypt(block, |
144 | &pubkey, name, &rd_decrypt_cb, (void *) name)); | 144 | &pubkey, name, &rd_decrypt_cb, (void *) name)); |
145 | } | 145 | } |
146 | 146 | ||
@@ -160,7 +160,7 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
160 | 160 | ||
161 | /* Create derived hash */ | 161 | /* Create derived hash */ |
162 | GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey); | 162 | GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey); |
163 | GNUNET_NAMESTORE_query_from_public_key (&pubkey, name, &derived_hash); | 163 | GNUNET_GNSRECORD_query_from_public_key (&pubkey, name, &derived_hash); |
164 | 164 | ||
165 | nsqe = GNUNET_NAMESTORE_lookup_block (nsh, &derived_hash, | 165 | nsqe = GNUNET_NAMESTORE_lookup_block (nsh, &derived_hash, |
166 | &name_lookup_proc, (void *) name); | 166 | &name_lookup_proc, (void *) name); |
@@ -172,7 +172,7 @@ run (void *cls, | |||
172 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 172 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
173 | struct GNUNET_TESTING_Peer *peer) | 173 | struct GNUNET_TESTING_Peer *peer) |
174 | { | 174 | { |
175 | struct GNUNET_NAMESTORE_RecordData rd; | 175 | struct GNUNET_GNSRECORD_Data rd; |
176 | char *hostkey_file; | 176 | char *hostkey_file; |
177 | const char * name = "dummy.dummy.gnunet"; | 177 | const char * name = "dummy.dummy.gnunet"; |
178 | 178 | ||
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c index 2d5888a5e..4ccb425a2 100644 --- a/src/namestore/test_namestore_api_monitoring.c +++ b/src/namestore/test_namestore_api_monitoring.c | |||
@@ -44,15 +44,15 @@ static int res; | |||
44 | 44 | ||
45 | static char * s_name_1; | 45 | static char * s_name_1; |
46 | 46 | ||
47 | static struct GNUNET_NAMESTORE_RecordData *s_rd_1; | 47 | static struct GNUNET_GNSRECORD_Data *s_rd_1; |
48 | 48 | ||
49 | static char * s_name_2; | 49 | static char * s_name_2; |
50 | 50 | ||
51 | static struct GNUNET_NAMESTORE_RecordData *s_rd_2; | 51 | static struct GNUNET_GNSRECORD_Data *s_rd_2; |
52 | 52 | ||
53 | static char * s_name_3; | 53 | static char * s_name_3; |
54 | 54 | ||
55 | static struct GNUNET_NAMESTORE_RecordData *s_rd_3; | 55 | static struct GNUNET_GNSRECORD_Data *s_rd_3; |
56 | 56 | ||
57 | struct GNUNET_NAMESTORE_QueueEntry * ns_ops[3]; | 57 | struct GNUNET_NAMESTORE_QueueEntry * ns_ops[3]; |
58 | 58 | ||
@@ -148,7 +148,7 @@ zone_proc (void *cls, | |||
148 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 148 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
149 | const char *name, | 149 | const char *name, |
150 | unsigned int rd_count, | 150 | unsigned int rd_count, |
151 | const struct GNUNET_NAMESTORE_RecordData *rd) | 151 | const struct GNUNET_GNSRECORD_Data *rd) |
152 | { | 152 | { |
153 | static int returned_records; | 153 | static int returned_records; |
154 | static int fail = GNUNET_NO; | 154 | static int fail = GNUNET_NO; |
@@ -168,7 +168,7 @@ zone_proc (void *cls, | |||
168 | 168 | ||
169 | if (0 == strcmp (name, s_name_1)) | 169 | if (0 == strcmp (name, s_name_1)) |
170 | { | 170 | { |
171 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_1)) | 171 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_1)) |
172 | { | 172 | { |
173 | GNUNET_break (0); | 173 | GNUNET_break (0); |
174 | fail = GNUNET_YES; | 174 | fail = GNUNET_YES; |
@@ -176,7 +176,7 @@ zone_proc (void *cls, | |||
176 | } | 176 | } |
177 | else if (0 == strcmp (name, s_name_2)) | 177 | else if (0 == strcmp (name, s_name_2)) |
178 | { | 178 | { |
179 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_2)) | 179 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_2)) |
180 | { | 180 | { |
181 | GNUNET_break (0); | 181 | GNUNET_break (0); |
182 | fail = GNUNET_YES; | 182 | fail = GNUNET_YES; |
@@ -234,13 +234,13 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
234 | } | 234 | } |
235 | 235 | ||
236 | 236 | ||
237 | static struct GNUNET_NAMESTORE_RecordData * | 237 | static struct GNUNET_GNSRECORD_Data * |
238 | create_record (unsigned int count) | 238 | create_record (unsigned int count) |
239 | { | 239 | { |
240 | unsigned int c; | 240 | unsigned int c; |
241 | struct GNUNET_NAMESTORE_RecordData * rd; | 241 | struct GNUNET_GNSRECORD_Data * rd; |
242 | 242 | ||
243 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData)); | 243 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_GNSRECORD_Data)); |
244 | for (c = 0; c < count; c++) | 244 | for (c = 0; c < count; c++) |
245 | { | 245 | { |
246 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; | 246 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; |
diff --git a/src/namestore/test_namestore_api_monitoring_existing.c b/src/namestore/test_namestore_api_monitoring_existing.c index 3b2ca6092..b8ac7a729 100644 --- a/src/namestore/test_namestore_api_monitoring_existing.c +++ b/src/namestore/test_namestore_api_monitoring_existing.c | |||
@@ -45,15 +45,15 @@ static int res; | |||
45 | 45 | ||
46 | static char * s_name_1; | 46 | static char * s_name_1; |
47 | 47 | ||
48 | static struct GNUNET_NAMESTORE_RecordData *s_rd_1; | 48 | static struct GNUNET_GNSRECORD_Data *s_rd_1; |
49 | 49 | ||
50 | static char * s_name_2; | 50 | static char * s_name_2; |
51 | 51 | ||
52 | static struct GNUNET_NAMESTORE_RecordData *s_rd_2; | 52 | static struct GNUNET_GNSRECORD_Data *s_rd_2; |
53 | 53 | ||
54 | static char * s_name_3; | 54 | static char * s_name_3; |
55 | 55 | ||
56 | static struct GNUNET_NAMESTORE_RecordData *s_rd_3; | 56 | static struct GNUNET_GNSRECORD_Data *s_rd_3; |
57 | 57 | ||
58 | struct GNUNET_NAMESTORE_QueueEntry * ns_ops[3]; | 58 | struct GNUNET_NAMESTORE_QueueEntry * ns_ops[3]; |
59 | 59 | ||
@@ -149,7 +149,7 @@ zone_proc (void *cls, | |||
149 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 149 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
150 | const char *name, | 150 | const char *name, |
151 | unsigned int rd_count, | 151 | unsigned int rd_count, |
152 | const struct GNUNET_NAMESTORE_RecordData *rd) | 152 | const struct GNUNET_GNSRECORD_Data *rd) |
153 | { | 153 | { |
154 | static int returned_records; | 154 | static int returned_records; |
155 | static int fail = GNUNET_NO; | 155 | static int fail = GNUNET_NO; |
@@ -169,7 +169,7 @@ zone_proc (void *cls, | |||
169 | 169 | ||
170 | if (0 == strcmp (name, s_name_1)) | 170 | if (0 == strcmp (name, s_name_1)) |
171 | { | 171 | { |
172 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_1)) | 172 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_1)) |
173 | { | 173 | { |
174 | GNUNET_break (0); | 174 | GNUNET_break (0); |
175 | fail = GNUNET_YES; | 175 | fail = GNUNET_YES; |
@@ -177,7 +177,7 @@ zone_proc (void *cls, | |||
177 | } | 177 | } |
178 | else if (0 == strcmp (name, s_name_2)) | 178 | else if (0 == strcmp (name, s_name_2)) |
179 | { | 179 | { |
180 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_2)) | 180 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_2)) |
181 | { | 181 | { |
182 | GNUNET_break (0); | 182 | GNUNET_break (0); |
183 | fail = GNUNET_YES; | 183 | fail = GNUNET_YES; |
@@ -252,13 +252,13 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
252 | } | 252 | } |
253 | 253 | ||
254 | 254 | ||
255 | static struct GNUNET_NAMESTORE_RecordData * | 255 | static struct GNUNET_GNSRECORD_Data * |
256 | create_record (unsigned int count) | 256 | create_record (unsigned int count) |
257 | { | 257 | { |
258 | unsigned int c; | 258 | unsigned int c; |
259 | struct GNUNET_NAMESTORE_RecordData * rd; | 259 | struct GNUNET_GNSRECORD_Data * rd; |
260 | 260 | ||
261 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData)); | 261 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_GNSRECORD_Data)); |
262 | for (c = 0; c < count; c++) | 262 | for (c = 0; c < count; c++) |
263 | { | 263 | { |
264 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; | 264 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; |
diff --git a/src/namestore/test_namestore_api_put.c b/src/namestore/test_namestore_api_put.c index 983ea6804..c0e04e98e 100644 --- a/src/namestore/test_namestore_api_put.c +++ b/src/namestore/test_namestore_api_put.c | |||
@@ -45,7 +45,7 @@ static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey; | |||
45 | 45 | ||
46 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 46 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; |
47 | 47 | ||
48 | static struct GNUNET_NAMESTORE_RecordData *s_rd; | 48 | static struct GNUNET_GNSRECORD_Data *s_rd; |
49 | 49 | ||
50 | static int res; | 50 | static int res; |
51 | 51 | ||
@@ -111,13 +111,13 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
111 | } | 111 | } |
112 | 112 | ||
113 | 113 | ||
114 | static struct GNUNET_NAMESTORE_RecordData * | 114 | static struct GNUNET_GNSRECORD_Data * |
115 | create_record (unsigned int count) | 115 | create_record (unsigned int count) |
116 | { | 116 | { |
117 | unsigned int c; | 117 | unsigned int c; |
118 | struct GNUNET_NAMESTORE_RecordData * rd; | 118 | struct GNUNET_GNSRECORD_Data * rd; |
119 | 119 | ||
120 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData)); | 120 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_GNSRECORD_Data)); |
121 | for (c = 0; c < count; c++) | 121 | for (c = 0; c < count; c++) |
122 | { | 122 | { |
123 | rd[c].expiration_time = GNUNET_TIME_absolute_get().abs_value_us; | 123 | rd[c].expiration_time = GNUNET_TIME_absolute_get().abs_value_us; |
@@ -154,7 +154,7 @@ run (void *cls, | |||
154 | nsh = GNUNET_NAMESTORE_connect (cfg); | 154 | nsh = GNUNET_NAMESTORE_connect (cfg); |
155 | GNUNET_break (NULL != nsh); | 155 | GNUNET_break (NULL != nsh); |
156 | /* create record */ | 156 | /* create record */ |
157 | s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet"); | 157 | s_name = GNUNET_GNSRECORD_string_to_lowercase ("DUMMY.dummy.gnunet"); |
158 | s_rd = create_record (RECORDS); | 158 | s_rd = create_record (RECORDS); |
159 | et.abs_value_us = s_rd[0].expiration_time; | 159 | et.abs_value_us = s_rd[0].expiration_time; |
160 | signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS); | 160 | signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS); |
diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c index f43bafecc..8605a3a00 100644 --- a/src/namestore/test_namestore_api_remove.c +++ b/src/namestore/test_namestore_api_remove.c | |||
@@ -121,7 +121,7 @@ remove_cont (void *cls, | |||
121 | static void | 121 | static void |
122 | rd_decrypt_cb (void *cls, | 122 | rd_decrypt_cb (void *cls, |
123 | unsigned int rd_count, | 123 | unsigned int rd_count, |
124 | const struct GNUNET_NAMESTORE_RecordData *rd) | 124 | const struct GNUNET_GNSRECORD_Data *rd) |
125 | { | 125 | { |
126 | const char *name = cls; | 126 | const char *name = cls; |
127 | char rd_cmp_data[TEST_RECORD_DATALEN]; | 127 | char rd_cmp_data[TEST_RECORD_DATALEN]; |
@@ -145,7 +145,7 @@ rd_decrypt_cb (void *cls, | |||
145 | 145 | ||
146 | static void | 146 | static void |
147 | name_lookup_proc (void *cls, | 147 | name_lookup_proc (void *cls, |
148 | const struct GNUNET_NAMESTORE_Block *block) | 148 | const struct GNUNET_GNSRECORD_Block *block) |
149 | { | 149 | { |
150 | const char *name = cls; | 150 | const char *name = cls; |
151 | nsqe = NULL; | 151 | nsqe = NULL; |
@@ -179,7 +179,7 @@ name_lookup_proc (void *cls, | |||
179 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 179 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
180 | "Namestore returned block, decrypting \n"); | 180 | "Namestore returned block, decrypting \n"); |
181 | GNUNET_assert (GNUNET_OK == | 181 | GNUNET_assert (GNUNET_OK == |
182 | GNUNET_NAMESTORE_block_decrypt (block, | 182 | GNUNET_GNSRECORD_block_decrypt (block, |
183 | &pubkey, name, &rd_decrypt_cb, (void *) name)); | 183 | &pubkey, name, &rd_decrypt_cb, (void *) name)); |
184 | } | 184 | } |
185 | 185 | ||
@@ -209,7 +209,7 @@ put_cont (void *cls, int32_t success, | |||
209 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); | 209 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); |
210 | 210 | ||
211 | /* Create derived hash */ | 211 | /* Create derived hash */ |
212 | GNUNET_NAMESTORE_query_from_private_key (privkey, | 212 | GNUNET_GNSRECORD_query_from_private_key (privkey, |
213 | name, | 213 | name, |
214 | &derived_hash); | 214 | &derived_hash); |
215 | 215 | ||
@@ -233,7 +233,7 @@ run (void *cls, | |||
233 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 233 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
234 | struct GNUNET_TESTING_Peer *peer) | 234 | struct GNUNET_TESTING_Peer *peer) |
235 | { | 235 | { |
236 | struct GNUNET_NAMESTORE_RecordData rd; | 236 | struct GNUNET_GNSRECORD_Data rd; |
237 | char *hostkey_file; | 237 | char *hostkey_file; |
238 | const char * name = "dummy.dummy.gnunet"; | 238 | const char * name = "dummy.dummy.gnunet"; |
239 | 239 | ||
diff --git a/src/namestore/test_namestore_api_store.c b/src/namestore/test_namestore_api_store.c index 133bf567f..99d245d00 100644 --- a/src/namestore/test_namestore_api_store.c +++ b/src/namestore/test_namestore_api_store.c | |||
@@ -94,7 +94,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
94 | static void | 94 | static void |
95 | rd_decrypt_cb (void *cls, | 95 | rd_decrypt_cb (void *cls, |
96 | unsigned int rd_count, | 96 | unsigned int rd_count, |
97 | const struct GNUNET_NAMESTORE_RecordData *rd) | 97 | const struct GNUNET_GNSRECORD_Data *rd) |
98 | { | 98 | { |
99 | char rd_cmp_data[TEST_RECORD_DATALEN]; | 99 | char rd_cmp_data[TEST_RECORD_DATALEN]; |
100 | 100 | ||
@@ -115,7 +115,7 @@ rd_decrypt_cb (void *cls, | |||
115 | 115 | ||
116 | static void | 116 | static void |
117 | name_lookup_proc (void *cls, | 117 | name_lookup_proc (void *cls, |
118 | const struct GNUNET_NAMESTORE_Block *block) | 118 | const struct GNUNET_GNSRECORD_Block *block) |
119 | { | 119 | { |
120 | const char *name = cls; | 120 | const char *name = cls; |
121 | nsqe = NULL; | 121 | nsqe = NULL; |
@@ -140,7 +140,7 @@ name_lookup_proc (void *cls, | |||
140 | 140 | ||
141 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 141 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
142 | "Namestore returned block, decrypting \n"); | 142 | "Namestore returned block, decrypting \n"); |
143 | GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_block_decrypt(block, | 143 | GNUNET_assert (GNUNET_OK == GNUNET_GNSRECORD_block_decrypt(block, |
144 | &pubkey, name, &rd_decrypt_cb, (void *) name)); | 144 | &pubkey, name, &rd_decrypt_cb, (void *) name)); |
145 | } | 145 | } |
146 | 146 | ||
@@ -158,7 +158,7 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
158 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); | 158 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); |
159 | 159 | ||
160 | /* Create derived hash */ | 160 | /* Create derived hash */ |
161 | GNUNET_NAMESTORE_query_from_private_key (privkey, name, &derived_hash); | 161 | GNUNET_GNSRECORD_query_from_private_key (privkey, name, &derived_hash); |
162 | 162 | ||
163 | nsqe = GNUNET_NAMESTORE_lookup_block (nsh, &derived_hash, | 163 | nsqe = GNUNET_NAMESTORE_lookup_block (nsh, &derived_hash, |
164 | &name_lookup_proc, (void *) name); | 164 | &name_lookup_proc, (void *) name); |
@@ -170,7 +170,7 @@ run (void *cls, | |||
170 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 170 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
171 | struct GNUNET_TESTING_Peer *peer) | 171 | struct GNUNET_TESTING_Peer *peer) |
172 | { | 172 | { |
173 | struct GNUNET_NAMESTORE_RecordData rd; | 173 | struct GNUNET_GNSRECORD_Data rd; |
174 | char *hostkey_file; | 174 | char *hostkey_file; |
175 | const char * name = "dummy.dummy.gnunet"; | 175 | const char * name = "dummy.dummy.gnunet"; |
176 | 176 | ||
diff --git a/src/namestore/test_namestore_api_store_update.c b/src/namestore/test_namestore_api_store_update.c index 4aa058a91..4a0a36bb8 100644 --- a/src/namestore/test_namestore_api_store_update.c +++ b/src/namestore/test_namestore_api_store_update.c | |||
@@ -112,9 +112,9 @@ put_cont (void *cls, int32_t success, const char *emsg); | |||
112 | static void | 112 | static void |
113 | rd_decrypt_cb (void *cls, | 113 | rd_decrypt_cb (void *cls, |
114 | unsigned int rd_count, | 114 | unsigned int rd_count, |
115 | const struct GNUNET_NAMESTORE_RecordData *rd) | 115 | const struct GNUNET_GNSRECORD_Data *rd) |
116 | { | 116 | { |
117 | struct GNUNET_NAMESTORE_RecordData rd_new; | 117 | struct GNUNET_GNSRECORD_Data rd_new; |
118 | 118 | ||
119 | GNUNET_assert (1 == rd_count); | 119 | GNUNET_assert (1 == rd_count); |
120 | GNUNET_assert (NULL != rd); | 120 | GNUNET_assert (NULL != rd); |
@@ -131,7 +131,7 @@ rd_decrypt_cb (void *cls, | |||
131 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 131 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
132 | "Block was decrypted successfully, updating record \n"); | 132 | "Block was decrypted successfully, updating record \n"); |
133 | 133 | ||
134 | rd_new.flags = GNUNET_NAMESTORE_RF_NONE; | 134 | rd_new.flags = GNUNET_GNSRECORD_RF_NONE; |
135 | rd_new.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; | 135 | rd_new.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; |
136 | rd_new.record_type = TEST_RECORD_TYPE2; | 136 | rd_new.record_type = TEST_RECORD_TYPE2; |
137 | rd_new.data_size = TEST_RECORD_DATALEN2; | 137 | rd_new.data_size = TEST_RECORD_DATALEN2; |
@@ -158,7 +158,7 @@ rd_decrypt_cb (void *cls, | |||
158 | 158 | ||
159 | static void | 159 | static void |
160 | name_lookup_proc (void *cls, | 160 | name_lookup_proc (void *cls, |
161 | const struct GNUNET_NAMESTORE_Block *block) | 161 | const struct GNUNET_GNSRECORD_Block *block) |
162 | { | 162 | { |
163 | const char *name = cls; | 163 | const char *name = cls; |
164 | nsqe = NULL; | 164 | nsqe = NULL; |
@@ -183,7 +183,7 @@ name_lookup_proc (void *cls, | |||
183 | 183 | ||
184 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 184 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
185 | "Namestore returned block, decrypting \n"); | 185 | "Namestore returned block, decrypting \n"); |
186 | GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_block_decrypt(block, | 186 | GNUNET_assert (GNUNET_OK == GNUNET_GNSRECORD_block_decrypt(block, |
187 | &pubkey, name, &rd_decrypt_cb, (void *) name)); | 187 | &pubkey, name, &rd_decrypt_cb, (void *) name)); |
188 | } | 188 | } |
189 | 189 | ||
@@ -202,7 +202,7 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
202 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); | 202 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); |
203 | 203 | ||
204 | /* Create derived hash */ | 204 | /* Create derived hash */ |
205 | GNUNET_NAMESTORE_query_from_private_key (privkey, name, &derived_hash); | 205 | GNUNET_GNSRECORD_query_from_private_key (privkey, name, &derived_hash); |
206 | 206 | ||
207 | nsqe = GNUNET_NAMESTORE_lookup_block (nsh, &derived_hash, | 207 | nsqe = GNUNET_NAMESTORE_lookup_block (nsh, &derived_hash, |
208 | &name_lookup_proc, (void *) name); | 208 | &name_lookup_proc, (void *) name); |
@@ -214,7 +214,7 @@ run (void *cls, | |||
214 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 214 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
215 | struct GNUNET_TESTING_Peer *peer) | 215 | struct GNUNET_TESTING_Peer *peer) |
216 | { | 216 | { |
217 | struct GNUNET_NAMESTORE_RecordData rd; | 217 | struct GNUNET_GNSRECORD_Data rd; |
218 | char *hostkey_file; | 218 | char *hostkey_file; |
219 | 219 | ||
220 | update_performed = GNUNET_NO; | 220 | update_performed = GNUNET_NO; |
@@ -230,7 +230,7 @@ run (void *cls, | |||
230 | GNUNET_assert (privkey != NULL); | 230 | GNUNET_assert (privkey != NULL); |
231 | GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey); | 231 | GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey); |
232 | 232 | ||
233 | rd.flags = GNUNET_NAMESTORE_RF_NONE; | 233 | rd.flags = GNUNET_GNSRECORD_RF_NONE; |
234 | rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; | 234 | rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; |
235 | rd.record_type = TEST_RECORD_TYPE; | 235 | rd.record_type = TEST_RECORD_TYPE; |
236 | rd.data_size = TEST_RECORD_DATALEN; | 236 | rd.data_size = TEST_RECORD_DATALEN; |
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c index d1992309d..92fb43a28 100644 --- a/src/namestore/test_namestore_api_zone_iteration.c +++ b/src/namestore/test_namestore_api_zone_iteration.c | |||
@@ -46,15 +46,15 @@ static int returned_records; | |||
46 | 46 | ||
47 | static char * s_name_1; | 47 | static char * s_name_1; |
48 | 48 | ||
49 | static struct GNUNET_NAMESTORE_RecordData *s_rd_1; | 49 | static struct GNUNET_GNSRECORD_Data *s_rd_1; |
50 | 50 | ||
51 | static char * s_name_2; | 51 | static char * s_name_2; |
52 | 52 | ||
53 | static struct GNUNET_NAMESTORE_RecordData *s_rd_2; | 53 | static struct GNUNET_GNSRECORD_Data *s_rd_2; |
54 | 54 | ||
55 | static char * s_name_3; | 55 | static char * s_name_3; |
56 | 56 | ||
57 | static struct GNUNET_NAMESTORE_RecordData *s_rd_3; | 57 | static struct GNUNET_GNSRECORD_Data *s_rd_3; |
58 | 58 | ||
59 | 59 | ||
60 | /** | 60 | /** |
@@ -159,7 +159,7 @@ zone_proc (void *cls, | |||
159 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 159 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
160 | const char *label, | 160 | const char *label, |
161 | unsigned int rd_count, | 161 | unsigned int rd_count, |
162 | const struct GNUNET_NAMESTORE_RecordData *rd) | 162 | const struct GNUNET_GNSRECORD_Data *rd) |
163 | { | 163 | { |
164 | int failed = GNUNET_NO; | 164 | int failed = GNUNET_NO; |
165 | if ((zone == NULL) && (label == NULL)) | 165 | if ((zone == NULL) && (label == NULL)) |
@@ -187,7 +187,7 @@ zone_proc (void *cls, | |||
187 | { | 187 | { |
188 | if (rd_count == 1) | 188 | if (rd_count == 1) |
189 | { | 189 | { |
190 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_1)) | 190 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_1)) |
191 | { | 191 | { |
192 | failed = GNUNET_YES; | 192 | failed = GNUNET_YES; |
193 | GNUNET_break (0); | 193 | GNUNET_break (0); |
@@ -203,7 +203,7 @@ zone_proc (void *cls, | |||
203 | { | 203 | { |
204 | if (rd_count == 1) | 204 | if (rd_count == 1) |
205 | { | 205 | { |
206 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_2)) | 206 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_2)) |
207 | { | 207 | { |
208 | failed = GNUNET_YES; | 208 | failed = GNUNET_YES; |
209 | GNUNET_break (0); | 209 | GNUNET_break (0); |
@@ -231,7 +231,7 @@ zone_proc (void *cls, | |||
231 | { | 231 | { |
232 | if (rd_count == 1) | 232 | if (rd_count == 1) |
233 | { | 233 | { |
234 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_3)) | 234 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_3)) |
235 | { | 235 | { |
236 | failed = GNUNET_YES; | 236 | failed = GNUNET_YES; |
237 | GNUNET_break (0); | 237 | GNUNET_break (0); |
@@ -319,13 +319,13 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
319 | } | 319 | } |
320 | 320 | ||
321 | 321 | ||
322 | static struct GNUNET_NAMESTORE_RecordData * | 322 | static struct GNUNET_GNSRECORD_Data * |
323 | create_record (unsigned int count) | 323 | create_record (unsigned int count) |
324 | { | 324 | { |
325 | unsigned int c; | 325 | unsigned int c; |
326 | struct GNUNET_NAMESTORE_RecordData * rd; | 326 | struct GNUNET_GNSRECORD_Data * rd; |
327 | 327 | ||
328 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData)); | 328 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_GNSRECORD_Data)); |
329 | for (c = 0; c < count; c++) | 329 | for (c = 0; c < count; c++) |
330 | { | 330 | { |
331 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; | 331 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; |
@@ -348,7 +348,7 @@ empty_zone_proc (void *cls, | |||
348 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 348 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
349 | const char *label, | 349 | const char *label, |
350 | unsigned int rd_count, | 350 | unsigned int rd_count, |
351 | const struct GNUNET_NAMESTORE_RecordData *rd) | 351 | const struct GNUNET_GNSRECORD_Data *rd) |
352 | { | 352 | { |
353 | char *hostkey_file; | 353 | char *hostkey_file; |
354 | 354 | ||
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c index 858b724a5..1554d5673 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |||
@@ -46,15 +46,15 @@ static int returned_records; | |||
46 | 46 | ||
47 | static char * s_name_1; | 47 | static char * s_name_1; |
48 | 48 | ||
49 | static struct GNUNET_NAMESTORE_RecordData *s_rd_1; | 49 | static struct GNUNET_GNSRECORD_Data *s_rd_1; |
50 | 50 | ||
51 | static char * s_name_2; | 51 | static char * s_name_2; |
52 | 52 | ||
53 | static struct GNUNET_NAMESTORE_RecordData *s_rd_2; | 53 | static struct GNUNET_GNSRECORD_Data *s_rd_2; |
54 | 54 | ||
55 | static char * s_name_3; | 55 | static char * s_name_3; |
56 | 56 | ||
57 | static struct GNUNET_NAMESTORE_RecordData *s_rd_3; | 57 | static struct GNUNET_GNSRECORD_Data *s_rd_3; |
58 | 58 | ||
59 | 59 | ||
60 | /** | 60 | /** |
@@ -159,7 +159,7 @@ zone_proc (void *cls, | |||
159 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 159 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
160 | const char *label, | 160 | const char *label, |
161 | unsigned int rd_count, | 161 | unsigned int rd_count, |
162 | const struct GNUNET_NAMESTORE_RecordData *rd) | 162 | const struct GNUNET_GNSRECORD_Data *rd) |
163 | { | 163 | { |
164 | int failed = GNUNET_NO; | 164 | int failed = GNUNET_NO; |
165 | if ((zone == NULL) && (label == NULL)) | 165 | if ((zone == NULL) && (label == NULL)) |
@@ -187,7 +187,7 @@ zone_proc (void *cls, | |||
187 | { | 187 | { |
188 | if (rd_count == 1) | 188 | if (rd_count == 1) |
189 | { | 189 | { |
190 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_1)) | 190 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_1)) |
191 | { | 191 | { |
192 | failed = GNUNET_YES; | 192 | failed = GNUNET_YES; |
193 | GNUNET_break (0); | 193 | GNUNET_break (0); |
@@ -203,7 +203,7 @@ zone_proc (void *cls, | |||
203 | { | 203 | { |
204 | if (rd_count == 1) | 204 | if (rd_count == 1) |
205 | { | 205 | { |
206 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_2)) | 206 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_2)) |
207 | { | 207 | { |
208 | failed = GNUNET_YES; | 208 | failed = GNUNET_YES; |
209 | GNUNET_break (0); | 209 | GNUNET_break (0); |
@@ -297,13 +297,13 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
297 | } | 297 | } |
298 | 298 | ||
299 | 299 | ||
300 | static struct GNUNET_NAMESTORE_RecordData * | 300 | static struct GNUNET_GNSRECORD_Data * |
301 | create_record (unsigned int count) | 301 | create_record (unsigned int count) |
302 | { | 302 | { |
303 | unsigned int c; | 303 | unsigned int c; |
304 | struct GNUNET_NAMESTORE_RecordData * rd; | 304 | struct GNUNET_GNSRECORD_Data * rd; |
305 | 305 | ||
306 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData)); | 306 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_GNSRECORD_Data)); |
307 | for (c = 0; c < count; c++) | 307 | for (c = 0; c < count; c++) |
308 | { | 308 | { |
309 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; | 309 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; |
@@ -326,7 +326,7 @@ empty_zone_proc (void *cls, | |||
326 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 326 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
327 | const char *label, | 327 | const char *label, |
328 | unsigned int rd_count, | 328 | unsigned int rd_count, |
329 | const struct GNUNET_NAMESTORE_RecordData *rd) | 329 | const struct GNUNET_GNSRECORD_Data *rd) |
330 | { | 330 | { |
331 | char *hostkey_file; | 331 | char *hostkey_file; |
332 | 332 | ||
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c index 7b6824727..f7fd4203d 100644 --- a/src/namestore/test_namestore_api_zone_iteration_stop.c +++ b/src/namestore/test_namestore_api_zone_iteration_stop.c | |||
@@ -46,15 +46,15 @@ static int returned_records; | |||
46 | 46 | ||
47 | static char * s_name_1; | 47 | static char * s_name_1; |
48 | 48 | ||
49 | static struct GNUNET_NAMESTORE_RecordData *s_rd_1; | 49 | static struct GNUNET_GNSRECORD_Data *s_rd_1; |
50 | 50 | ||
51 | static char * s_name_2; | 51 | static char * s_name_2; |
52 | 52 | ||
53 | static struct GNUNET_NAMESTORE_RecordData *s_rd_2; | 53 | static struct GNUNET_GNSRECORD_Data *s_rd_2; |
54 | 54 | ||
55 | static char * s_name_3; | 55 | static char * s_name_3; |
56 | 56 | ||
57 | static struct GNUNET_NAMESTORE_RecordData *s_rd_3; | 57 | static struct GNUNET_GNSRECORD_Data *s_rd_3; |
58 | 58 | ||
59 | 59 | ||
60 | /** | 60 | /** |
@@ -159,7 +159,7 @@ zone_proc (void *cls, | |||
159 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 159 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
160 | const char *label, | 160 | const char *label, |
161 | unsigned int rd_count, | 161 | unsigned int rd_count, |
162 | const struct GNUNET_NAMESTORE_RecordData *rd) | 162 | const struct GNUNET_GNSRECORD_Data *rd) |
163 | { | 163 | { |
164 | int failed = GNUNET_NO; | 164 | int failed = GNUNET_NO; |
165 | if ((zone == NULL) && (label == NULL)) | 165 | if ((zone == NULL) && (label == NULL)) |
@@ -184,7 +184,7 @@ zone_proc (void *cls, | |||
184 | { | 184 | { |
185 | if (rd_count == 1) | 185 | if (rd_count == 1) |
186 | { | 186 | { |
187 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_1)) | 187 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_1)) |
188 | { | 188 | { |
189 | failed = GNUNET_YES; | 189 | failed = GNUNET_YES; |
190 | GNUNET_break (0); | 190 | GNUNET_break (0); |
@@ -200,7 +200,7 @@ zone_proc (void *cls, | |||
200 | { | 200 | { |
201 | if (rd_count == 1) | 201 | if (rd_count == 1) |
202 | { | 202 | { |
203 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_2)) | 203 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_2)) |
204 | { | 204 | { |
205 | failed = GNUNET_YES; | 205 | failed = GNUNET_YES; |
206 | GNUNET_break (0); | 206 | GNUNET_break (0); |
@@ -228,7 +228,7 @@ zone_proc (void *cls, | |||
228 | { | 228 | { |
229 | if (rd_count == 1) | 229 | if (rd_count == 1) |
230 | { | 230 | { |
231 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_3)) | 231 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_3)) |
232 | { | 232 | { |
233 | failed = GNUNET_YES; | 233 | failed = GNUNET_YES; |
234 | GNUNET_break (0); | 234 | GNUNET_break (0); |
@@ -331,13 +331,13 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
331 | } | 331 | } |
332 | 332 | ||
333 | 333 | ||
334 | static struct GNUNET_NAMESTORE_RecordData * | 334 | static struct GNUNET_GNSRECORD_Data * |
335 | create_record (unsigned int count) | 335 | create_record (unsigned int count) |
336 | { | 336 | { |
337 | unsigned int c; | 337 | unsigned int c; |
338 | struct GNUNET_NAMESTORE_RecordData * rd; | 338 | struct GNUNET_GNSRECORD_Data * rd; |
339 | 339 | ||
340 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData)); | 340 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_GNSRECORD_Data)); |
341 | for (c = 0; c < count; c++) | 341 | for (c = 0; c < count; c++) |
342 | { | 342 | { |
343 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; | 343 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; |
@@ -360,7 +360,7 @@ empty_zone_proc (void *cls, | |||
360 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 360 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
361 | const char *label, | 361 | const char *label, |
362 | unsigned int rd_count, | 362 | unsigned int rd_count, |
363 | const struct GNUNET_NAMESTORE_RecordData *rd) | 363 | const struct GNUNET_GNSRECORD_Data *rd) |
364 | { | 364 | { |
365 | char *hostkey_file; | 365 | char *hostkey_file; |
366 | 366 | ||
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c index 177c6479b..83e7de458 100644 --- a/src/namestore/test_namestore_api_zone_to_name.c +++ b/src/namestore/test_namestore_api_zone_to_name.c | |||
@@ -100,7 +100,7 @@ zone_to_name_proc (void *cls, | |||
100 | struct GNUNET_TIME_Absolute expire, | 100 | struct GNUNET_TIME_Absolute expire, |
101 | const char *n, | 101 | const char *n, |
102 | unsigned int rd_count, | 102 | unsigned int rd_count, |
103 | const struct GNUNET_NAMESTORE_RecordData *rd, | 103 | const struct GNUNET_GNSRECORD_Data *rd, |
104 | const struct GNUNET_CRYPTO_EcdsaSignature *signature) | 104 | const struct GNUNET_CRYPTO_EcdsaSignature *signature) |
105 | { | 105 | { |
106 | int fail = GNUNET_NO; | 106 | int fail = GNUNET_NO; |
@@ -184,7 +184,7 @@ run (void *cls, | |||
184 | GNUNET_CRYPTO_short_hash (s_name, strlen (s_name) + 1, &s_zone_value); | 184 | GNUNET_CRYPTO_short_hash (s_name, strlen (s_name) + 1, &s_zone_value); |
185 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_NAMESTORE_short_h2s (&s_zone_value)); | 185 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_NAMESTORE_short_h2s (&s_zone_value)); |
186 | 186 | ||
187 | struct GNUNET_NAMESTORE_RecordData rd; | 187 | struct GNUNET_GNSRECORD_Data rd; |
188 | rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; | 188 | rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; |
189 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; | 189 | rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; |
190 | rd.data_size = sizeof (struct GNUNET_CRYPTO_ShortHashCode); | 190 | rd.data_size = sizeof (struct GNUNET_CRYPTO_ShortHashCode); |
diff --git a/src/namestore/test_plugin_namestore.c b/src/namestore/test_plugin_namestore.c index 7e77f4317..dc40120d4 100644 --- a/src/namestore/test_plugin_namestore.c +++ b/src/namestore/test_plugin_namestore.c | |||
@@ -84,7 +84,7 @@ test_record (void *cls, | |||
84 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *private_key, | 84 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *private_key, |
85 | const char *label, | 85 | const char *label, |
86 | unsigned int rd_count, | 86 | unsigned int rd_count, |
87 | const struct GNUNET_NAMESTORE_RecordData *rd) | 87 | const struct GNUNET_GNSRECORD_Data *rd) |
88 | { | 88 | { |
89 | int *idp = cls; | 89 | int *idp = cls; |
90 | int id = *idp; | 90 | int id = *idp; |
@@ -122,7 +122,7 @@ put_record (struct GNUNET_NAMESTORE_PluginFunctions *nsp, int id) | |||
122 | struct GNUNET_CRYPTO_EcdsaPrivateKey zone_private_key; | 122 | struct GNUNET_CRYPTO_EcdsaPrivateKey zone_private_key; |
123 | char label[64]; | 123 | char label[64]; |
124 | unsigned int rd_count = 1 + (id % 1024); | 124 | unsigned int rd_count = 1 + (id % 1024); |
125 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; | 125 | struct GNUNET_GNSRECORD_Data rd[rd_count]; |
126 | struct GNUNET_CRYPTO_EcdsaSignature signature; | 126 | struct GNUNET_CRYPTO_EcdsaSignature signature; |
127 | unsigned int i; | 127 | unsigned int i; |
128 | 128 | ||
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c index 3f10819ab..e686ce8b4 100644 --- a/src/pt/test_gns_vpn.c +++ b/src/pt/test_gns_vpn.c | |||
@@ -364,7 +364,7 @@ run (void *cls, | |||
364 | struct GNUNET_PeerIdentity id; | 364 | struct GNUNET_PeerIdentity id; |
365 | struct GNUNET_CRYPTO_HashAsciiEncoded peername; | 365 | struct GNUNET_CRYPTO_HashAsciiEncoded peername; |
366 | struct GNUNET_CRYPTO_EddsaPrivateKey *host_key; | 366 | struct GNUNET_CRYPTO_EddsaPrivateKey *host_key; |
367 | struct GNUNET_NAMESTORE_RecordData rd; | 367 | struct GNUNET_GNSRECORD_Data rd; |
368 | char *rd_string; | 368 | char *rd_string; |
369 | char *zone_keyfile; | 369 | char *zone_keyfile; |
370 | 370 | ||