summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-07-04 12:05:07 +0200
committerThomas Haller <thaller@redhat.com>2017-07-05 18:37:39 +0200
commit8b3b148fda8456dee817d369640f409c8e0cec57 (patch)
treee010e7165b39e3dc6acf5af7dd409711f013a226
parent17f02318add85410ab8e75f982932633154e2a5e (diff)
downloadNetworkManager-8b3b148fda8456dee817d369640f409c8e0cec57.tar.gz
platform/trivial: rename cache-id-type indexes
-rw-r--r--src/platform/nmp-object.c14
-rw-r--r--src/platform/nmp-object.h10
2 files changed, 12 insertions, 12 deletions
diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c
index cf82514a50..b6f542d089 100644
--- a/src/platform/nmp-object.c
+++ b/src/platform/nmp-object.c
@@ -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);
}
diff --git a/src/platform/nmp-object.h b/src/platform/nmp-object.h
index 605a131b3c..b3353116ee 100644
--- a/src/platform/nmp-object.h
+++ b/src/platform/nmp-object.h
@@ -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).