aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/event2/buffer.h3
-rw-r--r--include/event2/util.h6
2 files changed, 8 insertions, 1 deletions
diff --git a/include/event2/buffer.h b/include/event2/buffer.h
index 468588b..88af3ae 100644
--- a/include/event2/buffer.h
+++ b/include/event2/buffer.h
@@ -726,7 +726,8 @@ int evbuffer_write_atmost(struct evbuffer *buffer, evutil_socket_t fd,
@param buffer the evbuffer to store the result
@param fd the file descriptor to read from
- @param howmuch the number of bytes to be read
+ @param howmuch the number of bytes to be read. If the given number is negative
+ or out of maximum bytes per one read, as many bytes as we can will be read.
@return the number of bytes read, or -1 if an error occurred
@see evbuffer_write()
*/
diff --git a/include/event2/util.h b/include/event2/util.h
index e6df628..02aa7ba 100644
--- a/include/event2/util.h
+++ b/include/event2/util.h
@@ -612,6 +612,12 @@ int evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap)
/** Replacement for inet_ntop for platforms which lack it. */
EVENT2_EXPORT_SYMBOL
const char *evutil_inet_ntop(int af, const void *src, char *dst, size_t len);
+/** Variation of inet_pton that also parses IPv6 scopes. Public for
+ unit tests. No reason to call this directly.
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_inet_pton_scope(int af, const char *src, void *dst,
+ unsigned *indexp);
/** Replacement for inet_pton for platforms which lack it. */
EVENT2_EXPORT_SYMBOL
int evutil_inet_pton(int af, const char *src, void *dst);