Lines Matching defs:cstr
22 /* expand a RFC1035-compressed list of domain names "cstr", of length "clen";
26 char *dname_dec(const uint8_t *cstr, int clen, const char *pre)
32 if (!cstr)
38 /* We make two passes over the cstr string. First, we compute
56 c = cstr + crtpos;
141 /* returns the offset within cstr at which dname can be found, or -1
143 static int find_offset(const uint8_t *cstr, int clen, const uint8_t *dname)
148 /* find all labels in cstr */
151 c = cstr + off;
164 c = cstr + (((*c & 0x3f) << 8) | (*(c + 1) & 0xff));
175 /* computes string to be appended to cstr so that src would be added to
177 * cstr; worst case, it's all of src, converted to rfc3011 format).
181 uint8_t *dname_enc(const uint8_t *cstr, int clen, const char *src, int *retlen)
193 off = find_offset(cstr, clen, d);