Commit 820766db authored by Vladimír Čunát's avatar Vladimír Čunát

lib/utils: more docs

It's perhaps unfortunate that the output value of buflen had +1 change
in meaning in commit 19a3cad6, but the name clearly indicates that we
care about length of the buffer, i.e. space terminating zero *is*
counted on input, so let's be consistent and count it on output as well.
parent 6b38f42d
......@@ -281,9 +281,14 @@ uint16_t kr_inaddr_port(const struct sockaddr *addr);
/** Set port. */
void kr_inaddr_set_port(struct sockaddr *addr, uint16_t port);
/** String representation for given address as "<addr>#<port>" */
/** Write string representation for given address as "<addr>#<port>".
* \param[in] addr the raw address
* \param[out] buf the buffer for output string
* \param[in,out] buflen the available(in) and utilized(out) length, including \0 */
int kr_inaddr_str(const struct sockaddr *addr, char *buf, size_t *buflen);
/** Return address type for string. */
int kr_straddr_family(const char *addr);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment