diff mbox series

[2/2] ipconfig: Document '__connman_ipconfig_gateway_{add,remove}'.

Message ID 20231128192304.1179479-3-gerickson@nuovations.com (mailing list archive)
State Not Applicable, archived
Headers show
Series ipconfig: Add DBG and Documentation to '__connman_ipconfig_gateway_{add,remove}' | expand

Commit Message

Grant Erickson Nov. 28, 2023, 7:23 p.m. UTC
This adds documentation to the
'__connman_ipconfig_gateway_{add,remove}' functions.
---
 src/ipconfig.c | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
diff mbox series

Patch

diff --git a/src/ipconfig.c b/src/ipconfig.c
index 7c3418d51982..2ca4483ce61c 100644
--- a/src/ipconfig.c
+++ b/src/ipconfig.c
@@ -1326,6 +1326,31 @@  void __connman_ipconfig_set_gateway(struct connman_ipconfig *ipconfig,
 	ipconfig->address->gateway = g_strdup(gateway);
 }
 
+/**
+ *  @brief
+ *    Add, or set, the gateway, or default router, for a network
+ *    service.
+ *
+ *  This attempts to add, or set, the gateway, or default router, for
+ *  a network service using the specified IP configuration.
+ *
+ *  @param[in]  ipconfig  A pointer to the immutable IP configuration
+ *                        containing the network interface index @a
+ *                        index as the lookup key for the network
+ *                        service for which to add, or set, the
+ *                        gateway.
+ *
+ *  @retval  0        If successful.
+ *  @retval  -EINVAL  If the @a address field of @a ipconfig is null,
+ *                    if a cooresponding service cannot be found for
+ *                    the network interface index @a index of @a
+ *                    ipconfig, or if the network interface index
+ *                    associated with @a service is invalid.
+ *
+ *  @sa __connman_ipconfig_gateway_remove
+ *  @sa __connman_connection_gateway_add
+ *
+ */
 int __connman_ipconfig_gateway_add(const struct connman_ipconfig *ipconfig)
 {
 	struct connman_service *service;
@@ -1357,6 +1382,24 @@  int __connman_ipconfig_gateway_add(const struct connman_ipconfig *ipconfig)
 	return 0;
 }
 
+/**
+ *  @brief
+ *    Remove, or clear, the gateway, or default router, for a network
+ *    service.
+ *
+ *  This attempts to remove, or clear, the gateway, or default router, for
+ *  a network service using the specified IP configuration.
+ *
+ *  @param[in]  ipconfig  A pointer to the immutable IP configuration
+ *                        containing the network interface index @a
+ *                        index as the lookup key for the network
+ *                        service for which to remove, or clear, the
+ *                        gateway.
+ *
+ *  @sa __connman_ipconfig_gateway_add
+ *  @sa __connman_connection_gateway_remove
+ *
+ */
 void __connman_ipconfig_gateway_remove(const struct connman_ipconfig *ipconfig)
 {
 	struct connman_service *service;