Lines Matching refs:buflen

28 				  char *buf, const int buflen)  in rpc_ntop6_noscopeid()  argument
39 return snprintf(buf, buflen, "::"); in rpc_ntop6_noscopeid()
47 return snprintf(buf, buflen, "::1"); in rpc_ntop6_noscopeid()
56 return snprintf(buf, buflen, "::ffff:%pI4", in rpc_ntop6_noscopeid()
62 return snprintf(buf, buflen, "%pI6c", addr); in rpc_ntop6_noscopeid()
66 char *buf, const size_t buflen) in rpc_ntop6() argument
73 len = rpc_ntop6_noscopeid(sap, buf, buflen); in rpc_ntop6()
88 if (unlikely(len > buflen)) in rpc_ntop6()
98 char *buf, const int buflen) in rpc_ntop6_noscopeid() argument
104 char *buf, const size_t buflen) in rpc_ntop6() argument
112 char *buf, const size_t buflen) in rpc_ntop4() argument
116 return snprintf(buf, buflen, "%pI4", &sin->sin_addr); in rpc_ntop4()
128 size_t rpc_ntop(const struct sockaddr *sap, char *buf, const size_t buflen) in rpc_ntop() argument
132 return rpc_ntop4(sap, buf, buflen); in rpc_ntop()
134 return rpc_ntop6(sap, buf, buflen); in rpc_ntop()
141 static size_t rpc_pton4(const char *buf, const size_t buflen, in rpc_pton4() argument
147 if (buflen > INET_ADDRSTRLEN || salen < sizeof(struct sockaddr_in)) in rpc_pton4()
152 if (in4_pton(buf, buflen, addr, '\0', NULL) == 0) in rpc_pton4()
161 const size_t buflen, const char *delim, in rpc_parse_scope_id() argument
167 if ((buf + buflen) == delim) in rpc_parse_scope_id()
176 len = (buf + buflen) - delim - 1; in rpc_parse_scope_id()
202 static size_t rpc_pton6(struct net *net, const char *buf, const size_t buflen, in rpc_pton6() argument
209 if (buflen > (INET6_ADDRSTRLEN + IPV6_SCOPE_ID_LEN) || in rpc_pton6()
215 if (in6_pton(buf, buflen, addr, IPV6_SCOPE_DELIMITER, &delim) == 0) in rpc_pton6()
218 if (!rpc_parse_scope_id(net, buf, buflen, delim, sin6)) in rpc_pton6()
225 static size_t rpc_pton6(struct net *net, const char *buf, const size_t buflen, in rpc_pton6() argument
247 size_t rpc_pton(struct net *net, const char *buf, const size_t buflen, in rpc_pton() argument
252 for (i = 0; i < buflen; i++) in rpc_pton()
254 return rpc_pton6(net, buf, buflen, sap, salen); in rpc_pton()
255 return rpc_pton4(buf, buflen, sap, salen); in rpc_pton()