diff options
author | Grant Erickson <gerickson@nuovations.com> | 2023-12-06 11:34:11 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2023-12-08 01:55:44 +0100 |
commit | 62a4d1fae5d626a36b8b4c2df68e6d0606225638 (patch) | |
tree | 682d4412c8165bc784615e22739086de28dd03e6 | |
parent | f23804d1520d0bb3a2f4036a32c808db07d69714 (diff) | |
download | connman-62a4d1fae5d626a36b8b4c2df68e6d0606225638.tar.gz |
connection: Document 'set_ipv4_low_priority_default_gateway'.
This adds documentation to the 'set_ipv4_low_priority_default_gateway'
function.
-rw-r--r-- | src/connection.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/connection.c b/src/connection.c index a199b9080..84b3bb1c8 100644 --- a/src/connection.c +++ b/src/connection.c @@ -2389,6 +2389,49 @@ static int set_ipv4_low_priority_default_gateway_route_cb( metric); } +/** + * @brief + * Set, or add, the IPv4 low-priority default route for the + * specified gateway data and configuration. + * + * This attempts to set, or add, the IPv4 low-priority (that is, + * metric > 0) default route for the specified gateway data and + * configuration. + * + * On success, the gateway configuration type will be set to + * #CONNMAN_GATEWAY_CONFIG_TYPE_LOW_PRIORITY_DEFAULT and its state + * to #CONNMAN_GATEWAY_CONFIG_STATE_ADDED. + * + * @param[in,out] data A pointer to the mutable gateway data to + * assign as the IPv4 low-priority default + * route. + * @param[in,out] config A pointer to the mutable gateway + * configuration to assign as the IPv4 + * low-priority default route. + * + * @retval 0 If successful. + * @retval -EINVAL If @a data or @a config are + * null; if the gateway configuration type is + * not #CONNMAN_GATEWAY_CONFIG_TYPE_NONE or + * #CONNMAN_GATEWAY_CONFIG_TYPE_LOW_PRIORITY_DEFAULT; + * or if the routing information to be set, + * or added, was invalid. + * @retval -EINPROGRESS If the state of @a config is + * #CONNMAN_GATEWAY_CONFIG_STATE_ADDED. + * @retval -EALREADY If the state of @a config is + * #CONNMAN_GATEWAY_CONFIG_STATE_ACTIVE. + * @retval -EFAULT If the address to the routing information + * to be added was invalid. + * @retval -EPERM If the current process does not have the + * credentials or capabilities to add, or + * set, routes. + * @retval -EEXIST A request was made to add an existing + * routing entry. + * + * @sa set_default_gateway_route_common + * @sa set_ipv4_low_priority_default_gateway_route_cb + * + */ static int set_ipv4_low_priority_default_gateway( struct gateway_data *data, struct gateway_config *config) |