aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_dnsparser_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-15 20:41:40 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-15 20:41:40 +0000
commit1574e0f8c2a55363c024a95f440ba7be647efbe1 (patch)
tree5e4507d9aa404ac983c5774b71b25ec6174ee7cc /src/include/gnunet_dnsparser_lib.h
parent5ec7048ed9ffeddbe06e34a31d388080fae143e5 (diff)
downloadgnunet-1574e0f8c2a55363c024a95f440ba7be647efbe1.tar.gz
gnunet-1574e0f8c2a55363c024a95f440ba7be647efbe1.zip
-removing legacy dns/vpn/exit code and renaming -new versions to current
Diffstat (limited to 'src/include/gnunet_dnsparser_lib.h')
-rw-r--r--src/include/gnunet_dnsparser_lib.h93
1 files changed, 0 insertions, 93 deletions
diff --git a/src/include/gnunet_dnsparser_lib.h b/src/include/gnunet_dnsparser_lib.h
index 6654394be..a1fb920a7 100644
--- a/src/include/gnunet_dnsparser_lib.h
+++ b/src/include/gnunet_dnsparser_lib.h
@@ -394,97 +394,4 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p,
394 size_t *buf_length); 394 size_t *buf_length);
395 395
396 396
397
398
399/* legacy API below */
400
401// DNS-Stuff
402GNUNET_NETWORK_STRUCT_BEGIN
403
404struct dns_static
405{
406 uint16_t id GNUNET_PACKED;
407
408 unsigned rd:1 GNUNET_PACKED; // recursion desired (client -> server)
409 unsigned tc:1 GNUNET_PACKED; // message is truncated
410 unsigned aa:1 GNUNET_PACKED; // authoritative answer
411 unsigned op:4 GNUNET_PACKED; // query:0, inverse q.:1, status: 2
412 unsigned qr:1 GNUNET_PACKED; // query:0, response:1
413
414 unsigned rcode:4 GNUNET_PACKED; // 0 No error
415 // 1 Format error
416 // 2 Server failure
417 // 3 Name Error
418 // 4 Not Implemented
419 // 5 Refused
420 unsigned z:3 GNUNET_PACKED; // reserved
421 unsigned ra:1 GNUNET_PACKED; // recursion available (server -> client)
422
423 uint16_t qdcount GNUNET_PACKED; // number of questions
424 uint16_t ancount GNUNET_PACKED; // number of answers
425 uint16_t nscount GNUNET_PACKED; // number of authority-records
426 uint16_t arcount GNUNET_PACKED; // number of additional records
427};
428GNUNET_NETWORK_STRUCT_END
429
430
431struct dns_pkt
432{
433 struct dns_static s;
434 unsigned char data[1];
435};
436
437struct dns_pkt_parsed
438{
439 struct dns_static s;
440 struct dns_query **queries;
441 struct dns_record **answers;
442 struct dns_record **nameservers;
443 struct dns_record **additional;
444};
445
446struct dns_query_line
447{
448 uint16_t type;
449 uint16_t class;
450};
451
452struct dns_query
453{
454 char *name;
455 unsigned char namelen;
456 uint16_t qtype;
457 uint16_t qclass;
458};
459
460struct dns_record_line
461{
462 uint16_t type;
463 uint16_t class;
464 uint32_t ttl;
465 uint16_t data_len;
466 unsigned char data;
467};
468
469struct dns_record
470{
471 char *name;
472 unsigned char namelen;
473 uint16_t type;
474 uint16_t class;
475 uint32_t ttl;
476 uint16_t data_len;
477 unsigned char *data;
478};
479
480
481struct dns_pkt_parsed *
482parse_dns_packet (struct dns_pkt *pkt);
483
484struct dns_pkt *
485unparse_dns_packet (struct dns_pkt_parsed *pkt);
486
487void
488free_parsed_dns_packet (struct dns_pkt_parsed *ppkt);
489
490#endif 397#endif