Lines Matching refs:buf
29 char *buf, const int buflen) in rpc_ntop6_noscopeid() argument
40 return snprintf(buf, buflen, "::"); in rpc_ntop6_noscopeid()
48 return snprintf(buf, buflen, "::1"); in rpc_ntop6_noscopeid()
57 return snprintf(buf, buflen, "::ffff:%pI4", in rpc_ntop6_noscopeid()
63 return snprintf(buf, buflen, "%pI6c", addr); in rpc_ntop6_noscopeid()
67 char *buf, const size_t buflen) in rpc_ntop6() argument
74 len = rpc_ntop6_noscopeid(sap, buf, buflen); in rpc_ntop6()
92 strcat(buf, scopebuf); in rpc_ntop6()
99 char *buf, const int buflen) in rpc_ntop6_noscopeid() argument
105 char *buf, const size_t buflen) in rpc_ntop6() argument
113 char *buf, const size_t buflen) in rpc_ntop4() argument
117 return snprintf(buf, buflen, "%pI4", &sin->sin_addr); in rpc_ntop4()
129 size_t rpc_ntop(const struct sockaddr *sap, char *buf, const size_t buflen) in rpc_ntop() argument
133 return rpc_ntop4(sap, buf, buflen); in rpc_ntop()
135 return rpc_ntop6(sap, buf, buflen); in rpc_ntop()
142 static size_t rpc_pton4(const char *buf, const size_t buflen, in rpc_pton4() argument
153 if (in4_pton(buf, buflen, addr, '\0', NULL) == 0) in rpc_pton4()
161 static int rpc_parse_scope_id(struct net *net, const char *buf, in rpc_parse_scope_id() argument
170 if ((buf + buflen) == delim) in rpc_parse_scope_id()
179 len = (buf + buflen) - delim - 1; in rpc_parse_scope_id()
199 static size_t rpc_pton6(struct net *net, const char *buf, const size_t buflen, in rpc_pton6() argument
212 if (in6_pton(buf, buflen, addr, IPV6_SCOPE_DELIMITER, &delim) == 0) in rpc_pton6()
215 if (!rpc_parse_scope_id(net, buf, buflen, delim, sin6)) in rpc_pton6()
222 static size_t rpc_pton6(struct net *net, const char *buf, const size_t buflen, in rpc_pton6() argument
244 size_t rpc_pton(struct net *net, const char *buf, const size_t buflen, in rpc_pton() argument
250 if (buf[i] == ':') in rpc_pton()
251 return rpc_pton6(net, buf, buflen, sap, salen); in rpc_pton()
252 return rpc_pton4(buf, buflen, sap, salen); in rpc_pton()
314 char *c, buf[RPCBIND_MAXUADDRLEN + sizeof('\0')]; in rpc_uaddr2sockaddr() local
321 memcpy(buf, uaddr, uaddr_len); in rpc_uaddr2sockaddr()
323 buf[uaddr_len] = '\0'; in rpc_uaddr2sockaddr()
324 c = strrchr(buf, '.'); in rpc_uaddr2sockaddr()
331 c = strrchr(buf, '.'); in rpc_uaddr2sockaddr()
340 if (rpc_pton(net, buf, strlen(buf), sap, salen) == 0) in rpc_uaddr2sockaddr()