aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Erickson <gerickson@nuovations.com>2023-12-14 16:10:27 -0800
committerMarcel Holtmann <marcel@holtmann.org>2023-12-15 09:49:19 +0100
commit030c2d198b7c65f75877d4adccc2b0e6edabfddb (patch)
treed4b13737f0f7f777206951d9eee34e45804410b9
parent78ef72ece9c547db452d80cc9c995de1c8ceb09c (diff)
downloadconnman-030c2d198b7c65f75877d4adccc2b0e6edabfddb.tar.gz
connection: Document 'inet_get_addr_data'.
This adds documentation to the 'inet_get_addr_data' function.
-rw-r--r--src/inet.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/inet.c b/src/inet.c
index cb2fa4f11..cc450355b 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -597,6 +597,37 @@ static const char *rtnl_route_cmd2string(int cmd)
return "";
}
+/**
+ * @brief
+ * Convert the specified address from text to binary form.
+ *
+ * This attempts to converts the specified address in text form into
+ * binary form in network (that is, big endian) byte order, according
+ * to the specified address family.
+ *
+ * @param[in] family The address family describing the
+ * address pointed to by @a addr_string.
+ * @param[in] addr_string A pointer to an immutable null-
+ * terminated C string containing the
+ * address, in text form, to convert to
+ * binary form.
+ * @param[in,out] addr_data A pointer to storage sufficiently
+ * large to hold @a addr_string
+ * converted into binary form. This will
+ * point to the converted binary address
+ * data on success.
+ *
+ * @retval 0 If successful.
+ * @retval -EINVAL If @a addr_string or @a addr_data are
+ * null or @a addr_string does not contain a
+ * character string representing a valid
+ * network address in @a family.
+ * @retval -EAFNOSUPPORT If @ family does not contain a valid
+ * address family.
+ *
+ * @sa inet_pton
+ *
+ */
static int inet_get_addr_data(int family,
const char *addr_string,
void *addr_data)