mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 04:00:17 +01:00
platform/trivial: rename cache-id-type indexes
This commit is contained in:
parent
17f02318ad
commit
8b3b148fda
2 changed files with 12 additions and 12 deletions
|
|
@ -177,7 +177,7 @@ _idx_obj_part (const DedupMultiIdxType *idx_type,
|
|||
/* just return 1, to indicate that obj_a is partitionable by this idx_type. */
|
||||
return 1;
|
||||
|
||||
case NMP_CACHE_ID_TYPE_ROUTES_VISIBLE_BY_DEFAULT:
|
||||
case NMP_CACHE_ID_TYPE_DEFAULT_ROUTES:
|
||||
if ( !NM_IN_SET (NMP_OBJECT_GET_TYPE (obj_a), NMP_OBJECT_TYPE_IP4_ROUTE,
|
||||
NMP_OBJECT_TYPE_IP6_ROUTE)
|
||||
|| !NM_PLATFORM_IP_ROUTE_IS_DEFAULT (&obj_a->ip_route)
|
||||
|
|
@ -195,7 +195,7 @@ _idx_obj_part (const DedupMultiIdxType *idx_type,
|
|||
}
|
||||
return 1;
|
||||
|
||||
case NMP_CACHE_ID_TYPE_ADDRROUTE_VISIBLE_BY_IFINDEX:
|
||||
case NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX:
|
||||
if ( !NM_IN_SET (NMP_OBJECT_GET_TYPE (obj_a), NMP_OBJECT_TYPE_IP4_ADDRESS,
|
||||
NMP_OBJECT_TYPE_IP6_ADDRESS,
|
||||
NMP_OBJECT_TYPE_IP4_ROUTE,
|
||||
|
|
@ -1255,14 +1255,14 @@ static const guint8 _supported_cache_ids_link[] = {
|
|||
|
||||
static const guint8 _supported_cache_ids_ipx_address[] = {
|
||||
NMP_CACHE_ID_TYPE_OBJECT_TYPE,
|
||||
NMP_CACHE_ID_TYPE_ADDRROUTE_VISIBLE_BY_IFINDEX,
|
||||
NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX,
|
||||
0,
|
||||
};
|
||||
|
||||
static const guint8 _supported_cache_ids_ipx_route[] = {
|
||||
NMP_CACHE_ID_TYPE_OBJECT_TYPE,
|
||||
NMP_CACHE_ID_TYPE_ADDRROUTE_VISIBLE_BY_IFINDEX,
|
||||
NMP_CACHE_ID_TYPE_ROUTES_VISIBLE_BY_DEFAULT,
|
||||
NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX,
|
||||
NMP_CACHE_ID_TYPE_DEFAULT_ROUTES,
|
||||
NMP_CACHE_ID_TYPE_ROUTES_BY_DESTINATION,
|
||||
0,
|
||||
};
|
||||
|
|
@ -1582,7 +1582,7 @@ nmp_lookup_init_addrroute (NMPLookup *lookup,
|
|||
|
||||
o = _nmp_object_stackinit_from_type (&lookup->selector_obj, obj_type);
|
||||
o->object.ifindex = ifindex;
|
||||
lookup->cache_id_type = NMP_CACHE_ID_TYPE_ADDRROUTE_VISIBLE_BY_IFINDEX;
|
||||
lookup->cache_id_type = NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX;
|
||||
return _L (lookup);
|
||||
}
|
||||
|
||||
|
|
@ -1612,7 +1612,7 @@ nmp_lookup_init_route_visible (NMPLookup *lookup,
|
|||
|
||||
o = _nmp_object_stackinit_from_type (&lookup->selector_obj, obj_type);
|
||||
o->object.ifindex = 1;
|
||||
lookup->cache_id_type = NMP_CACHE_ID_TYPE_ROUTES_VISIBLE_BY_DEFAULT;
|
||||
lookup->cache_id_type = NMP_CACHE_ID_TYPE_DEFAULT_ROUTES;
|
||||
return _L (lookup);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,12 +48,12 @@ typedef enum { /*< skip >*/
|
|||
* but only route objects can be indexed by NMP_CACHE_ID_TYPE_ROUTES_VISIBLE_NO_DEFAULT.
|
||||
*
|
||||
* Of one index type, there can be multiple indexes or not.
|
||||
* For example, of the index type NMP_CACHE_ID_TYPE_ADDRROUTE_VISIBLE_BY_IFINDEX there
|
||||
* For example, of the index type NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX there
|
||||
* are multiple instances (for different route/addresses, v4/v6, per-ifindex).
|
||||
*
|
||||
* But one object, can only be indexed by one particular index of a
|
||||
* type. For example, a certain address instance is only indexed by
|
||||
* the index NMP_CACHE_ID_TYPE_ADDRROUTE_VISIBLE_BY_IFINDEX with
|
||||
* the index NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX with
|
||||
* matching v4/v6 and ifindex -- or maybe not at all if it isn't visible.
|
||||
* */
|
||||
typedef enum { /*< skip >*/
|
||||
|
|
@ -80,10 +80,10 @@ typedef enum { /*< skip >*/
|
|||
/* indeces for the visible default-routes, ignoring ifindex.
|
||||
* This index only contains two partitions: all visible default-routes,
|
||||
* separate for IPv4 and IPv6. */
|
||||
NMP_CACHE_ID_TYPE_ROUTES_VISIBLE_BY_DEFAULT,
|
||||
NMP_CACHE_ID_TYPE_DEFAULT_ROUTES,
|
||||
|
||||
/* all the visible addresses/routes (by object-type) for an ifindex. */
|
||||
NMP_CACHE_ID_TYPE_ADDRROUTE_VISIBLE_BY_IFINDEX,
|
||||
/* all the addresses/routes (by object-type) for an ifindex. */
|
||||
NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX,
|
||||
|
||||
/* Consider all the destination fields of a route, that is, the ID without the ifindex
|
||||
* and gateway (meaning: network/plen,metric).
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue