mirror of
https://github.com/systemd/systemd.git
synced 2025-01-25 10:04:04 +03:00
sd-netlink: Add support for bare UDP
This commit is contained in:
parent
ed2c2d3655
commit
af818d0344
@ -351,6 +351,12 @@ static const NLType rtnl_link_info_data_xfrm_types[] = {
|
|||||||
[IFLA_XFRM_IF_ID] = { .type = NETLINK_TYPE_U32 }
|
[IFLA_XFRM_IF_ID] = { .type = NETLINK_TYPE_U32 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const NLType rtnl_link_info_data_bareudp_types[] = {
|
||||||
|
[IFLA_BAREUDP_PORT] = { .type = NETLINK_TYPE_U16 },
|
||||||
|
[IFLA_BAREUDP_ETHERTYPE] = { .type = NETLINK_TYPE_U16 },
|
||||||
|
[IFLA_BAREUDP_SRCPORT_MIN] = { .type = NETLINK_TYPE_U16 },
|
||||||
|
[IFLA_BAREUDP_MULTIPROTO_MODE] = { .type = NETLINK_TYPE_FLAG },
|
||||||
|
};
|
||||||
/* these strings must match the .kind entries in the kernel */
|
/* these strings must match the .kind entries in the kernel */
|
||||||
static const char* const nl_union_link_info_data_table[] = {
|
static const char* const nl_union_link_info_data_table[] = {
|
||||||
[NL_UNION_LINK_INFO_DATA_BOND] = "bond",
|
[NL_UNION_LINK_INFO_DATA_BOND] = "bond",
|
||||||
@ -384,6 +390,7 @@ static const char* const nl_union_link_info_data_table[] = {
|
|||||||
[NL_UNION_LINK_INFO_DATA_NLMON] = "nlmon",
|
[NL_UNION_LINK_INFO_DATA_NLMON] = "nlmon",
|
||||||
[NL_UNION_LINK_INFO_DATA_XFRM] = "xfrm",
|
[NL_UNION_LINK_INFO_DATA_XFRM] = "xfrm",
|
||||||
[NL_UNION_LINK_INFO_DATA_IFB] = "ifb",
|
[NL_UNION_LINK_INFO_DATA_IFB] = "ifb",
|
||||||
|
[NL_UNION_LINK_INFO_DATA_BAREUDP] = "bareudp",
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_STRING_TABLE_LOOKUP(nl_union_link_info_data, NLUnionLinkInfoData);
|
DEFINE_STRING_TABLE_LOOKUP(nl_union_link_info_data, NLUnionLinkInfoData);
|
||||||
@ -439,6 +446,8 @@ static const NLTypeSystem rtnl_link_info_data_type_systems[] = {
|
|||||||
.types = rtnl_link_info_data_macsec_types },
|
.types = rtnl_link_info_data_macsec_types },
|
||||||
[NL_UNION_LINK_INFO_DATA_XFRM] = { .count = ELEMENTSOF(rtnl_link_info_data_xfrm_types),
|
[NL_UNION_LINK_INFO_DATA_XFRM] = { .count = ELEMENTSOF(rtnl_link_info_data_xfrm_types),
|
||||||
.types = rtnl_link_info_data_xfrm_types },
|
.types = rtnl_link_info_data_xfrm_types },
|
||||||
|
[NL_UNION_LINK_INFO_DATA_BAREUDP] = { .count = ELEMENTSOF(rtnl_link_info_data_bareudp_types),
|
||||||
|
.types = rtnl_link_info_data_bareudp_types },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const NLTypeSystemUnion rtnl_link_info_data_type_system_union = {
|
static const NLTypeSystemUnion rtnl_link_info_data_type_system_union = {
|
||||||
|
@ -88,6 +88,7 @@ typedef enum NLUnionLinkInfoData {
|
|||||||
NL_UNION_LINK_INFO_DATA_NLMON,
|
NL_UNION_LINK_INFO_DATA_NLMON,
|
||||||
NL_UNION_LINK_INFO_DATA_XFRM,
|
NL_UNION_LINK_INFO_DATA_XFRM,
|
||||||
NL_UNION_LINK_INFO_DATA_IFB,
|
NL_UNION_LINK_INFO_DATA_IFB,
|
||||||
|
NL_UNION_LINK_INFO_DATA_BAREUDP,
|
||||||
_NL_UNION_LINK_INFO_DATA_MAX,
|
_NL_UNION_LINK_INFO_DATA_MAX,
|
||||||
_NL_UNION_LINK_INFO_DATA_INVALID = -1
|
_NL_UNION_LINK_INFO_DATA_INVALID = -1
|
||||||
} NLUnionLinkInfoData;
|
} NLUnionLinkInfoData;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user