mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 02:30:11 +01:00
platform: implement hash function for NMPlatformLnk types
This commit is contained in:
parent
d2f856fb95
commit
55e66cc7e6
5 changed files with 203 additions and 17 deletions
|
|
@ -388,6 +388,12 @@ NM_HASH_COMBINE (guint h, guint val)
|
|||
return (h << 5) + h + val;
|
||||
}
|
||||
|
||||
static inline guint
|
||||
NM_HASH_COMBINE_UINT64 (guint h, guint64 val)
|
||||
{
|
||||
return NM_HASH_COMBINE (h, (((guint) val) & 0xFFFFFFFFu) + ((guint) (val >> 32)));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* NM_CACHED_QUARK() returns the GQuark for @string, but caches
|
||||
|
|
|
|||
|
|
@ -111,6 +111,12 @@ extern const NMIPAddr nm_ip_addr_zero;
|
|||
|
||||
guint nm_utils_in6_addr_hash (const struct in6_addr *addr);
|
||||
|
||||
static inline guint
|
||||
NM_HASH_COMBINE_IN6_ADDR (guint h, const struct in6_addr *addr)
|
||||
{
|
||||
return NM_HASH_COMBINE (h, addr ? nm_utils_in6_addr_hash (addr) : 0);
|
||||
}
|
||||
|
||||
gboolean nm_ethernet_address_is_valid (gconstpointer addr, gssize len);
|
||||
|
||||
gconstpointer nm_utils_ipx_address_clear_host_address (int family, gpointer dst, gconstpointer src, guint8 plen);
|
||||
|
|
|
|||
|
|
@ -4210,6 +4210,24 @@ nm_platform_link_cmp (const NMPlatformLink *a, const NMPlatformLink *b)
|
|||
return 0;
|
||||
}
|
||||
|
||||
guint
|
||||
nm_platform_lnk_gre_hash (const NMPlatformLnkGre *obj)
|
||||
{
|
||||
guint h = 1887023311;
|
||||
|
||||
h = NM_HASH_COMBINE (h, obj->parent_ifindex);
|
||||
h = NM_HASH_COMBINE (h, obj->input_flags);
|
||||
h = NM_HASH_COMBINE (h, obj->output_flags);
|
||||
h = NM_HASH_COMBINE (h, obj->input_key);
|
||||
h = NM_HASH_COMBINE (h, obj->output_key);
|
||||
h = NM_HASH_COMBINE (h, obj->local);
|
||||
h = NM_HASH_COMBINE (h, obj->remote);
|
||||
h = NM_HASH_COMBINE (h, obj->ttl);
|
||||
h = NM_HASH_COMBINE (h, obj->tos);
|
||||
h = NM_HASH_COMBINE (h, !obj->path_mtu_discovery);
|
||||
return h;
|
||||
}
|
||||
|
||||
int
|
||||
nm_platform_lnk_gre_cmp (const NMPlatformLnkGre *a, const NMPlatformLnkGre *b)
|
||||
{
|
||||
|
|
@ -4227,6 +4245,17 @@ nm_platform_lnk_gre_cmp (const NMPlatformLnkGre *a, const NMPlatformLnkGre *b)
|
|||
return 0;
|
||||
}
|
||||
|
||||
guint
|
||||
nm_platform_lnk_infiniband_hash (const NMPlatformLnkInfiniband *obj)
|
||||
{
|
||||
guint h = 1748638583;
|
||||
|
||||
h = NM_HASH_COMBINE (h, obj->p_key);
|
||||
if (obj->mode)
|
||||
h = NM_HASH_COMBINE (h, g_str_hash (obj->mode));
|
||||
return h;
|
||||
}
|
||||
|
||||
int
|
||||
nm_platform_lnk_infiniband_cmp (const NMPlatformLnkInfiniband *a, const NMPlatformLnkInfiniband *b)
|
||||
{
|
||||
|
|
@ -4236,6 +4265,22 @@ nm_platform_lnk_infiniband_cmp (const NMPlatformLnkInfiniband *a, const NMPlatfo
|
|||
return 0;
|
||||
}
|
||||
|
||||
guint
|
||||
nm_platform_lnk_ip6tnl_hash (const NMPlatformLnkIp6Tnl *obj)
|
||||
{
|
||||
guint h = 1651660009;
|
||||
|
||||
h = NM_HASH_COMBINE (h, obj->parent_ifindex);
|
||||
h = NM_HASH_COMBINE (h, nm_utils_in6_addr_hash (&obj->local));
|
||||
h = NM_HASH_COMBINE (h, nm_utils_in6_addr_hash (&obj->remote));
|
||||
h = NM_HASH_COMBINE (h, obj->ttl);
|
||||
h = NM_HASH_COMBINE (h, obj->tclass);
|
||||
h = NM_HASH_COMBINE (h, obj->encap_limit);
|
||||
h = NM_HASH_COMBINE (h, obj->flow_label);
|
||||
h = NM_HASH_COMBINE (h, obj->proto);
|
||||
return h;
|
||||
}
|
||||
|
||||
int
|
||||
nm_platform_lnk_ip6tnl_cmp (const NMPlatformLnkIp6Tnl *a, const NMPlatformLnkIp6Tnl *b)
|
||||
{
|
||||
|
|
@ -4251,6 +4296,20 @@ nm_platform_lnk_ip6tnl_cmp (const NMPlatformLnkIp6Tnl *a, const NMPlatformLnkIp6
|
|||
return 0;
|
||||
}
|
||||
|
||||
guint
|
||||
nm_platform_lnk_ipip_hash (const NMPlatformLnkIpIp *obj)
|
||||
{
|
||||
guint h = 861934429;
|
||||
|
||||
h = NM_HASH_COMBINE (h, obj->parent_ifindex);
|
||||
h = NM_HASH_COMBINE (h, obj->local);
|
||||
h = NM_HASH_COMBINE (h, obj->remote);
|
||||
h = NM_HASH_COMBINE (h, obj->ttl);
|
||||
h = NM_HASH_COMBINE (h, obj->tos);
|
||||
h = NM_HASH_COMBINE (h, obj->path_mtu_discovery);
|
||||
return h;
|
||||
}
|
||||
|
||||
int
|
||||
nm_platform_lnk_ipip_cmp (const NMPlatformLnkIpIp *a, const NMPlatformLnkIpIp *b)
|
||||
{
|
||||
|
|
@ -4264,6 +4323,26 @@ nm_platform_lnk_ipip_cmp (const NMPlatformLnkIpIp *a, const NMPlatformLnkIpIp *b
|
|||
return 0;
|
||||
}
|
||||
|
||||
guint
|
||||
nm_platform_lnk_macsec_hash (const NMPlatformLnkMacsec *obj)
|
||||
{
|
||||
guint h = 226984267;
|
||||
|
||||
h = NM_HASH_COMBINE (h, obj->sci);
|
||||
h = NM_HASH_COMBINE_UINT64 (h, obj->icv_length);
|
||||
h = NM_HASH_COMBINE_UINT64 (h, obj->cipher_suite);
|
||||
h = NM_HASH_COMBINE (h, obj->window);
|
||||
h = NM_HASH_COMBINE (h, obj->encoding_sa);
|
||||
h = NM_HASH_COMBINE (h, obj->validation);
|
||||
h = NM_HASH_COMBINE (h, obj->encrypt);
|
||||
h = NM_HASH_COMBINE (h, obj->protect);
|
||||
h = NM_HASH_COMBINE (h, obj->include_sci);
|
||||
h = NM_HASH_COMBINE (h, obj->es);
|
||||
h = NM_HASH_COMBINE (h, obj->scb);
|
||||
h = NM_HASH_COMBINE (h, obj->replay_protect);
|
||||
return h;
|
||||
}
|
||||
|
||||
int
|
||||
nm_platform_lnk_macsec_cmp (const NMPlatformLnkMacsec *a, const NMPlatformLnkMacsec *b)
|
||||
{
|
||||
|
|
@ -4283,6 +4362,17 @@ nm_platform_lnk_macsec_cmp (const NMPlatformLnkMacsec *a, const NMPlatformLnkMac
|
|||
return 0;
|
||||
}
|
||||
|
||||
guint
|
||||
nm_platform_lnk_macvlan_hash (const NMPlatformLnkMacvlan *obj)
|
||||
{
|
||||
guint h = 771014989;
|
||||
|
||||
h = NM_HASH_COMBINE (h, obj->mode);
|
||||
h = NM_HASH_COMBINE (h, obj->no_promisc);
|
||||
h = NM_HASH_COMBINE (h, obj->tap);
|
||||
return h;
|
||||
}
|
||||
|
||||
int
|
||||
nm_platform_lnk_macvlan_cmp (const NMPlatformLnkMacvlan *a, const NMPlatformLnkMacvlan *b)
|
||||
{
|
||||
|
|
@ -4293,6 +4383,22 @@ nm_platform_lnk_macvlan_cmp (const NMPlatformLnkMacvlan *a, const NMPlatformLnkM
|
|||
return 0;
|
||||
}
|
||||
|
||||
guint
|
||||
nm_platform_lnk_sit_hash (const NMPlatformLnkSit *obj)
|
||||
{
|
||||
guint h = 1690154969;
|
||||
|
||||
h = NM_HASH_COMBINE (h, obj->parent_ifindex);
|
||||
h = NM_HASH_COMBINE (h, obj->local);
|
||||
h = NM_HASH_COMBINE (h, obj->remote);
|
||||
h = NM_HASH_COMBINE (h, obj->ttl);
|
||||
h = NM_HASH_COMBINE (h, obj->tos);
|
||||
h = NM_HASH_COMBINE (h, obj->path_mtu_discovery);
|
||||
h = NM_HASH_COMBINE (h, obj->flags);
|
||||
h = NM_HASH_COMBINE (h, obj->proto);
|
||||
return h;
|
||||
}
|
||||
|
||||
int
|
||||
nm_platform_lnk_sit_cmp (const NMPlatformLnkSit *a, const NMPlatformLnkSit *b)
|
||||
{
|
||||
|
|
@ -4308,6 +4414,16 @@ nm_platform_lnk_sit_cmp (const NMPlatformLnkSit *a, const NMPlatformLnkSit *b)
|
|||
return 0;
|
||||
}
|
||||
|
||||
guint
|
||||
nm_platform_lnk_vlan_hash (const NMPlatformLnkVlan *obj)
|
||||
{
|
||||
guint h = 58751383;
|
||||
|
||||
h = NM_HASH_COMBINE (h, obj->id);
|
||||
h = NM_HASH_COMBINE (h, obj->flags);
|
||||
return h;
|
||||
}
|
||||
|
||||
int
|
||||
nm_platform_lnk_vlan_cmp (const NMPlatformLnkVlan *a, const NMPlatformLnkVlan *b)
|
||||
{
|
||||
|
|
@ -4317,6 +4433,32 @@ nm_platform_lnk_vlan_cmp (const NMPlatformLnkVlan *a, const NMPlatformLnkVlan *b
|
|||
return 0;
|
||||
}
|
||||
|
||||
guint
|
||||
nm_platform_lnk_vxlan_hash (const NMPlatformLnkVxlan *obj)
|
||||
{
|
||||
guint h = 461041297;
|
||||
|
||||
h = NM_HASH_COMBINE (h, obj->parent_ifindex);
|
||||
h = NM_HASH_COMBINE (h, obj->id);
|
||||
h = NM_HASH_COMBINE (h, obj->group);
|
||||
h = NM_HASH_COMBINE (h, obj->local);
|
||||
h = NM_HASH_COMBINE_IN6_ADDR (h, &obj->group6);
|
||||
h = NM_HASH_COMBINE_IN6_ADDR (h, &obj->local6);
|
||||
h = NM_HASH_COMBINE (h, obj->tos);
|
||||
h = NM_HASH_COMBINE (h, obj->ttl);
|
||||
h = NM_HASH_COMBINE (h, obj->learning);
|
||||
h = NM_HASH_COMBINE (h, obj->ageing);
|
||||
h = NM_HASH_COMBINE (h, obj->limit);
|
||||
h = NM_HASH_COMBINE (h, obj->dst_port);
|
||||
h = NM_HASH_COMBINE (h, obj->src_port_min);
|
||||
h = NM_HASH_COMBINE (h, obj->src_port_max);
|
||||
h = NM_HASH_COMBINE (h, obj->proxy);
|
||||
h = NM_HASH_COMBINE (h, obj->rsc);
|
||||
h = NM_HASH_COMBINE (h, obj->l2miss);
|
||||
h = NM_HASH_COMBINE (h, obj->l3miss);
|
||||
return h;
|
||||
}
|
||||
|
||||
int
|
||||
nm_platform_lnk_vxlan_cmp (const NMPlatformLnkVxlan *a, const NMPlatformLnkVxlan *b)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
int parent_ifindex;
|
||||
guint64 sci; /* host byte order */
|
||||
guint64 sci; /* host byte order */
|
||||
guint64 cipher_suite;
|
||||
guint32 window;
|
||||
guint8 icv_length;
|
||||
|
|
@ -1029,6 +1029,15 @@ guint nm_platform_ip4_address_hash (const NMPlatformIP4Address *obj);
|
|||
guint nm_platform_ip6_address_hash (const NMPlatformIP6Address *obj);
|
||||
guint nm_platform_ip4_route_hash (const NMPlatformIP4Route *obj);
|
||||
guint nm_platform_ip6_route_hash (const NMPlatformIP6Route *obj);
|
||||
guint nm_platform_lnk_gre_hash (const NMPlatformLnkGre *obj);
|
||||
guint nm_platform_lnk_infiniband_hash (const NMPlatformLnkInfiniband *obj);
|
||||
guint nm_platform_lnk_ip6tnl_hash (const NMPlatformLnkIp6Tnl *obj);
|
||||
guint nm_platform_lnk_ipip_hash (const NMPlatformLnkIpIp *obj);
|
||||
guint nm_platform_lnk_macsec_hash (const NMPlatformLnkMacsec *obj);
|
||||
guint nm_platform_lnk_macvlan_hash (const NMPlatformLnkMacvlan *obj);
|
||||
guint nm_platform_lnk_sit_hash (const NMPlatformLnkSit *obj);
|
||||
guint nm_platform_lnk_vlan_hash (const NMPlatformLnkVlan *obj);
|
||||
guint nm_platform_lnk_vxlan_hash (const NMPlatformLnkVxlan *obj);
|
||||
|
||||
gboolean nm_platform_check_support_kernel_extended_ifa_flags (NMPlatform *self);
|
||||
gboolean nm_platform_check_support_user_ipv6ll (NMPlatform *self);
|
||||
|
|
|
|||
|
|
@ -335,6 +335,20 @@ _dedup_multi_idx_type_init (DedupMultiIdxType *idx_type, NMPCacheIdType cache_id
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
static guint
|
||||
_vlan_xgress_qos_mappings_hash (guint n_map,
|
||||
const NMVlanQosMapping *map)
|
||||
{
|
||||
guint h = 1453577309;
|
||||
guint i;
|
||||
|
||||
for (i = 0; i < n_map; i++) {
|
||||
h = NM_HASH_COMBINE (h, map[i].from);
|
||||
h = NM_HASH_COMBINE (h, map[i].to);
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
||||
static int
|
||||
_vlan_xgress_qos_mappings_cmp (guint n_map,
|
||||
const NMVlanQosMapping *map1,
|
||||
|
|
@ -887,16 +901,25 @@ _vt_cmd_obj_hash_link (const NMPObject *obj)
|
|||
|
||||
h = NM_HASH_COMBINE (h, nm_platform_link_hash (&obj->link));
|
||||
h = NM_HASH_COMBINE (h, obj->_link.netlink.is_in_netlink);
|
||||
/* TODO: properly hash lnk objects. */
|
||||
h = NM_HASH_COMBINE (h, !!obj->_link.netlink.lnk);
|
||||
if (obj->_link.netlink.lnk)
|
||||
h = NM_HASH_COMBINE (h, nmp_object_hash (obj->_link.netlink.lnk));
|
||||
h = NM_HASH_COMBINE (h, GPOINTER_TO_UINT (obj->_link.udev.device));
|
||||
return h;
|
||||
}
|
||||
|
||||
static guint
|
||||
_vt_cmd_plobj_hash_not_implemented (const NMPlatformObject *obj)
|
||||
_vt_cmd_obj_hash_lnk_vlan (const NMPObject *obj)
|
||||
{
|
||||
g_return_val_if_reached (0);
|
||||
guint h = 914932607;
|
||||
|
||||
nm_assert (NMP_OBJECT_GET_TYPE (obj) == NMP_OBJECT_TYPE_LNK_VLAN);
|
||||
|
||||
h = NM_HASH_COMBINE (h, nm_platform_lnk_vlan_hash (&obj->lnk_vlan));
|
||||
h = NM_HASH_COMBINE (h, _vlan_xgress_qos_mappings_hash (obj->_lnk_vlan.n_ingress_qos_map,
|
||||
obj->_lnk_vlan.ingress_qos_map));
|
||||
h = NM_HASH_COMBINE (h, _vlan_xgress_qos_mappings_hash (obj->_lnk_vlan.n_egress_qos_map,
|
||||
obj->_lnk_vlan.egress_qos_map));
|
||||
return h;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
@ -2431,7 +2454,7 @@ const NMPClass _nmp_classes[NMP_OBJECT_TYPE_MAX] = {
|
|||
.cmd_plobj_id_hash = _vt_cmd_plobj_id_hash_link,
|
||||
.cmd_plobj_to_string_id = _vt_cmd_plobj_to_string_id_link,
|
||||
.cmd_plobj_to_string = (const char *(*) (const NMPlatformObject *obj, char *buf, gsize len)) nm_platform_link_to_string,
|
||||
.cmd_plobj_hash = _vt_cmd_plobj_hash_not_implemented,
|
||||
.cmd_plobj_hash = (guint (*) (const NMPlatformObject *obj)) nm_platform_link_hash,
|
||||
.cmd_plobj_cmp = (int (*) (const NMPlatformObject *obj1, const NMPlatformObject *obj2)) nm_platform_link_cmp,
|
||||
},
|
||||
[NMP_OBJECT_TYPE_IP4_ADDRESS - 1] = {
|
||||
|
|
@ -2525,7 +2548,7 @@ const NMPClass _nmp_classes[NMP_OBJECT_TYPE_MAX] = {
|
|||
.obj_type_name = "gre",
|
||||
.lnk_link_type = NM_LINK_TYPE_GRE,
|
||||
.cmd_plobj_to_string = (const char *(*) (const NMPlatformObject *obj, char *buf, gsize len)) nm_platform_lnk_gre_to_string,
|
||||
.cmd_plobj_hash = _vt_cmd_plobj_hash_not_implemented,
|
||||
.cmd_plobj_hash = (guint (*) (const NMPlatformObject *obj)) nm_platform_lnk_gre_hash,
|
||||
.cmd_plobj_cmp = (int (*) (const NMPlatformObject *obj1, const NMPlatformObject *obj2)) nm_platform_lnk_gre_cmp,
|
||||
},
|
||||
[NMP_OBJECT_TYPE_LNK_INFINIBAND - 1] = {
|
||||
|
|
@ -2535,7 +2558,7 @@ const NMPClass _nmp_classes[NMP_OBJECT_TYPE_MAX] = {
|
|||
.obj_type_name = "infiniband",
|
||||
.lnk_link_type = NM_LINK_TYPE_INFINIBAND,
|
||||
.cmd_plobj_to_string = (const char *(*) (const NMPlatformObject *obj, char *buf, gsize len)) nm_platform_lnk_infiniband_to_string,
|
||||
.cmd_plobj_hash = _vt_cmd_plobj_hash_not_implemented,
|
||||
.cmd_plobj_hash = (guint (*) (const NMPlatformObject *obj)) nm_platform_lnk_infiniband_hash,
|
||||
.cmd_plobj_cmp = (int (*) (const NMPlatformObject *obj1, const NMPlatformObject *obj2)) nm_platform_lnk_infiniband_cmp,
|
||||
},
|
||||
[NMP_OBJECT_TYPE_LNK_IP6TNL - 1] = {
|
||||
|
|
@ -2545,7 +2568,7 @@ const NMPClass _nmp_classes[NMP_OBJECT_TYPE_MAX] = {
|
|||
.obj_type_name = "ip6tnl",
|
||||
.lnk_link_type = NM_LINK_TYPE_IP6TNL,
|
||||
.cmd_plobj_to_string = (const char *(*) (const NMPlatformObject *obj, char *buf, gsize len)) nm_platform_lnk_ip6tnl_to_string,
|
||||
.cmd_plobj_hash = _vt_cmd_plobj_hash_not_implemented,
|
||||
.cmd_plobj_hash = (guint (*) (const NMPlatformObject *obj)) nm_platform_lnk_ip6tnl_hash,
|
||||
.cmd_plobj_cmp = (int (*) (const NMPlatformObject *obj1, const NMPlatformObject *obj2)) nm_platform_lnk_ip6tnl_cmp,
|
||||
},
|
||||
[NMP_OBJECT_TYPE_LNK_IPIP - 1] = {
|
||||
|
|
@ -2555,7 +2578,7 @@ const NMPClass _nmp_classes[NMP_OBJECT_TYPE_MAX] = {
|
|||
.obj_type_name = "ipip",
|
||||
.lnk_link_type = NM_LINK_TYPE_IPIP,
|
||||
.cmd_plobj_to_string = (const char *(*) (const NMPlatformObject *obj, char *buf, gsize len)) nm_platform_lnk_ipip_to_string,
|
||||
.cmd_plobj_hash = _vt_cmd_plobj_hash_not_implemented,
|
||||
.cmd_plobj_hash = (guint (*) (const NMPlatformObject *obj)) nm_platform_lnk_ipip_hash,
|
||||
.cmd_plobj_cmp = (int (*) (const NMPlatformObject *obj1, const NMPlatformObject *obj2)) nm_platform_lnk_ipip_cmp,
|
||||
},
|
||||
[NMP_OBJECT_TYPE_LNK_MACSEC - 1] = {
|
||||
|
|
@ -2565,7 +2588,7 @@ const NMPClass _nmp_classes[NMP_OBJECT_TYPE_MAX] = {
|
|||
.obj_type_name = "macsec",
|
||||
.lnk_link_type = NM_LINK_TYPE_MACSEC,
|
||||
.cmd_plobj_to_string = (const char *(*) (const NMPlatformObject *obj, char *buf, gsize len)) nm_platform_lnk_macsec_to_string,
|
||||
.cmd_plobj_hash = _vt_cmd_plobj_hash_not_implemented,
|
||||
.cmd_plobj_hash = (guint (*) (const NMPlatformObject *obj)) nm_platform_lnk_macsec_hash,
|
||||
.cmd_plobj_cmp = (int (*) (const NMPlatformObject *obj1, const NMPlatformObject *obj2)) nm_platform_lnk_macsec_cmp,
|
||||
},
|
||||
[NMP_OBJECT_TYPE_LNK_MACVLAN - 1] = {
|
||||
|
|
@ -2575,7 +2598,7 @@ const NMPClass _nmp_classes[NMP_OBJECT_TYPE_MAX] = {
|
|||
.obj_type_name = "macvlan",
|
||||
.lnk_link_type = NM_LINK_TYPE_MACVLAN,
|
||||
.cmd_plobj_to_string = (const char *(*) (const NMPlatformObject *obj, char *buf, gsize len)) nm_platform_lnk_macvlan_to_string,
|
||||
.cmd_plobj_hash = _vt_cmd_plobj_hash_not_implemented,
|
||||
.cmd_plobj_hash = (guint (*) (const NMPlatformObject *obj)) nm_platform_lnk_macvlan_hash,
|
||||
.cmd_plobj_cmp = (int (*) (const NMPlatformObject *obj1, const NMPlatformObject *obj2)) nm_platform_lnk_macvlan_cmp,
|
||||
},
|
||||
[NMP_OBJECT_TYPE_LNK_MACVTAP - 1] = {
|
||||
|
|
@ -2585,7 +2608,7 @@ const NMPClass _nmp_classes[NMP_OBJECT_TYPE_MAX] = {
|
|||
.obj_type_name = "macvtap",
|
||||
.lnk_link_type = NM_LINK_TYPE_MACVTAP,
|
||||
.cmd_plobj_to_string = (const char *(*) (const NMPlatformObject *obj, char *buf, gsize len)) nm_platform_lnk_macvlan_to_string,
|
||||
.cmd_plobj_hash = _vt_cmd_plobj_hash_not_implemented,
|
||||
.cmd_plobj_hash = (guint (*) (const NMPlatformObject *obj)) nm_platform_lnk_macvlan_hash,
|
||||
.cmd_plobj_cmp = (int (*) (const NMPlatformObject *obj1, const NMPlatformObject *obj2)) nm_platform_lnk_macvlan_cmp,
|
||||
},
|
||||
[NMP_OBJECT_TYPE_LNK_SIT - 1] = {
|
||||
|
|
@ -2595,7 +2618,7 @@ const NMPClass _nmp_classes[NMP_OBJECT_TYPE_MAX] = {
|
|||
.obj_type_name = "sit",
|
||||
.lnk_link_type = NM_LINK_TYPE_SIT,
|
||||
.cmd_plobj_to_string = (const char *(*) (const NMPlatformObject *obj, char *buf, gsize len)) nm_platform_lnk_sit_to_string,
|
||||
.cmd_plobj_hash = _vt_cmd_plobj_hash_not_implemented,
|
||||
.cmd_plobj_hash = (guint (*) (const NMPlatformObject *obj)) nm_platform_lnk_sit_hash,
|
||||
.cmd_plobj_cmp = (int (*) (const NMPlatformObject *obj1, const NMPlatformObject *obj2)) nm_platform_lnk_sit_cmp,
|
||||
},
|
||||
[NMP_OBJECT_TYPE_LNK_VLAN - 1] = {
|
||||
|
|
@ -2604,13 +2627,13 @@ const NMPClass _nmp_classes[NMP_OBJECT_TYPE_MAX] = {
|
|||
.sizeof_public = sizeof (NMPlatformLnkVlan),
|
||||
.obj_type_name = "vlan",
|
||||
.lnk_link_type = NM_LINK_TYPE_VLAN,
|
||||
.cmd_obj_hash = _vt_cmd_obj_hash_not_implemented,
|
||||
.cmd_obj_hash = _vt_cmd_obj_hash_lnk_vlan,
|
||||
.cmd_obj_cmp = _vt_cmd_obj_cmp_lnk_vlan,
|
||||
.cmd_obj_copy = _vt_cmd_obj_copy_lnk_vlan,
|
||||
.cmd_obj_dispose = _vt_cmd_obj_dispose_lnk_vlan,
|
||||
.cmd_obj_to_string = _vt_cmd_obj_to_string_lnk_vlan,
|
||||
.cmd_plobj_to_string = (const char *(*) (const NMPlatformObject *obj, char *buf, gsize len)) nm_platform_lnk_vlan_to_string,
|
||||
.cmd_plobj_hash = _vt_cmd_plobj_hash_not_implemented,
|
||||
.cmd_plobj_hash = (guint (*) (const NMPlatformObject *obj)) nm_platform_lnk_vlan_hash,
|
||||
.cmd_plobj_cmp = (int (*) (const NMPlatformObject *obj1, const NMPlatformObject *obj2)) nm_platform_lnk_vlan_cmp,
|
||||
},
|
||||
[NMP_OBJECT_TYPE_LNK_VXLAN - 1] = {
|
||||
|
|
@ -2620,7 +2643,7 @@ const NMPClass _nmp_classes[NMP_OBJECT_TYPE_MAX] = {
|
|||
.obj_type_name = "vxlan",
|
||||
.lnk_link_type = NM_LINK_TYPE_VXLAN,
|
||||
.cmd_plobj_to_string = (const char *(*) (const NMPlatformObject *obj, char *buf, gsize len)) nm_platform_lnk_vxlan_to_string,
|
||||
.cmd_plobj_hash = _vt_cmd_plobj_hash_not_implemented,
|
||||
.cmd_plobj_hash = (guint (*) (const NMPlatformObject *obj)) nm_platform_lnk_vxlan_hash,
|
||||
.cmd_plobj_cmp = (int (*) (const NMPlatformObject *obj1, const NMPlatformObject *obj2)) nm_platform_lnk_vxlan_cmp,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue