From f3d8514681a6a9a0664d3ad0b6b72eb87346f92f Mon Sep 17 00:00:00 2001
From: Laurent Bercot
- unsigned int s6dns_message_get_domain (s6dns_domain_t *d, char const *packet, unsigned int packetlen, unsigned int *pos)
-Reads a domain and stores it, in string form, into *d.
-Returns 1 on success and 0 on failure, and sets errno:
+ size_t s6dns_message_get_domain_nodecode (char *out, size_t outmax, char const *packet, unsigned int packetlen, unsigned int *pos)
+Reads a domain and stores it, in packet form, into *out, which is a character
+array that must have been preallocated by the user; outmax is the maximum
+number of characters that can be stored in out. As a special
+case, out can be NULL, in which case nothing will be written, but
+the domain will still be parsed and pos will still be updated.
+The function returns the number of characters written to out
+(or that would have been). If 0, it denotes a failure, and errno is set:
+ unsigned int s6dns_message_get_domain (s6dns_domain_t *d, char const *packet, unsigned int packetlen, unsigned int *pos)
+Reads a domain and stores it, in string form, into *d.
+Returns 1 on success and 0 on failure, and sets errno just like the
+function above.
+
int s6dns_message_get_hinfo (s6dns_message_rr_hinfo_t *p, char const *packet, unsigned int packetlen, unsigned int *pos)
Reads a HINFO RR and stores it into *p. Returns 1 on success or 0
--
cgit v1.2.3