1 /* SPDX-License-Identifier: LGPL-2.1+ */
8 NETLINK_TYPE_U8
, /* NLA_U8 */
9 NETLINK_TYPE_U16
, /* NLA_U16 */
10 NETLINK_TYPE_U32
, /* NLA_U32 */
11 NETLINK_TYPE_U64
, /* NLA_U64 */
12 NETLINK_TYPE_S8
, /* NLA_S8 */
13 NETLINK_TYPE_S16
, /* NLA_S16 */
14 NETLINK_TYPE_S32
, /* NLA_S32 */
15 NETLINK_TYPE_S64
, /* NLA_S64 */
16 NETLINK_TYPE_STRING
, /* NLA_STRING */
17 NETLINK_TYPE_FLAG
, /* NLA_FLAG */
19 NETLINK_TYPE_ETHER_ADDR
,
20 NETLINK_TYPE_CACHE_INFO
,
21 NETLINK_TYPE_NESTED
, /* NLA_NESTED */
23 NETLINK_TYPE_SOCKADDR
,
26 typedef enum NLMatchType
{
31 typedef struct NLTypeSystemUnion NLTypeSystemUnion
;
32 typedef struct NLTypeSystem NLTypeSystem
;
33 typedef struct NLType NLType
;
35 struct NLTypeSystemUnion
{
37 NLMatchType match_type
;
39 int (*lookup
)(const char *);
40 const NLTypeSystem
*type_systems
;
43 extern const NLTypeSystem genl_family_type_system_root
;
45 uint16_t type_get_type(const NLType
*type
);
46 size_t type_get_size(const NLType
*type
);
47 void type_get_type_system(const NLType
*type
, const NLTypeSystem
**ret
);
48 void type_get_type_system_union(const NLType
*type
, const NLTypeSystemUnion
**ret
);
50 const NLTypeSystem
* type_system_get_root(int protocol
);
51 uint16_t type_system_get_count(const NLTypeSystem
*type_system
);
52 int type_system_root_get_type(sd_netlink
*nl
, const NLType
**ret
, uint16_t type
);
53 int type_system_get_type(const NLTypeSystem
*type_system
, const NLType
**ret
, uint16_t type
);
54 int type_system_get_type_system(const NLTypeSystem
*type_system
, const NLTypeSystem
**ret
, uint16_t type
);
55 int type_system_get_type_system_union(const NLTypeSystem
*type_system
, const NLTypeSystemUnion
**ret
, uint16_t type
);
56 int type_system_union_get_type_system(const NLTypeSystemUnion
*type_system_union
, const NLTypeSystem
**ret
, const char *key
);
57 int type_system_union_protocol_get_type_system(const NLTypeSystemUnion
*type_system_union
, const NLTypeSystem
**ret
, uint16_t protocol
);
59 typedef enum NLUnionLinkInfoData
{
60 NL_UNION_LINK_INFO_DATA_BOND
,
61 NL_UNION_LINK_INFO_DATA_BRIDGE
,
62 NL_UNION_LINK_INFO_DATA_VLAN
,
63 NL_UNION_LINK_INFO_DATA_VETH
,
64 NL_UNION_LINK_INFO_DATA_DUMMY
,
65 NL_UNION_LINK_INFO_DATA_MACVLAN
,
66 NL_UNION_LINK_INFO_DATA_MACVTAP
,
67 NL_UNION_LINK_INFO_DATA_IPVLAN
,
68 NL_UNION_LINK_INFO_DATA_IPVTAP
,
69 NL_UNION_LINK_INFO_DATA_VXLAN
,
70 NL_UNION_LINK_INFO_DATA_IPIP_TUNNEL
,
71 NL_UNION_LINK_INFO_DATA_IPGRE_TUNNEL
,
72 NL_UNION_LINK_INFO_DATA_ERSPAN
,
73 NL_UNION_LINK_INFO_DATA_IPGRETAP_TUNNEL
,
74 NL_UNION_LINK_INFO_DATA_IP6GRE_TUNNEL
,
75 NL_UNION_LINK_INFO_DATA_IP6GRETAP_TUNNEL
,
76 NL_UNION_LINK_INFO_DATA_SIT_TUNNEL
,
77 NL_UNION_LINK_INFO_DATA_VTI_TUNNEL
,
78 NL_UNION_LINK_INFO_DATA_VTI6_TUNNEL
,
79 NL_UNION_LINK_INFO_DATA_IP6TNL_TUNNEL
,
80 NL_UNION_LINK_INFO_DATA_VRF
,
81 NL_UNION_LINK_INFO_DATA_VCAN
,
82 NL_UNION_LINK_INFO_DATA_GENEVE
,
83 NL_UNION_LINK_INFO_DATA_VXCAN
,
84 NL_UNION_LINK_INFO_DATA_WIREGUARD
,
85 NL_UNION_LINK_INFO_DATA_NETDEVSIM
,
86 NL_UNION_LINK_INFO_DATA_CAN
,
87 NL_UNION_LINK_INFO_DATA_MACSEC
,
88 NL_UNION_LINK_INFO_DATA_NLMON
,
89 NL_UNION_LINK_INFO_DATA_XFRM
,
90 NL_UNION_LINK_INFO_DATA_IFB
,
91 _NL_UNION_LINK_INFO_DATA_MAX
,
92 _NL_UNION_LINK_INFO_DATA_INVALID
= -1
93 } NLUnionLinkInfoData
;
95 const char *nl_union_link_info_data_to_string(NLUnionLinkInfoData p
) _const_
;
96 NLUnionLinkInfoData
nl_union_link_info_data_from_string(const char *p
) _pure_
;
98 typedef enum NLUnionTCAOptionData
{
99 NL_UNION_TCA_OPTION_DATA_CAKE
,
100 NL_UNION_TCA_OPTION_DATA_CODEL
,
101 NL_UNION_TCA_OPTION_DATA_DRR
,
102 NL_UNION_TCA_OPTION_DATA_ETS
,
103 NL_UNION_TCA_OPTION_DATA_FQ
,
104 NL_UNION_TCA_OPTION_DATA_FQ_CODEL
,
105 NL_UNION_TCA_OPTION_DATA_GRED
,
106 NL_UNION_TCA_OPTION_DATA_HHF
,
107 NL_UNION_TCA_OPTION_DATA_HTB
,
108 NL_UNION_TCA_OPTION_DATA_PIE
,
109 NL_UNION_TCA_OPTION_DATA_QFQ
,
110 NL_UNION_TCA_OPTION_DATA_SFB
,
111 NL_UNION_TCA_OPTION_DATA_TBF
,
112 _NL_UNION_TCA_OPTION_DATA_MAX
,
113 _NL_UNION_TCA_OPTION_DATA_INVALID
= -1,
114 } NLUnionTCAOptionData
;
116 const char *nl_union_tca_option_data_to_string(NLUnionTCAOptionData p
) _const_
;
117 NLUnionTCAOptionData
nl_union_tca_option_data_from_string(const char *p
) _pure_
;