summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl/rtnl-types.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-02-08 12:37:05 +0100
committerTom Gundersen <teg@jklm.no>2015-02-08 17:43:39 +0100
commit4af7b60d428765c2d2c66c46f416f6dae55e9ddb (patch)
treeed1f20a91b4c4c5a87d73fbba4eb2f9c875ec65c /src/libsystemd/sd-rtnl/rtnl-types.h
parent02f500532e4823584aae43cbe762914b4a0c0254 (diff)
sd-rtnl: extend type system to allow address-family to decide the union members
So far we only supported selecting them by sibling attributes. (This stuff is all a bit crazy, but there seems to be no other way...)
Diffstat (limited to 'src/libsystemd/sd-rtnl/rtnl-types.h')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-types.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-types.h b/src/libsystemd/sd-rtnl/rtnl-types.h
index 9c0dc30331..1ab9444987 100644
--- a/src/libsystemd/sd-rtnl/rtnl-types.h
+++ b/src/libsystemd/sd-rtnl/rtnl-types.h
@@ -36,12 +36,18 @@ enum {
NLA_UNION,
};
+typedef enum NLMatchType {
+ NL_MATCH_SIBLING,
+ NL_MATCH_PROTOCOL,
+} NLMatchType;
+
typedef struct NLTypeSystemUnion NLTypeSystemUnion;
typedef struct NLTypeSystem NLTypeSystem;
typedef struct NLType NLType;
struct NLTypeSystemUnion {
int num;
+ NLMatchType match_type;
uint16_t match;
int (*lookup)(const char *);
const NLTypeSystem *type_systems;
@@ -63,6 +69,7 @@ int type_system_get_type(const NLTypeSystem *type_system, const NLType **ret, ui
int type_system_get_type_system(const NLTypeSystem *type_system, const NLTypeSystem **ret, uint16_t type);
int type_system_get_type_system_union(const NLTypeSystem *type_system, const NLTypeSystemUnion **ret, uint16_t type);
int type_system_union_get_type_system(const NLTypeSystemUnion *type_system_union, const NLTypeSystem **ret, const char *key);
+int type_system_union_protocol_get_type_system(const NLTypeSystemUnion *type_system_union, const NLTypeSystem **ret, uint16_t protocol);
typedef enum NLUnionLinkInfoData {
NL_UNION_LINK_INFO_DATA_BOND,