9 unsigned int labellen = 0;
11 unsigned int namelen = 0;
22 if (namelen + labellen + 1 >
sizeof(
name))
return 0;
23 name[namelen++] = labellen;
24 byte_copy(
name + namelen,labellen,label);
33 if ((ch >=
'0') && (ch <=
'7')) {
35 if (n && (*
buf >=
'0') && (*
buf <=
'7')) {
39 if (n && (*
buf >=
'0') && (*
buf <=
'7')) {
47 if (labellen >=
sizeof(label))
return 0;
48 label[labellen++] = ch;
52 if (namelen + labellen + 1 >
sizeof(
name))
return 0;
53 name[namelen++] = labellen;
54 byte_copy(
name + namelen,labellen,label);
59 if (namelen + 1 >
sizeof(
name))
return 0;
64 byte_copy(
x,namelen,
name);
66 if (*
out) alloc_free(*
out);
int dns_domain_fromdot(char **out, const char *buf, unsigned int n)
char name[DNS_NAME6_DOMAIN]
void out(const char *s, unsigned int len)