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
168 if ((buf + buflen) == delim) in rpc_parse_scope_id()
177 len = (buf + buflen) - delim - 1; in rpc_parse_scope_id()
203 static size_t rpc_pton6(struct net *net, const char *buf, const size_t buflen, in rpc_pton6() argument
216 if (in6_pton(buf, buflen, addr, IPV6_SCOPE_DELIMITER, &delim) == 0) in rpc_pton6()
219 if (!rpc_parse_scope_id(net, buf, buflen, delim, sin6)) in rpc_pton6()
226 static size_t rpc_pton6(struct net *net, const char *buf, const size_t buflen, in rpc_pton6() argument
248 size_t rpc_pton(struct net *net, const char *buf, const size_t buflen, in rpc_pton() argument
254 if (buf[i] == ':') in rpc_pton()
255 return rpc_pton6(net, buf, buflen, sap, salen); in rpc_pton()
256 return rpc_pton4(buf, buflen, sap, salen); in rpc_pton()
318 char *c, buf[RPCBIND_MAXUADDRLEN + sizeof('\0')]; in rpc_uaddr2sockaddr() local
325 memcpy(buf, uaddr, uaddr_len); in rpc_uaddr2sockaddr()
327 buf[uaddr_len] = '\0'; in rpc_uaddr2sockaddr()
328 c = strrchr(buf, '.'); in rpc_uaddr2sockaddr()
335 c = strrchr(buf, '.'); in rpc_uaddr2sockaddr()
344 if (rpc_pton(net, buf, strlen(buf), sap, salen) == 0) in rpc_uaddr2sockaddr()