aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_dnsparser_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_dnsparser_lib.h')
-rw-r--r--src/include/gnunet_dnsparser_lib.h181
1 files changed, 99 insertions, 82 deletions
diff --git a/src/include/gnunet_dnsparser_lib.h b/src/include/gnunet_dnsparser_lib.h
index bf1869b91..cbb53e416 100644
--- a/src/include/gnunet_dnsparser_lib.h
+++ b/src/include/gnunet_dnsparser_lib.h
@@ -92,7 +92,8 @@
92/** 92/**
93 * A DNS query. 93 * A DNS query.
94 */ 94 */
95struct GNUNET_DNSPARSER_Query { 95struct GNUNET_DNSPARSER_Query
96{
96 /** 97 /**
97 * Name of the record that the query is for (0-terminated). 98 * Name of the record that the query is for (0-terminated).
98 * In UTF-8 format. The library will convert from and to DNS-IDNA 99 * In UTF-8 format. The library will convert from and to DNS-IDNA
@@ -117,7 +118,8 @@ struct GNUNET_DNSPARSER_Query {
117/** 118/**
118 * Information from MX records (RFC 1035). 119 * Information from MX records (RFC 1035).
119 */ 120 */
120struct GNUNET_DNSPARSER_MxRecord { 121struct GNUNET_DNSPARSER_MxRecord
122{
121 /** 123 /**
122 * Preference for this entry (lower value is higher preference). 124 * Preference for this entry (lower value is higher preference).
123 */ 125 */
@@ -137,7 +139,8 @@ struct GNUNET_DNSPARSER_MxRecord {
137/** 139/**
138 * Information from SRV records (RFC 2782). 140 * Information from SRV records (RFC 2782).
139 */ 141 */
140struct GNUNET_DNSPARSER_SrvRecord { 142struct GNUNET_DNSPARSER_SrvRecord
143{
141 /** 144 /**
142 * Hostname offering the service. 145 * Hostname offering the service.
143 * In UTF-8 format. The library will convert from and to DNS-IDNA 146 * In UTF-8 format. The library will convert from and to DNS-IDNA
@@ -171,7 +174,8 @@ struct GNUNET_DNSPARSER_SrvRecord {
171/** 174/**
172 * DNS CERT types as defined in RFC 4398. 175 * DNS CERT types as defined in RFC 4398.
173 */ 176 */
174enum GNUNET_DNSPARSER_CertType { 177enum GNUNET_DNSPARSER_CertType
178{
175 /** 179 /**
176 * Reserved value 180 * Reserved value
177 */ 181 */
@@ -223,7 +227,8 @@ enum GNUNET_DNSPARSER_CertType {
223 * DNSCERT algorithms as defined in http://www.iana.org/assignments/ 227 * DNSCERT algorithms as defined in http://www.iana.org/assignments/
224 * dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml, under dns-sec-alg-numbers-1 228 * dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml, under dns-sec-alg-numbers-1
225 */ 229 */
226enum GNUNET_DNSPARSER_CertAlgorithm { 230enum GNUNET_DNSPARSER_CertAlgorithm
231{
227 /** 232 /**
228 * No defined 233 * No defined
229 */ 234 */
@@ -299,7 +304,8 @@ enum GNUNET_DNSPARSER_CertAlgorithm {
299/** 304/**
300 * Information from CERT records (RFC 4034). 305 * Information from CERT records (RFC 4034).
301 */ 306 */
302struct GNUNET_DNSPARSER_CertRecord { 307struct GNUNET_DNSPARSER_CertRecord
308{
303 /** 309 /**
304 * Certificate type 310 * Certificate type
305 */ 311 */
@@ -330,7 +336,8 @@ struct GNUNET_DNSPARSER_CertRecord {
330/** 336/**
331 * Information from SOA records (RFC 1035). 337 * Information from SOA records (RFC 1035).
332 */ 338 */
333struct GNUNET_DNSPARSER_SoaRecord { 339struct GNUNET_DNSPARSER_SoaRecord
340{
334 /** 341 /**
335 * The domainname of the name server that was the 342 * The domainname of the name server that was the
336 * original or primary source of data for this zone. 343 * original or primary source of data for this zone.
@@ -386,7 +393,8 @@ struct GNUNET_DNSPARSER_SoaRecord {
386 * The tag is followed by the tag_len. 393 * The tag is followed by the tag_len.
387 * The value is followed by the tag for (d - tag_len - 2) bytes 394 * The value is followed by the tag for (d - tag_len - 2) bytes
388 */ 395 */
389struct GNUNET_DNSPARSER_CaaRecord { 396struct GNUNET_DNSPARSER_CaaRecord
397{
390 /** 398 /**
391 * The flags of the CAA record. 399 * The flags of the CAA record.
392 */ 400 */
@@ -403,7 +411,8 @@ struct GNUNET_DNSPARSER_CaaRecord {
403/** 411/**
404 * Binary record information (unparsed). 412 * Binary record information (unparsed).
405 */ 413 */
406struct GNUNET_DNSPARSER_RawRecord { 414struct GNUNET_DNSPARSER_RawRecord
415{
407 /** 416 /**
408 * Binary record data. 417 * Binary record data.
409 */ 418 */
@@ -419,7 +428,8 @@ struct GNUNET_DNSPARSER_RawRecord {
419/** 428/**
420 * A DNS response record. 429 * A DNS response record.
421 */ 430 */
422struct GNUNET_DNSPARSER_Record { 431struct GNUNET_DNSPARSER_Record
432{
423 /** 433 /**
424 * Name of the record that the query is for (0-terminated). 434 * Name of the record that the query is for (0-terminated).
425 * In UTF-8 format. The library will convert from and to DNS-IDNA 435 * In UTF-8 format. The library will convert from and to DNS-IDNA
@@ -432,7 +442,8 @@ struct GNUNET_DNSPARSER_Record {
432 /** 442 /**
433 * Payload of the record (which one of these is valid depends on the 'type'). 443 * Payload of the record (which one of these is valid depends on the 'type').
434 */ 444 */
435 union { 445 union
446 {
436 /** 447 /**
437 * For NS, CNAME and PTR records, this is the uncompressed 0-terminated hostname. 448 * For NS, CNAME and PTR records, this is the uncompressed 0-terminated hostname.
438 * In UTF-8 format. The library will convert from and to DNS-IDNA 449 * In UTF-8 format. The library will convert from and to DNS-IDNA
@@ -489,7 +500,8 @@ struct GNUNET_DNSPARSER_Record {
489/** 500/**
490 * Easy-to-process, parsed version of a DNS packet. 501 * Easy-to-process, parsed version of a DNS packet.
491 */ 502 */
492struct GNUNET_DNSPARSER_Packet { 503struct GNUNET_DNSPARSER_Packet
504{
493 /** 505 /**
494 * Array of all queries in the packet, must contain "num_queries" entries. 506 * Array of all queries in the packet, must contain "num_queries" entries.
495 */ 507 */
@@ -551,7 +563,7 @@ struct GNUNET_DNSPARSER_Packet {
551 * #GNUNET_SYSERR if the label is not valid for DNS names 563 * #GNUNET_SYSERR if the label is not valid for DNS names
552 */ 564 */
553int 565int
554GNUNET_DNSPARSER_check_label(const char *label); 566GNUNET_DNSPARSER_check_label (const char *label);
555 567
556 568
557/** 569/**
@@ -564,7 +576,7 @@ GNUNET_DNSPARSER_check_label(const char *label);
564 * #GNUNET_SYSERR if the label is not valid for DNS names 576 * #GNUNET_SYSERR if the label is not valid for DNS names
565 */ 577 */
566int 578int
567GNUNET_DNSPARSER_check_name(const char *name); 579GNUNET_DNSPARSER_check_name (const char *name);
568 580
569 581
570/** 582/**
@@ -576,8 +588,8 @@ GNUNET_DNSPARSER_check_name(const char *name);
576 * @return NULL on error, otherwise the parsed packet 588 * @return NULL on error, otherwise the parsed packet
577 */ 589 */
578struct GNUNET_DNSPARSER_Packet * 590struct GNUNET_DNSPARSER_Packet *
579GNUNET_DNSPARSER_parse(const char *udp_payload, 591GNUNET_DNSPARSER_parse (const char *udp_payload,
580 size_t udp_payload_length); 592 size_t udp_payload_length);
581 593
582 594
583/** 595/**
@@ -586,7 +598,7 @@ GNUNET_DNSPARSER_parse(const char *udp_payload,
586 * @param p packet to free 598 * @param p packet to free
587 */ 599 */
588void 600void
589GNUNET_DNSPARSER_free_packet(struct GNUNET_DNSPARSER_Packet *p); 601GNUNET_DNSPARSER_free_packet (struct GNUNET_DNSPARSER_Packet *p);
590 602
591 603
592/** 604/**
@@ -604,10 +616,10 @@ GNUNET_DNSPARSER_free_packet(struct GNUNET_DNSPARSER_Packet *p);
604 * #GNUNET_OK if @a p was packed completely into @a buf 616 * #GNUNET_OK if @a p was packed completely into @a buf
605 */ 617 */
606int 618int
607GNUNET_DNSPARSER_pack(const struct GNUNET_DNSPARSER_Packet *p, 619GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p,
608 uint16_t max, 620 uint16_t max,
609 char **buf, 621 char **buf,
610 size_t *buf_length); 622 size_t *buf_length);
611 623
612/* ***************** low-level packing API ******************** */ 624/* ***************** low-level packing API ******************** */
613 625
@@ -625,10 +637,10 @@ GNUNET_DNSPARSER_pack(const struct GNUNET_DNSPARSER_Packet *p,
625 * #GNUNET_OK if @a name was added to @a dst 637 * #GNUNET_OK if @a name was added to @a dst
626 */ 638 */
627int 639int
628GNUNET_DNSPARSER_builder_add_name(char *dst, 640GNUNET_DNSPARSER_builder_add_name (char *dst,
629 size_t dst_len, 641 size_t dst_len,
630 size_t *off, 642 size_t *off,
631 const char *name); 643 const char *name);
632 644
633 645
634/** 646/**
@@ -644,10 +656,10 @@ GNUNET_DNSPARSER_builder_add_name(char *dst,
644 * #GNUNET_OK if @a query was added to @a dst 656 * #GNUNET_OK if @a query was added to @a dst
645 */ 657 */
646int 658int
647GNUNET_DNSPARSER_builder_add_query(char *dst, 659GNUNET_DNSPARSER_builder_add_query (char *dst,
648 size_t dst_len, 660 size_t dst_len,
649 size_t *off, 661 size_t *off,
650 const struct GNUNET_DNSPARSER_Query *query); 662 const struct GNUNET_DNSPARSER_Query *query);
651 663
652 664
653/** 665/**
@@ -663,10 +675,10 @@ GNUNET_DNSPARSER_builder_add_query(char *dst,
663 * #GNUNET_OK if @a mx was added to @a dst 675 * #GNUNET_OK if @a mx was added to @a dst
664 */ 676 */
665int 677int
666GNUNET_DNSPARSER_builder_add_mx(char *dst, 678GNUNET_DNSPARSER_builder_add_mx (char *dst,
667 size_t dst_len, 679 size_t dst_len,
668 size_t *off, 680 size_t *off,
669 const struct GNUNET_DNSPARSER_MxRecord *mx); 681 const struct GNUNET_DNSPARSER_MxRecord *mx);
670 682
671 683
672/** 684/**
@@ -682,10 +694,10 @@ GNUNET_DNSPARSER_builder_add_mx(char *dst,
682 * #GNUNET_OK if @a soa was added to @a dst 694 * #GNUNET_OK if @a soa was added to @a dst
683 */ 695 */
684int 696int
685GNUNET_DNSPARSER_builder_add_soa(char *dst, 697GNUNET_DNSPARSER_builder_add_soa (char *dst,
686 size_t dst_len, 698 size_t dst_len,
687 size_t *off, 699 size_t *off,
688 const struct GNUNET_DNSPARSER_SoaRecord *soa); 700 const struct GNUNET_DNSPARSER_SoaRecord *soa);
689 701
690 702
691/** 703/**
@@ -701,10 +713,11 @@ GNUNET_DNSPARSER_builder_add_soa(char *dst,
701 * #GNUNET_OK if @a soa was added to @a dst 713 * #GNUNET_OK if @a soa was added to @a dst
702 */ 714 */
703int 715int
704GNUNET_DNSPARSER_builder_add_cert(char *dst, 716GNUNET_DNSPARSER_builder_add_cert (char *dst,
705 size_t dst_len, 717 size_t dst_len,
706 size_t *off, 718 size_t *off,
707 const struct GNUNET_DNSPARSER_CertRecord *cert); 719 const struct
720 GNUNET_DNSPARSER_CertRecord *cert);
708 721
709 722
710/** 723/**
@@ -720,10 +733,10 @@ GNUNET_DNSPARSER_builder_add_cert(char *dst,
720 * #GNUNET_OK if @a srv was added to @a dst 733 * #GNUNET_OK if @a srv was added to @a dst
721 */ 734 */
722int 735int
723GNUNET_DNSPARSER_builder_add_srv(char *dst, 736GNUNET_DNSPARSER_builder_add_srv (char *dst,
724 size_t dst_len, 737 size_t dst_len,
725 size_t *off, 738 size_t *off,
726 const struct GNUNET_DNSPARSER_SrvRecord *srv); 739 const struct GNUNET_DNSPARSER_SrvRecord *srv);
727 740
728/* ***************** low-level parsing API ******************** */ 741/* ***************** low-level parsing API ******************** */
729 742
@@ -738,10 +751,10 @@ GNUNET_DNSPARSER_builder_add_srv(char *dst,
738 * @return #GNUNET_OK on success, #GNUNET_SYSERR if the record is malformed 751 * @return #GNUNET_OK on success, #GNUNET_SYSERR if the record is malformed
739 */ 752 */
740int 753int
741GNUNET_DNSPARSER_parse_record(const char *udp_payload, 754GNUNET_DNSPARSER_parse_record (const char *udp_payload,
742 size_t udp_payload_length, 755 size_t udp_payload_length,
743 size_t *off, 756 size_t *off,
744 struct GNUNET_DNSPARSER_Record *r); 757 struct GNUNET_DNSPARSER_Record *r);
745 758
746 759
747/** 760/**
@@ -754,9 +767,9 @@ GNUNET_DNSPARSER_parse_record(const char *udp_payload,
754 * @return name as 0-terminated C string on success, NULL if the payload is malformed 767 * @return name as 0-terminated C string on success, NULL if the payload is malformed
755 */ 768 */
756char * 769char *
757GNUNET_DNSPARSER_parse_name(const char *udp_payload, 770GNUNET_DNSPARSER_parse_name (const char *udp_payload,
758 size_t udp_payload_length, 771 size_t udp_payload_length,
759 size_t *off); 772 size_t *off);
760 773
761 774
762/** 775/**
@@ -770,10 +783,10 @@ GNUNET_DNSPARSER_parse_name(const char *udp_payload,
770 * @return #GNUNET_OK on success, #GNUNET_SYSERR if the query is malformed 783 * @return #GNUNET_OK on success, #GNUNET_SYSERR if the query is malformed
771 */ 784 */
772int 785int
773GNUNET_DNSPARSER_parse_query(const char *udp_payload, 786GNUNET_DNSPARSER_parse_query (const char *udp_payload,
774 size_t udp_payload_length, 787 size_t udp_payload_length,
775 size_t *off, 788 size_t *off,
776 struct GNUNET_DNSPARSER_Query *q); 789 struct GNUNET_DNSPARSER_Query *q);
777 790
778 791
779/** 792/**
@@ -786,9 +799,9 @@ GNUNET_DNSPARSER_parse_query(const char *udp_payload,
786 * @return the parsed SOA record, NULL on error 799 * @return the parsed SOA record, NULL on error
787 */ 800 */
788struct GNUNET_DNSPARSER_SoaRecord * 801struct GNUNET_DNSPARSER_SoaRecord *
789GNUNET_DNSPARSER_parse_soa(const char *udp_payload, 802GNUNET_DNSPARSER_parse_soa (const char *udp_payload,
790 size_t udp_payload_length, 803 size_t udp_payload_length,
791 size_t *off); 804 size_t *off);
792 805
793 806
794/** 807/**
@@ -801,9 +814,9 @@ GNUNET_DNSPARSER_parse_soa(const char *udp_payload,
801 * @return the parsed CERT record, NULL on error 814 * @return the parsed CERT record, NULL on error
802 */ 815 */
803struct GNUNET_DNSPARSER_CertRecord * 816struct GNUNET_DNSPARSER_CertRecord *
804GNUNET_DNSPARSER_parse_cert(const char *udp_payload, 817GNUNET_DNSPARSER_parse_cert (const char *udp_payload,
805 size_t udp_payload_length, 818 size_t udp_payload_length,
806 size_t *off); 819 size_t *off);
807 820
808 821
809/** 822/**
@@ -816,9 +829,9 @@ GNUNET_DNSPARSER_parse_cert(const char *udp_payload,
816 * @return the parsed MX record, NULL on error 829 * @return the parsed MX record, NULL on error
817 */ 830 */
818struct GNUNET_DNSPARSER_MxRecord * 831struct GNUNET_DNSPARSER_MxRecord *
819GNUNET_DNSPARSER_parse_mx(const char *udp_payload, 832GNUNET_DNSPARSER_parse_mx (const char *udp_payload,
820 size_t udp_payload_length, 833 size_t udp_payload_length,
821 size_t *off); 834 size_t *off);
822 835
823 836
824/** 837/**
@@ -831,9 +844,9 @@ GNUNET_DNSPARSER_parse_mx(const char *udp_payload,
831 * @return the parsed SRV record, NULL on error 844 * @return the parsed SRV record, NULL on error
832 */ 845 */
833struct GNUNET_DNSPARSER_SrvRecord * 846struct GNUNET_DNSPARSER_SrvRecord *
834GNUNET_DNSPARSER_parse_srv(const char *udp_payload, 847GNUNET_DNSPARSER_parse_srv (const char *udp_payload,
835 size_t udp_payload_length, 848 size_t udp_payload_length,
836 size_t *off); 849 size_t *off);
837 850
838/* ***************** low-level duplication API ******************** */ 851/* ***************** low-level duplication API ******************** */
839 852
@@ -844,7 +857,7 @@ GNUNET_DNSPARSER_parse_srv(const char *udp_payload,
844 * @return the newly allocated record 857 * @return the newly allocated record
845 */ 858 */
846struct GNUNET_DNSPARSER_Record * 859struct GNUNET_DNSPARSER_Record *
847GNUNET_DNSPARSER_duplicate_record(const struct GNUNET_DNSPARSER_Record *r); 860GNUNET_DNSPARSER_duplicate_record (const struct GNUNET_DNSPARSER_Record *r);
848 861
849 862
850/** 863/**
@@ -854,7 +867,8 @@ GNUNET_DNSPARSER_duplicate_record(const struct GNUNET_DNSPARSER_Record *r);
854 * @return the newly allocated record 867 * @return the newly allocated record
855 */ 868 */
856struct GNUNET_DNSPARSER_SoaRecord * 869struct GNUNET_DNSPARSER_SoaRecord *
857GNUNET_DNSPARSER_duplicate_soa_record(const struct GNUNET_DNSPARSER_SoaRecord *r); 870GNUNET_DNSPARSER_duplicate_soa_record (const struct
871 GNUNET_DNSPARSER_SoaRecord *r);
858 872
859 873
860/** 874/**
@@ -864,7 +878,8 @@ GNUNET_DNSPARSER_duplicate_soa_record(const struct GNUNET_DNSPARSER_SoaRecord *r
864 * @return the newly allocated record 878 * @return the newly allocated record
865 */ 879 */
866struct GNUNET_DNSPARSER_CertRecord * 880struct GNUNET_DNSPARSER_CertRecord *
867GNUNET_DNSPARSER_duplicate_cert_record(const struct GNUNET_DNSPARSER_CertRecord *r); 881GNUNET_DNSPARSER_duplicate_cert_record (const struct
882 GNUNET_DNSPARSER_CertRecord *r);
868 883
869 884
870/** 885/**
@@ -874,7 +889,8 @@ GNUNET_DNSPARSER_duplicate_cert_record(const struct GNUNET_DNSPARSER_CertRecord
874 * @return the newly allocated record 889 * @return the newly allocated record
875 */ 890 */
876struct GNUNET_DNSPARSER_MxRecord * 891struct GNUNET_DNSPARSER_MxRecord *
877GNUNET_DNSPARSER_duplicate_mx_record(const struct GNUNET_DNSPARSER_MxRecord *r); 892GNUNET_DNSPARSER_duplicate_mx_record (const struct
893 GNUNET_DNSPARSER_MxRecord *r);
878 894
879 895
880/** 896/**
@@ -884,7 +900,8 @@ GNUNET_DNSPARSER_duplicate_mx_record(const struct GNUNET_DNSPARSER_MxRecord *r);
884 * @return the newly allocated record 900 * @return the newly allocated record
885 */ 901 */
886struct GNUNET_DNSPARSER_SrvRecord * 902struct GNUNET_DNSPARSER_SrvRecord *
887GNUNET_DNSPARSER_duplicate_srv_record(const struct GNUNET_DNSPARSER_SrvRecord *r); 903GNUNET_DNSPARSER_duplicate_srv_record (const struct
904 GNUNET_DNSPARSER_SrvRecord *r);
888 905
889 906
890/* ***************** low-level deallocation API ******************** */ 907/* ***************** low-level deallocation API ******************** */
@@ -895,7 +912,7 @@ GNUNET_DNSPARSER_duplicate_srv_record(const struct GNUNET_DNSPARSER_SrvRecord *r
895 * @param r record to free 912 * @param r record to free
896 */ 913 */
897void 914void
898GNUNET_DNSPARSER_free_record(struct GNUNET_DNSPARSER_Record *r); 915GNUNET_DNSPARSER_free_record (struct GNUNET_DNSPARSER_Record *r);
899 916
900 917
901/** 918/**
@@ -904,7 +921,7 @@ GNUNET_DNSPARSER_free_record(struct GNUNET_DNSPARSER_Record *r);
904 * @param mx record to free 921 * @param mx record to free
905 */ 922 */
906void 923void
907GNUNET_DNSPARSER_free_mx(struct GNUNET_DNSPARSER_MxRecord *mx); 924GNUNET_DNSPARSER_free_mx (struct GNUNET_DNSPARSER_MxRecord *mx);
908 925
909 926
910/** 927/**
@@ -913,7 +930,7 @@ GNUNET_DNSPARSER_free_mx(struct GNUNET_DNSPARSER_MxRecord *mx);
913 * @param srv record to free 930 * @param srv record to free
914 */ 931 */
915void 932void
916GNUNET_DNSPARSER_free_srv(struct GNUNET_DNSPARSER_SrvRecord *srv); 933GNUNET_DNSPARSER_free_srv (struct GNUNET_DNSPARSER_SrvRecord *srv);
917 934
918 935
919/** 936/**
@@ -922,7 +939,7 @@ GNUNET_DNSPARSER_free_srv(struct GNUNET_DNSPARSER_SrvRecord *srv);
922 * @param soa record to free 939 * @param soa record to free
923 */ 940 */
924void 941void
925GNUNET_DNSPARSER_free_soa(struct GNUNET_DNSPARSER_SoaRecord *soa); 942GNUNET_DNSPARSER_free_soa (struct GNUNET_DNSPARSER_SoaRecord *soa);
926 943
927 944
928/** 945/**
@@ -931,7 +948,7 @@ GNUNET_DNSPARSER_free_soa(struct GNUNET_DNSPARSER_SoaRecord *soa);
931 * @param cert record to free 948 * @param cert record to free
932 */ 949 */
933void 950void
934GNUNET_DNSPARSER_free_cert(struct GNUNET_DNSPARSER_CertRecord *cert); 951GNUNET_DNSPARSER_free_cert (struct GNUNET_DNSPARSER_CertRecord *cert);
935 952
936 953
937/** 954/**
@@ -942,8 +959,8 @@ GNUNET_DNSPARSER_free_cert(struct GNUNET_DNSPARSER_CertRecord *cert);
942 * @return HEX string (lower case) 959 * @return HEX string (lower case)
943 */ 960 */
944char * 961char *
945GNUNET_DNSPARSER_bin_to_hex(const void *data, 962GNUNET_DNSPARSER_bin_to_hex (const void *data,
946 size_t data_size); 963 size_t data_size);
947 964
948 965
949/** 966/**
@@ -955,8 +972,8 @@ GNUNET_DNSPARSER_bin_to_hex(const void *data,
955 * @return number of bytes written to data 972 * @return number of bytes written to data
956 */ 973 */
957size_t 974size_t
958GNUNET_DNSPARSER_hex_to_bin(const char *hex, 975GNUNET_DNSPARSER_hex_to_bin (const char *hex,
959 void *data); 976 void *data);
960 977
961 978
962#endif 979#endif