mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-03 18:20:29 +01:00
platform: add const to input arguments to link-add functions
Some line-breaks and adding "const".
This commit is contained in:
parent
785c263c18
commit
9ce3733d0c
4 changed files with 80 additions and 37 deletions
|
|
@ -681,7 +681,7 @@ link_vlan_change (NMPlatform *platform,
|
|||
static gboolean
|
||||
link_vxlan_add (NMPlatform *platform,
|
||||
const char *name,
|
||||
NMPlatformLnkVxlan *props,
|
||||
const NMPlatformLnkVxlan *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
NMFakePlatformLink *device;
|
||||
|
|
|
|||
|
|
@ -4206,7 +4206,7 @@ nla_put_failure:
|
|||
static int
|
||||
link_gre_add (NMPlatform *platform,
|
||||
const char *name,
|
||||
NMPlatformLnkGre *props,
|
||||
const NMPlatformLnkGre *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
nm_auto_nlmsg struct nl_msg *nlmsg = NULL;
|
||||
|
|
@ -4261,7 +4261,7 @@ nla_put_failure:
|
|||
static int
|
||||
link_ip6tnl_add (NMPlatform *platform,
|
||||
const char *name,
|
||||
NMPlatformLnkIp6Tnl *props,
|
||||
const NMPlatformLnkIp6Tnl *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
nm_auto_nlmsg struct nl_msg *nlmsg = NULL;
|
||||
|
|
@ -4322,7 +4322,7 @@ nla_put_failure:
|
|||
static int
|
||||
link_ipip_add (NMPlatform *platform,
|
||||
const char *name,
|
||||
NMPlatformLnkIpIp *props,
|
||||
const NMPlatformLnkIpIp *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
nm_auto_nlmsg struct nl_msg *nlmsg = NULL;
|
||||
|
|
@ -4374,7 +4374,7 @@ static int
|
|||
link_macvlan_add (NMPlatform *platform,
|
||||
const char *name,
|
||||
int parent,
|
||||
NMPlatformLnkMacvlan *props,
|
||||
const NMPlatformLnkMacvlan *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
nm_auto_nlmsg struct nl_msg *nlmsg = NULL;
|
||||
|
|
@ -4422,7 +4422,7 @@ nla_put_failure:
|
|||
static int
|
||||
link_sit_add (NMPlatform *platform,
|
||||
const char *name,
|
||||
NMPlatformLnkSit *props,
|
||||
const NMPlatformLnkSit *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
nm_auto_nlmsg struct nl_msg *nlmsg = NULL;
|
||||
|
|
@ -4473,7 +4473,7 @@ nla_put_failure:
|
|||
static gboolean
|
||||
link_vxlan_add (NMPlatform *platform,
|
||||
const char *name,
|
||||
NMPlatformLnkVxlan *props,
|
||||
const NMPlatformLnkVxlan *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
nm_auto_nlmsg struct nl_msg *nlmsg = NULL;
|
||||
|
|
|
|||
|
|
@ -645,7 +645,9 @@ nm_platform_link_add (NMPlatform *self,
|
|||
* Create a software ethernet-like interface
|
||||
*/
|
||||
NMPlatformError
|
||||
nm_platform_link_dummy_add (NMPlatform *self, const char *name, const NMPlatformLink **out_link)
|
||||
nm_platform_link_dummy_add (NMPlatform *self,
|
||||
const char *name,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
return nm_platform_link_add (self, name, NM_LINK_TYPE_DUMMY, NULL, 0, out_link);
|
||||
}
|
||||
|
|
@ -1485,7 +1487,9 @@ nm_platform_link_bridge_add (NMPlatform *self,
|
|||
* Create a software bonding device.
|
||||
*/
|
||||
NMPlatformError
|
||||
nm_platform_link_bond_add (NMPlatform *self, const char *name, const NMPlatformLink **out_link)
|
||||
nm_platform_link_bond_add (NMPlatform *self,
|
||||
const char *name,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
return nm_platform_link_add (self, name, NM_LINK_TYPE_BOND, NULL, 0, out_link);
|
||||
}
|
||||
|
|
@ -1499,7 +1503,9 @@ nm_platform_link_bond_add (NMPlatform *self, const char *name, const NMPlatformL
|
|||
* Create a software teaming device.
|
||||
*/
|
||||
NMPlatformError
|
||||
nm_platform_link_team_add (NMPlatform *self, const char *name, const NMPlatformLink **out_link)
|
||||
nm_platform_link_team_add (NMPlatform *self,
|
||||
const char *name,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
return nm_platform_link_add (self, name, NM_LINK_TYPE_TEAM, NULL, 0, out_link);
|
||||
}
|
||||
|
|
@ -1516,11 +1522,11 @@ nm_platform_link_team_add (NMPlatform *self, const char *name, const NMPlatformL
|
|||
*/
|
||||
NMPlatformError
|
||||
nm_platform_link_vlan_add (NMPlatform *self,
|
||||
const char *name,
|
||||
int parent,
|
||||
int vlanid,
|
||||
guint32 vlanflags,
|
||||
const NMPlatformLink **out_link)
|
||||
const char *name,
|
||||
int parent,
|
||||
int vlanid,
|
||||
guint32 vlanflags,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
NMPlatformError plerr;
|
||||
|
||||
|
|
@ -1553,7 +1559,7 @@ nm_platform_link_vlan_add (NMPlatform *self,
|
|||
NMPlatformError
|
||||
nm_platform_link_vxlan_add (NMPlatform *self,
|
||||
const char *name,
|
||||
NMPlatformLnkVxlan *props,
|
||||
const NMPlatformLnkVxlan *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
NMPlatformError plerr;
|
||||
|
|
@ -1824,7 +1830,7 @@ nm_platform_link_vlan_set_egress_map (NMPlatform *self, int ifindex, int from, i
|
|||
NMPlatformError
|
||||
nm_platform_link_gre_add (NMPlatform *self,
|
||||
const char *name,
|
||||
NMPlatformLnkGre *props,
|
||||
const NMPlatformLnkGre *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
NMPlatformError plerr;
|
||||
|
|
@ -1852,7 +1858,10 @@ nm_platform_link_gre_add (NMPlatform *self,
|
|||
}
|
||||
|
||||
NMPlatformError
|
||||
nm_platform_link_infiniband_add (NMPlatform *self, int parent, int p_key, const NMPlatformLink **out_link)
|
||||
nm_platform_link_infiniband_add (NMPlatform *self,
|
||||
int parent,
|
||||
int p_key,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
gs_free char *parent_name = NULL;
|
||||
gs_free char *name = NULL;
|
||||
|
|
@ -1959,7 +1968,7 @@ nm_platform_link_infiniband_get_properties (NMPlatform *self,
|
|||
NMPlatformError
|
||||
nm_platform_link_ip6tnl_add (NMPlatform *self,
|
||||
const char *name,
|
||||
NMPlatformLnkIp6Tnl *props,
|
||||
const NMPlatformLnkIp6Tnl *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
NMPlatformError plerr;
|
||||
|
|
@ -1998,7 +2007,7 @@ nm_platform_link_ip6tnl_add (NMPlatform *self,
|
|||
NMPlatformError
|
||||
nm_platform_link_ipip_add (NMPlatform *self,
|
||||
const char *name,
|
||||
NMPlatformLnkIpIp *props,
|
||||
const NMPlatformLnkIpIp *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
NMPlatformError plerr;
|
||||
|
|
@ -2038,7 +2047,7 @@ NMPlatformError
|
|||
nm_platform_link_macvlan_add (NMPlatform *self,
|
||||
const char *name,
|
||||
int parent,
|
||||
NMPlatformLnkMacvlan *props,
|
||||
const NMPlatformLnkMacvlan *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
NMPlatformError plerr;
|
||||
|
|
@ -2078,7 +2087,7 @@ nm_platform_link_macvlan_add (NMPlatform *self,
|
|||
NMPlatformError
|
||||
nm_platform_link_sit_add (NMPlatform *self,
|
||||
const char *name,
|
||||
NMPlatformLnkSit *props,
|
||||
const NMPlatformLnkSit *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
NMPlatformError plerr;
|
||||
|
|
|
|||
|
|
@ -529,18 +529,30 @@ typedef struct {
|
|||
gboolean egress_reset_all,
|
||||
const NMVlanQosMapping *egress_map,
|
||||
gsize n_egress_map);
|
||||
gboolean (*link_vxlan_add) (NMPlatform *, const char *name, NMPlatformLnkVxlan *props,
|
||||
gboolean (*link_vxlan_add) (NMPlatform *,
|
||||
const char *name,
|
||||
const NMPlatformLnkVxlan *props,
|
||||
const NMPlatformLink **out_link);
|
||||
|
||||
gboolean (*link_gre_add) (NMPlatform *, const char *name, NMPlatformLnkGre *props,
|
||||
gboolean (*link_gre_add) (NMPlatform *,
|
||||
const char *name,
|
||||
const NMPlatformLnkGre *props,
|
||||
const NMPlatformLink **out_link);
|
||||
gboolean (*link_ip6tnl_add) (NMPlatform *, const char *name, NMPlatformLnkIp6Tnl *props,
|
||||
gboolean (*link_ip6tnl_add) (NMPlatform *,
|
||||
const char *name,
|
||||
const NMPlatformLnkIp6Tnl *props,
|
||||
const NMPlatformLink **out_link);
|
||||
gboolean (*link_ipip_add) (NMPlatform *, const char *name, NMPlatformLnkIpIp *props,
|
||||
gboolean (*link_ipip_add) (NMPlatform *,
|
||||
const char *name,
|
||||
const NMPlatformLnkIpIp *props,
|
||||
const NMPlatformLink **out_link);
|
||||
gboolean (*link_macvlan_add) (NMPlatform *, const char *name, int parent, NMPlatformLnkMacvlan *props,
|
||||
gboolean (*link_macvlan_add) (NMPlatform *,
|
||||
const char *name,
|
||||
int parent,
|
||||
const NMPlatformLnkMacvlan *props,
|
||||
const NMPlatformLink **out_link);
|
||||
gboolean (*link_sit_add) (NMPlatform *, const char *name, NMPlatformLnkSit *props,
|
||||
gboolean (*link_sit_add) (NMPlatform *,
|
||||
const char *name,
|
||||
const NMPlatformLnkSit *props,
|
||||
const NMPlatformLink **out_link);
|
||||
|
||||
gboolean (*infiniband_partition_add) (NMPlatform *, int parent, int p_key, const NMPlatformLink **out_link);
|
||||
|
|
@ -742,7 +754,12 @@ const NMPlatformLnkSit *nm_platform_link_get_lnk_sit (NMPlatform *self, int ifin
|
|||
const NMPlatformLnkVlan *nm_platform_link_get_lnk_vlan (NMPlatform *self, int ifindex, const NMPlatformLink **out_link);
|
||||
const NMPlatformLnkVxlan *nm_platform_link_get_lnk_vxlan (NMPlatform *self, int ifindex, const NMPlatformLink **out_link);
|
||||
|
||||
NMPlatformError nm_platform_link_vlan_add (NMPlatform *self, const char *name, int parent, int vlanid, guint32 vlanflags, const NMPlatformLink **out_link);
|
||||
NMPlatformError nm_platform_link_vlan_add (NMPlatform *self,
|
||||
const char *name,
|
||||
int parent,
|
||||
int vlanid,
|
||||
guint32 vlanflags,
|
||||
const NMPlatformLink **out_link);
|
||||
gboolean nm_platform_link_vlan_set_ingress_map (NMPlatform *self, int ifindex, int from, int to);
|
||||
gboolean nm_platform_link_vlan_set_egress_map (NMPlatform *self, int ifindex, int from, int to);
|
||||
gboolean nm_platform_link_vlan_change (NMPlatform *self,
|
||||
|
|
@ -756,7 +773,10 @@ gboolean nm_platform_link_vlan_change (NMPlatform *self,
|
|||
const NMVlanQosMapping *egress_map,
|
||||
gsize n_egress_map);
|
||||
|
||||
NMPlatformError nm_platform_link_vxlan_add (NMPlatform *self, const char *name, NMPlatformLnkVxlan *props, const NMPlatformLink **out_link);
|
||||
NMPlatformError nm_platform_link_vxlan_add (NMPlatform *self,
|
||||
const char *name,
|
||||
const NMPlatformLnkVxlan *props,
|
||||
const NMPlatformLink **out_link);
|
||||
|
||||
NMPlatformError nm_platform_link_tun_add (NMPlatform *self,
|
||||
const char *name,
|
||||
|
|
@ -768,7 +788,10 @@ NMPlatformError nm_platform_link_tun_add (NMPlatform *self,
|
|||
gboolean multi_queue,
|
||||
const NMPlatformLink **out_link);
|
||||
|
||||
NMPlatformError nm_platform_link_infiniband_add (NMPlatform *self, int parent, int p_key, const NMPlatformLink **out_link);
|
||||
NMPlatformError nm_platform_link_infiniband_add (NMPlatform *self,
|
||||
int parent,
|
||||
int p_key,
|
||||
const NMPlatformLink **out_link);
|
||||
gboolean nm_platform_link_infiniband_get_properties (NMPlatform *self, int ifindex, int *parent, int *p_key, const char **mode);
|
||||
|
||||
gboolean nm_platform_link_veth_get_properties (NMPlatform *self, int ifindex, int *out_peer_ifindex);
|
||||
|
|
@ -796,15 +819,26 @@ const struct in6_addr *nm_platform_ip6_address_get_peer (const NMPlatformIP6Addr
|
|||
|
||||
const NMPlatformIP4Address *nm_platform_ip4_address_get (NMPlatform *self, int ifindex, in_addr_t address, int plen, in_addr_t peer_address);
|
||||
|
||||
NMPlatformError nm_platform_link_gre_add (NMPlatform *self, const char *name, NMPlatformLnkGre *props,
|
||||
NMPlatformError nm_platform_link_gre_add (NMPlatform *self,
|
||||
const char *name,
|
||||
const NMPlatformLnkGre *props,
|
||||
const NMPlatformLink **out_link);
|
||||
NMPlatformError nm_platform_link_ip6tnl_add (NMPlatform *self, const char *name, NMPlatformLnkIp6Tnl *props,
|
||||
NMPlatformError nm_platform_link_ip6tnl_add (NMPlatform *self,
|
||||
const char *name,
|
||||
const NMPlatformLnkIp6Tnl *props,
|
||||
const NMPlatformLink **out_link);
|
||||
NMPlatformError nm_platform_link_ipip_add (NMPlatform *self, const char *name, NMPlatformLnkIpIp *props,
|
||||
NMPlatformError nm_platform_link_ipip_add (NMPlatform *self,
|
||||
const char *name,
|
||||
const NMPlatformLnkIpIp *props,
|
||||
const NMPlatformLink **out_link);
|
||||
NMPlatformError nm_platform_link_macvlan_add (NMPlatform *self, const char *name, int parent, NMPlatformLnkMacvlan *props,
|
||||
NMPlatformError nm_platform_link_macvlan_add (NMPlatform *self,
|
||||
const char *name,
|
||||
int parent,
|
||||
const NMPlatformLnkMacvlan *props,
|
||||
const NMPlatformLink **out_link);
|
||||
NMPlatformError nm_platform_link_sit_add (NMPlatform *self, const char *name, NMPlatformLnkSit *props,
|
||||
NMPlatformError nm_platform_link_sit_add (NMPlatform *self,
|
||||
const char *name,
|
||||
const NMPlatformLnkSit *props,
|
||||
const NMPlatformLink **out_link);
|
||||
|
||||
const NMPlatformIP6Address *nm_platform_ip6_address_get (NMPlatform *self, int ifindex, struct in6_addr address, int plen);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue