summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sockaddr_str.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/sockaddr_str.c b/src/sockaddr_str.c
index 5c548b40..304363d9 100644
--- a/src/sockaddr_str.c
+++ b/src/sockaddr_str.c
@@ -255,7 +255,7 @@ int osmo_sockaddr_str_from_in6_addr(struct osmo_sockaddr_str *sockaddr_str, cons
return 0;
}
-/*! Convert IPv4 address from 32bit host-byte-order to osmo_sockaddr_str, and set port.
+/*! Convert IPv4 address from 32bit network-byte-order to osmo_sockaddr_str, and set port.
* \param[out] sockaddr_str The instance to copy to.
* \param[in] addr 32bit IPv4 address data.
* \param[in] port Port number.
@@ -270,7 +270,8 @@ int osmo_sockaddr_str_from_32(struct osmo_sockaddr_str *sockaddr_str, uint32_t i
return osmo_sockaddr_str_from_in_addr(sockaddr_str, &addr, port);
}
-/*! Convert IPv4 address from 32bit network-byte-order to osmo_sockaddr_str, and set port.
+/*! Convert IPv4 address from 32bit host-byte-order to osmo_sockaddr_str, and set port.
+ * For legacy reasons, this function has a misleading 'n' in its name.
* \param[out] sockaddr_str The instance to copy to.
* \param[in] addr 32bit IPv4 address data.
* \param[in] port Port number.
@@ -376,9 +377,9 @@ int osmo_sockaddr_str_to_in6_addr(const struct osmo_sockaddr_str *sockaddr_str,
return 0;
}
-/*! Convert osmo_sockaddr_str address string to IPv4 address data in host-byte-order.
+/*! Convert osmo_sockaddr_str address string to IPv4 address data in network-byte-order.
* \param[in] sockaddr_str The instance to convert the IP of.
- * \param[out] dst IPv4 address data in 32bit host-byte-order format to write to.
+ * \param[out] dst IPv4 address data in 32bit network-byte-order format to write to.
* \return 0 on success, negative on error (e.g. invalid IPv4 address string).
*/
int osmo_sockaddr_str_to_32(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip)
@@ -396,9 +397,10 @@ int osmo_sockaddr_str_to_32(const struct osmo_sockaddr_str *sockaddr_str, uint32
return 0;
}
-/*! Convert osmo_sockaddr_str address string to IPv4 address data in network-byte-order.
+/*! Convert osmo_sockaddr_str address string to IPv4 address data in host-byte-order.
+ * For legacy reasons, this function has a misleading 'n' in its name.
* \param[in] sockaddr_str The instance to convert the IP of.
- * \param[out] dst IPv4 address data in 32bit network-byte-order format to write to.
+ * \param[out] dst IPv4 address data in 32bit host-byte-order format to write to.
* \return 0 on success, negative on error (e.g. invalid IPv4 address string).
*/
int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip)