master
h 38 lines 961 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #ifndef NETDATA_PROC_NET_DEV_RENAMES_H
4 #define NETDATA_PROC_NET_DEV_RENAMES_H
5
6 #include "plugin_proc.h"
7
8 #define freez_and_set_to_null(p) do { \
9 freez((void *)p); \
10 p = NULL; \
11 } while(0)
12
13 extern DICTIONARY *netdev_renames;
14
15 struct rename_task {
16 SPINLOCK spinlock;
17 const char *container_device;
18 const char *container_name;
19 const char *ctx_prefix;
20 RRDLABELS *chart_labels;
21 const DICTIONARY_ITEM *cgroup_netdev_link;
22 };
23
24 #define freez_and_set_to_null(p) do { \
25 freez((void *)p); \
26 p = NULL; \
27 } while(0)
28
29 void netdev_renames_init(void);
30 void netdev_renames_destroy(void);
31
32 void cgroup_netdev_reset_all(void);
33 void cgroup_netdev_release(const DICTIONARY_ITEM *link);
34 const void *cgroup_netdev_dup(const DICTIONARY_ITEM *link);
35 void cgroup_netdev_add_bandwidth(const DICTIONARY_ITEM *link, NETDATA_DOUBLE received, NETDATA_DOUBLE sent);
36
37
38 #endif //NETDATA_PROC_NET_DEV_RENAMES_H