xref: /aosp_15_r20/external/ethtool/netlink/strset.h (revision 1b481fc3bb1b45d4cf28d1ec12969dc1055f555d)
1 /*
2  * strset.h - string set handling
3  *
4  * Interface for local cache of ethtool string sets.
5  */
6 
7 #ifndef ETHTOOL_NETLINK_STRSET_H__
8 #define ETHTOOL_NETLINK_STRSET_H__
9 
10 struct nl_socket;
11 struct stringset;
12 
13 const struct stringset *global_stringset(unsigned int type,
14 					 struct nl_socket *nlsk);
15 const struct stringset *perdev_stringset(const char *dev, unsigned int type,
16 					 struct nl_socket *nlsk);
17 
18 unsigned int get_count(const struct stringset *set);
19 const char *get_string(const struct stringset *set, unsigned int idx);
20 
21 int preload_global_strings(struct nl_socket *nlsk);
22 int preload_perdev_strings(struct nl_socket *nlsk, const char *dev);
23 void cleanup_all_strings(void);
24 
25 #endif /* ETHTOOL_NETLINK_STRSET_H__ */
26