Hi Daniel,
On 2/14/20 10:33 AM, Daniel Wagner wrote:
This just copies over the code from iwd. No changes there except the
prefix of the functions name.
Unfortunatly, the unit test can only test the get/dump function
because the setters need root permissions. For this we need some sort
of sandbox. Does anyone have any ideas for this?
While writing the test case I noticed some inconsistency in the naming
sceme:
The IPv6 functions are consistent in the naming sceme, always
append ipv6 after the first name:
rtnl_ifaddr_ipv6_extract
rtnl_ifaddr_ipv6_get
rtnl_ifaddr_ipv6_add
rtnl_ifaddr_ipv6_delete
rtnl_route_ipv6_add_gateway
rtnl_route_ipv6_delete_gateway
For the IPv4 functions it's either a plain 'ifaddr' infix or somewhere ipv4
in the name:
rtnl_ifaddr_extract
rtnl_ifaddr_get
rtnl_ifaddr_add
rtnl_ifaddr_delete
rtnl_route_extract_ipv4
rtnl_route_dump_ipv4
-> drop ipv4?
rtnl_route_ipv4_add_connected
rtnl_route_ipv4_add_gateway
-> drop ipv4?
And there are the setters:
rtnl_set_linkmode_and_operstate
rtnl_set_mac
rtnl_set_powered
Is this the standard naming sceme?
Both applied. Now lets fix these up as discussed on IRC.
Regards,
-Denis