]> git.proxmox.com Git - mirror_iproute2.git/blob - include/color.h
Tree wide: Drop sockaddr_nl arg
[mirror_iproute2.git] / include / color.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __COLOR_H__
3 #define __COLOR_H__ 1
4
5 #include <stdbool.h>
6
7 enum color_attr {
8 COLOR_IFNAME,
9 COLOR_MAC,
10 COLOR_INET,
11 COLOR_INET6,
12 COLOR_OPERSTATE_UP,
13 COLOR_OPERSTATE_DOWN,
14 COLOR_NONE
15 };
16
17 enum color_opt {
18 COLOR_OPT_NEVER = 0,
19 COLOR_OPT_AUTO = 1,
20 COLOR_OPT_ALWAYS = 2
21 };
22
23 void enable_color(void);
24 bool check_enable_color(int color, int json);
25 bool matches_color(const char *arg, int *val);
26 void set_color_palette(void);
27 int color_fprintf(FILE *fp, enum color_attr attr, const char *fmt, ...);
28 enum color_attr ifa_family_color(__u8 ifa_family);
29 enum color_attr oper_state_color(__u8 state);
30
31 #endif