Lines Matching refs:src

29 static int inet_ntop4(const unsigned char *src, char *dst, size_t size);
30 static int inet_ntop6(const unsigned char *src, char *dst, size_t size);
31 static int inet_pton4(const char *src, unsigned char *dst);
32 static int inet_pton6(const char *src, unsigned char *dst);
35 int uv_inet_ntop(int af, const void* src, char* dst, size_t size) { in uv_inet_ntop() argument
38 return (inet_ntop4(src, dst, size)); in uv_inet_ntop()
40 return (inet_ntop6(src, dst, size)); in uv_inet_ntop()
48 static int inet_ntop4(const unsigned char *src, char *dst, size_t size) { in inet_ntop4() argument
53 l = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]); in inet_ntop4()
62 static int inet_ntop6(const unsigned char *src, char *dst, size_t size) { in inet_ntop6() argument
82 words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3)); in inet_ntop6()
127 int err = inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)); in inet_ntop6()
146 int uv_inet_pton(int af, const char* src, void* dst) { in uv_inet_pton() argument
147 if (src == NULL || dst == NULL) in uv_inet_pton()
152 return (inet_pton4(src, dst)); in uv_inet_pton()
156 s = (char*) src; in uv_inet_pton()
157 p = strchr(src, '%'); in uv_inet_pton()
160 len = p - src; in uv_inet_pton()
163 memcpy(s, src, len); in uv_inet_pton()
175 static int inet_pton4(const char *src, unsigned char *dst) { in inet_pton4() argument
183 while ((ch = *src++) != '\0') { in inet_pton4()
214 static int inet_pton6(const char *src, unsigned char *dst) { in inet_pton6() argument
226 if (*src == ':') in inet_pton6()
227 if (*++src != ':') in inet_pton6()
229 curtok = src; in inet_pton6()
232 while ((ch = *src++) != '\0') { in inet_pton6()
245 curtok = src; in inet_pton6()
251 } else if (*src == '\0') { in inet_pton6()