From aca647cf9d3a72bc868925059b273ee12cff7381 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sat, 16 Aug 2025 11:21:44 -0500 Subject: [PATCH] modem-helpers: document mm_parse_supl_address() More specifically, that the returned IP address is in network byte order. See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1390 Signed-off-by: Dan Williams --- src/mm-modem-helpers.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c index c6c75c9c..43d162ce 100644 --- a/src/mm-modem-helpers.c +++ b/src/mm-modem-helpers.c @@ -5502,6 +5502,20 @@ out: /*****************************************************************************/ +/** + * mm_parse_supl_address: + * @supl: SUPL server address in string form. + * @out_fqdn: Return location for SUPL server hostname/FQDN if @supl contains one. + * @out_ip: Return location for the SUPL server IP address (in network byte + * order) if @supl contains an IP address instead of a hostname/FQDN. + * @out_port: Return location for the port number from @supl, if any. + * @error: Return location for an error, or %NULL. + * + * Parses @supl into either a hostname/FQDN and port, or IP address and port, or + * returns an error if @supl is malformed. + * + * Returns: %TRUE if the operation succeeded, %FALSE if @error is set. + */ gboolean mm_parse_supl_address (const gchar *supl, gchar **out_fqdn,