Lines Matching refs:src
45 static int inet_cidr_pton_ipv4 __P((const char *src, u_char *dst,
47 static int inet_cidr_pton_ipv6 __P((const char *src, u_char *dst,
54 * inet_cidr_pton(af, src, dst, *bits)
70 inet_cidr_pton(int af, const char *src, void *dst, int *bits) {
73 return (inet_cidr_pton_ipv4(src, dst, bits, 0));
75 return (inet_cidr_pton_ipv6(src, dst, bits));
85 inet_cidr_pton_ipv4(const char *src, u_char *dst, int *pbits, int ipv6) {
91 while (ch = *src++, (isascii(ch) && isdigit(ch))) {
100 } while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
113 bits = getbits(src, ipv6);
152 inet_cidr_pton_ipv6(const char *src, u_char *dst, int *pbits) {
165 if (*src == ':')
166 if (*++src != ':')
168 curtok = src;
172 while ((ch = *src++) != '\0') {
186 curtok = src;
192 } else if (*src == '\0') {
210 bits = getbits(src, 1);
255 getbits(const char *src, int ipv6) {
259 if (*src == '\0') /*%< syntax */
262 ch = *src++;
268 if (bits == 0 && *src != '\0') /*%< no leading zeros */
272 } while (*src != '\0');