Lines Matching refs:src
34 static int inet_ntop4(const unsigned char *src, char *dst, size_t size);
35 static int inet_ntop6(const unsigned char *src, char *dst, size_t size);
36 static int inet_pton4(const char *src, unsigned char *dst);
37 static int inet_pton6(const char *src, unsigned char *dst);
40 int uv_inet_ntop(int af, const void* src, char* dst, size_t size) {
43 return (inet_ntop4(src, dst, size));
45 return (inet_ntop6(src, dst, size));
53 static int inet_ntop4(const unsigned char *src, char *dst, size_t size) {
58 l = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]);
67 static int inet_ntop6(const unsigned char *src, char *dst, size_t size) {
83 * Find the longest run of 0x00's in src[] for :: shorthanding.
87 words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
132 int err = inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp));
151 int uv_inet_pton(int af, const char* src, void* dst) {
152 if (src == NULL || dst == NULL)
157 return (inet_pton4(src, dst));
161 s = (char*) src;
162 p = strchr(src, '%');
165 len = p - src;
168 memcpy(s, src, len);
180 static int inet_pton4(const char *src, unsigned char *dst) {
188 while ((ch = *src++) != '\0') {
219 static int inet_pton6(const char *src, unsigned char *dst) {
231 if (*src == ':')
232 if (*++src != ':')
234 curtok = src;
237 while ((ch = *src++) != '\0') {
250 curtok = src;
256 } else if (*src == '\0') {