diff options
Diffstat (limited to 'include/apr_network_io.h')
-rw-r--r-- | include/apr_network_io.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/apr_network_io.h b/include/apr_network_io.h index 43e578aca47e..7d6957bc763e 100644 --- a/include/apr_network_io.h +++ b/include/apr_network_io.h @@ -441,6 +441,31 @@ APR_DECLARE(apr_status_t) apr_sockaddr_info_copy(apr_sockaddr_t **dst, const apr_sockaddr_t *src, apr_pool_t *p); +/* Set the zone of an IPv6 link-local address object. + * @param sa Socket address object + * @param zone_id Zone ID (textual "eth0" or numeric "3"). + * @return Returns APR_EBADIP for non-IPv6 socket or an IPv6 address + * which isn't link-local. + */ +APR_DECLARE(apr_status_t) apr_sockaddr_zone_set(apr_sockaddr_t *sa, + const char *zone_id); + + +/* Retrieve the zone of an IPv6 link-local address object. + * @param sa Socket address object + * @param name If non-NULL, set to the textual representation of the zone id + * @param id If non-NULL, set to the integer zone id + * @param p Pool from which *name is allocated if used. + * @return Returns APR_EBADIP for non-IPv6 socket or socket without any zone id + * set, or other error if the interface could not be mapped to a name. + * @remark Both name and id may be NULL, neither are modified if + * non-NULL in error cases. + */ +APR_DECLARE(apr_status_t) apr_sockaddr_zone_get(const apr_sockaddr_t *sa, + const char **name, + apr_uint32_t *id, + apr_pool_t *p); + /** * Look up the host name from an apr_sockaddr_t. * @param hostname The hostname. |