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) {
38 return (inet_ntop4(src, dst, size));
40 return (inet_ntop6(src, dst, size));
48 static int inet_ntop4(const unsigned char *src, char *dst, size_t size) {
53 l = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]);
62 static int inet_ntop6(const unsigned char *src, char *dst, size_t size) {
78 * Find the longest run of 0x00's in src[] for :: shorthanding.
82 words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
127 int err = inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp));
146 int uv_inet_pton(int af, const char* src, void* dst) {
147 if (src == NULL || dst == NULL)
152 return (inet_pton4(src, dst));
156 s = (char*) src;
157 p = strchr(src, '%');
160 len = p - src;
163 memcpy(s, src, len);
175 static int inet_pton4(const char *src, unsigned char *dst) {
183 while ((ch = *src++) != '\0') {
214 static int inet_pton6(const char *src, unsigned char *dst) {
226 if (*src == ':')
227 if (*++src != ':')
229 curtok = src;
232 while ((ch = *src++) != '\0') {
245 curtok = src;
251 } else if (*src == '\0') {