-
Notifications
You must be signed in to change notification settings - Fork 108
sol-connman: Add sol-connman basic API #2068
Conversation
Sorry, I am ready for Malaysia training and fix other project issues. According to the comments of #1935 ,
Thanks for chaojie to implement the fbp test cases. Please check it. Thanks. |
5162cec
to
f720edd
Compare
* @return 0 on success, -errno on failure. | ||
*/ | ||
int sol_netctl_service_get_network_address( | ||
const struct sol_netctl_service *service, struct sol_network_link **link); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason that this function doesn't return a const struct sol_network_link *
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gustavo suggests it.
And "return -errno" is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just have a question, looking good. |
/** | ||
* @brief Gets the service name | ||
* | ||
* This function gets the name for the connman service, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no mention to connman here :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay.
Almost ready to get it, my last comments are:
|
so-netctl is for implementing connection manager features. The APIs should be implemented in Zephyr, connman and so on. To connman, the connman D-Bus APIs are wrapped in the so-netctl APIs. The user can use the so-netctl APIs to control connman. To invoke the D-Bus method of connman, the async call is used, the callback function is set to get the results of async call. The basic so-netctl APIs are in the patch. It provides the APIs of getting the name, ip address... of services. The service connect/disconnect APIs and set/get offline are implemented too. The further sol-netctl APIs are being planned. Signed-off-by: Wu Zheng <[email protected]>
Get the service properties is implemented. It based on connman and wraps the D-Bus APIs of connman services. Get the name, state, type, ip address ... of services are done. Signed-off-by: Wu Zheng <[email protected]>
sol-netctl init/shutdown are implemented. It based on connman and wraps the D-Bus APIs of connman. init/shutdown are not true to init/shutdown sol-netctl. init_lazy/shutdown_lazy are true to init/shutdown sol-netctl. Signed-off-by: Wu Zheng <[email protected]>
sol-netctl set offline is implemented. It based on connman and wraps the D-Bus APIs of connman. It sets the connman to offline mode. It will close the all connection interfaces(including ethernet ...). Signed-off-by: Wu Zheng <[email protected]>
Get connection manager state is implemented. It based on connman and wraps the D-Bus APIs of connman. Get connection manager state is from connman. It includes online, ready, offline, idle. Signed-off-by: Wu Zheng <[email protected]>
Get services properties is implemented. It based on connman and wraps the D-Bus APIs of connman. It only is invoked internal and in the process of init lazy. Get services properties APIs can't invoke the D-Bus APIs of connman directly. Signed-off-by: Wu Zheng <[email protected]>
Add/del monitors functions are implemented. It based on connman and wraps the D-Bus APIs of connman. After add the monitors, the connman services and connection manager state are monitored. After del the monitors, the related network info can't be monitored. Signed-off-by: Wu Zheng <[email protected]>
Monitor callback functions are implemented. It based on connman and wraps the D-Bus APIs of connman. When Netctl monitor is added, callback function need to be registered. when any services properties and connection manager state are changed, the callback functions can be invoked to notify the related info. Signed-off-by: Wu Zheng <[email protected]>
Network devices connect/disconnect are implemented. It based on connman and wraps the D-Bus APIs of connman. Signed-off-by: Wu Zheng <[email protected]>
Get services list is implemented. It based on connman and wraps the D-Bus APIs of connman. The user can use the API to get services list. Signed-off-by: Wu Zheng <[email protected]>
Add sol-netctl build files, so that sol-netctl API can be built. Signed-off-by: Wu Zheng <[email protected]>
The test cases will test sol-netctl APIs Signed-off-by: Wu Zheng <[email protected]>
The init and shutdown process of sol-netctl need to be added to the init and shutdown process of sol-comms. Signed-off-by: Wu Zheng <[email protected]>
Please check #2087 for the new version. |
so-connman is for implementing connection manager features.
The APIs should be implemented in Zephyr, connman and so on.
The patches are for implementing sol-connman basic APIs to connman.
the connman D-Bus APIs are wrapped in the so-connman APIs.
The user can use the so-connman APIs to control connman.
Signed-off-by: Wu Zheng [email protected]