Lines Matching refs:dst
44 inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size);
46 inet_cidr_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size);
50 * inet_cidr_ntop(af, src, bits, dst, size)
54 * pointer to dst, or NULL if an error occurred (check errno).
63 inet_cidr_ntop(int af, const void *src, int bits, char *dst, size_t size) {
66 return (inet_cidr_ntop_ipv4(src, bits, dst, size));
68 return (inet_cidr_ntop_ipv6(src, bits, dst, size));
76 decoct(const u_char *src, int bytes, char *dst, size_t size) {
77 char *odst = dst;
84 t = dst;
85 dst += SPRINTF((dst, "%u", *src++));
87 *dst++ = '.';
88 *dst = '\0';
90 size -= (size_t)(dst - t);
92 return (dst - odst);
97 * inet_cidr_ntop_ipv4(src, bits, dst, size)
101 * pointer to dst, or NULL if an error occurred (check errno).
109 inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) {
110 char *odst = dst;
132 b = decoct(src, bytes, dst, size);
135 dst += b;
142 dst += SPRINTF((dst, "/%u", bits));
153 inet_cidr_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size) {
259 strcpy(dst, tmp);
260 return (dst);