Lines Matching refs:cp
100 const u_char *cp; in ns_name_ntop() local
106 cp = src; in ns_name_ntop()
110 while ((n = *cp++) != 0) { in ns_name_ntop()
123 if ((l = labellen(cp - 1)) < 0) { in ns_name_ntop()
139 if ((m = decode_bitstring(&cp, dn, eom)) < 0) in ns_name_ntop()
148 c = *cp++; in ns_name_ntop()
224 char *cp; in ns_name_pton2() local
234 if ((cp = strchr(src, ']')) == NULL) { in ns_name_pton2()
238 if ((e = encode_bitsring(&src, cp + 2, in ns_name_pton2()
254 else if ((cp = strchr(digits, c)) != NULL) { in ns_name_pton2()
255 n = (int)(cp - digits) * 100; in ns_name_pton2()
257 (cp = strchr(digits, c)) == NULL) { in ns_name_pton2()
261 n += (int)(cp - digits) * 10; in ns_name_pton2()
263 (cp = strchr(digits, c)) == NULL) { in ns_name_pton2()
267 n += (int)(cp - digits); in ns_name_pton2()
359 const u_char *cp; in ns_name_ntol() local
365 cp = src; in ns_name_ntol()
373 while ((n = *cp++) != 0) { in ns_name_ntol()
380 if ((l = labellen(cp - 1)) < 0) { in ns_name_ntol()
389 c = *cp++; in ns_name_ntol()
693 const u_char *cp; in ns_name_skip() local
697 cp = *ptrptr; in ns_name_skip()
698 while (cp < eom && (n = *cp++) != 0) { in ns_name_skip()
702 cp += n; in ns_name_skip()
705 if ((l = labellen(cp - 1)) < 0) { in ns_name_skip()
709 cp += l; in ns_name_skip()
712 cp++; in ns_name_skip()
720 if (cp > eom) { in ns_name_skip()
724 *ptrptr = cp; in ns_name_skip()
937 const u_char *dn, *cp, *sp; in dn_find() local
952 cp = sp; in dn_find()
953 while ((n = *cp++) != 0) { in dn_find()
959 n = labellen(cp - 1); /* XXX */ in dn_find()
966 mklower(*cp++)) in dn_find()
969 if (*dn == '\0' && *cp == '\0') { in dn_find()
978 cp = msg + (((n & 0x3f) << 8) | *cp); in dn_find()
997 const unsigned char *cp = *cpp; in decode_bitstring() local
1001 if ((blen = (*cp & 0xff)) == 0) in decode_bitstring()
1008 cp++; in decode_bitstring()
1013 for (b = blen; b > 7; b -= 8, cp++) { in decode_bitstring()
1014 i = snprintf(dn, eom - dn, "%02x", *cp & 0xff); in decode_bitstring()
1020 tc = *cp++; in decode_bitstring()
1026 tc = *cp++; in decode_bitstring()
1038 *cpp = cp; in decode_bitstring()
1048 const char *cp = *bp; in encode_bitsring() local
1058 if (end - cp < 2) in encode_bitsring()
1062 if (*cp++ != 'x') in encode_bitsring()
1064 if (!isxdigit((*cp) & 0xff)) /* reject '\[x/BLEN]' */ in encode_bitsring()
1067 for (tp = *dst + 1; cp < end && tp < eom; cp++) { in encode_bitsring()
1068 switch((c = *cp)) { in encode_bitsring()
1079 cp++; /* skip ']' */ in encode_bitsring()
1094 beg_blen = cp; in encode_bitsring()
1114 if (cp >= end || tp >= eom) in encode_bitsring()
1143 *bp = cp; in encode_bitsring()