mbox series

[0/2] inet: Add and Document '__connman_inet_rtnl_recv'.

Message ID 20231214172712.2083929-1-gerickson@nuovations.com (mailing list archive)
Headers show
Series inet: Add and Document '__connman_inet_rtnl_recv'. | expand

Message

Grant Erickson Dec. 14, 2023, 5:27 p.m. UTC
This refactors the private, file-scope interface 'inet_rtnl_recv' into
a separate semi-public, project-scope interface
'__connman_inet_rtnl_recv'.

Currently, 'inet_rtnl_recv' is intended to be used as a glib runloop
helper in conjunction with '__connman_inet_rtnl_talk' for longer or
multi-phase Routing Netlink (rtnl) interactions.

However, for short, concise open/send/recv/close Routing Netlink
(rtnl) interactions in which there is a single request/response phase
or the complexity of an asynchronous run loop interaction is not
needed, there is not an appropriate 'recv' interface to peer with
open/send/close.

With this change, the core of 'inet_rtnl_recv' is factored out into
that missing 'recv' interface, '__connman_inet_rtnl_recv' with
'inet_rtnl_recv' invoking it.

Grant Erickson (2):
  inet: Add '__connman_inet_rtnl_recv'.
  connection: Document '__connman_inet_rtnl_recv'.

 src/connman.h |  3 +-
 src/inet.c    | 87 ++++++++++++++++++++++++++++++++++++++++++---------
 2 files changed, 75 insertions(+), 15 deletions(-)

Comments

Marcel Holtmann Dec. 15, 2023, 8:45 a.m. UTC | #1
Hi Grant,

> This refactors the private, file-scope interface 'inet_rtnl_recv' into
> a separate semi-public, project-scope interface
> '__connman_inet_rtnl_recv'.
> 
> Currently, 'inet_rtnl_recv' is intended to be used as a glib runloop
> helper in conjunction with '__connman_inet_rtnl_talk' for longer or
> multi-phase Routing Netlink (rtnl) interactions.
> 
> However, for short, concise open/send/recv/close Routing Netlink
> (rtnl) interactions in which there is a single request/response phase
> or the complexity of an asynchronous run loop interaction is not
> needed, there is not an appropriate 'recv' interface to peer with
> open/send/close.
> 
> With this change, the core of 'inet_rtnl_recv' is factored out into
> that missing 'recv' interface, '__connman_inet_rtnl_recv' with
> 'inet_rtnl_recv' invoking it.
> 
> Grant Erickson (2):
>  inet: Add '__connman_inet_rtnl_recv'.
>  connection: Document '__connman_inet_rtnl_recv'.
> 
> src/connman.h |  3 +-
> src/inet.c    | 87 ++++++++++++++++++++++++++++++++++++++++++---------
> 2 files changed, 75 insertions(+), 15 deletions(-)

patch has been applied.

Regards

Marcel