/* if the string does not end with a dot then add the dot */
memcpy(buf_str, str, len);
- printf("length %d\n", len);
- printf("char [%c]\n", buf_str[len - 1]);
if (buf_str[len - 1] != '.') {
if (len + 1 > MAXDOMAINLEN) {
* lenght of the first label */
len += 1;
- printf("modified dname [%s]\n", buf_str);
- printf("new length %d\n", len);
-
-
if ((stat = ldns_octet(buf_str, &octet_len)) != LDNS_STATUS_OK) {
return stat;
}
*/
q = buf;
for (s = p = buf_str; *s; s++) {
- printf("going in %d\n", i++);
if (*s == '.') {
- printf("dot s:%x p: %x diff %d\n", s, p, s-p);
label_chars = (unsigned int) (s - p);
label_chars2 = label_chars + 48; /* somehting printable */
/* put this number in the right spot in buf and copy those chars over*/
/* s - buf_str works because no magic is done in the above for-loop */
/* *d = ldns_rdf_new_frm_data((s - buf_str + 2) , LDNS_RDF_TYPE_DNAME , buf); */
*d = ldns_rdf_new_frm_data(len , LDNS_RDF_TYPE_DNAME , buf);
- printf("d size %d\n", (*d)->_size);
- printf("d data %s\n", (*d)->_data);
-
return LDNS_STATUS_OK;
}