Lines Matching refs:dst
44 static char * inet_net_ntop_ipv4(const u_char *src, int bits, char *dst,
46 static char * inet_net_ntop_ipv6(const u_char *src, int bits, char *dst,
51 * inet_net_ntop(af, src, bits, dst, size)
55 * pointer to dst, or NULL if an error occurred (check errno).
60 inet_net_ntop(af, src, bits, dst, size)
64 char *dst;
69 return (inet_net_ntop_ipv4(src, bits, dst, size));
71 return (inet_net_ntop_ipv6(src, bits, dst, size));
80 * inet_net_ntop_ipv4(src, bits, dst, size)
84 * pointer to dst, or NULL if an error occurred (check errno).
92 inet_net_ntop_ipv4(src, bits, dst, size)
95 char *dst;
98 char *odst = dst;
111 *dst++ = '0';
113 *dst = '\0';
120 t = dst;
121 dst += SPRINTF((dst, "%u", *src++));
123 *dst++ = '.';
124 *dst = '\0';
126 size -= (size_t)(dst - t);
134 t = dst;
135 if (dst != odst)
136 *dst++ = '.';
138 dst += SPRINTF((dst, "%u", *src & m));
139 size -= (size_t)(dst - t);
145 dst += SPRINTF((dst, "/%u", bits));
155 * inet_net_ntop_ipv6(src, bits, fakebits, dst, size)
161 * pointer to dst, or NULL if an error occurred (check errno).
171 inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size) {
272 strcpy(dst, outbuf);
274 return (dst);