Lines Matching defs:buf

29 				  char *buf, const int buflen)
40 return snprintf(buf, buflen, "::");
48 return snprintf(buf, buflen, "::1");
57 return snprintf(buf, buflen, "::ffff:%pI4",
63 return snprintf(buf, buflen, "%pI6c", addr);
67 char *buf, const size_t buflen)
74 len = rpc_ntop6_noscopeid(sap, buf, buflen);
92 strcat(buf, scopebuf);
99 char *buf, const int buflen)
105 char *buf, const size_t buflen)
113 char *buf, const size_t buflen)
117 return snprintf(buf, buflen, "%pI4", &sin->sin_addr);
121 * rpc_ntop - construct a presentation address in @buf
123 * @buf: construction area
124 * @buflen: size of @buf, in bytes
126 * Plants a %NUL-terminated string in @buf and returns the length
129 size_t rpc_ntop(const struct sockaddr *sap, char *buf, const size_t buflen)
133 return rpc_ntop4(sap, buf, buflen);
135 return rpc_ntop6(sap, buf, buflen);
142 static size_t rpc_pton4(const char *buf, const size_t buflen,
153 if (in4_pton(buf, buflen, addr, '\0', NULL) == 0)
161 static int rpc_parse_scope_id(struct net *net, const char *buf,
170 if ((buf + buflen) == delim)
179 len = (buf + buflen) - delim - 1;
199 static size_t rpc_pton6(struct net *net, const char *buf, const size_t buflen,
212 if (in6_pton(buf, buflen, addr, IPV6_SCOPE_DELIMITER, &delim) == 0)
215 if (!rpc_parse_scope_id(net, buf, buflen, delim, sin6))
222 static size_t rpc_pton6(struct net *net, const char *buf, const size_t buflen,
232 * @buf: C string containing presentation format IP address
244 size_t rpc_pton(struct net *net, const char *buf, const size_t buflen,
250 if (buf[i] == ':')
251 return rpc_pton6(net, buf, buflen, sap, salen);
252 return rpc_pton4(buf, buflen, sap, salen);
314 char *c, buf[RPCBIND_MAXUADDRLEN + sizeof('\0')];
321 memcpy(buf, uaddr, uaddr_len);
323 buf[uaddr_len] = '\0';
324 c = strrchr(buf, '.');
331 c = strrchr(buf, '.');
340 if (rpc_pton(net, buf, strlen(buf), sap, salen) == 0)