]> git.proxmox.com Git - mirror_iproute2.git/blame - include/color.h
rdma: Properly mark RDMAtool license
[mirror_iproute2.git] / include / color.h
CommitLineData
6054c1eb 1/* SPDX-License-Identifier: GPL-2.0 */
d7bd2db5
MN
2#ifndef __COLOR_H__
3#define __COLOR_H__ 1
4
ff1ab8ed
PS
5#include <stdbool.h>
6
d7bd2db5
MN
7enum color_attr {
8 COLOR_IFNAME,
9 COLOR_MAC,
10 COLOR_INET,
11 COLOR_INET6,
12 COLOR_OPERSTATE_UP,
a1121aa1 13 COLOR_OPERSTATE_DOWN,
4b73d52f 14 COLOR_NONE
d7bd2db5
MN
15};
16
ff1ab8ed
PS
17enum color_opt {
18 COLOR_OPT_NEVER = 0,
19 COLOR_OPT_AUTO = 1,
20 COLOR_OPT_ALWAYS = 2
21};
22
515a766c 23bool check_enable_color(int color, int json);
ff1ab8ed 24bool matches_color(const char *arg, int *val);
d7bd2db5 25int color_fprintf(FILE *fp, enum color_attr attr, const char *fmt, ...);
a1121aa1
PS
26enum color_attr ifa_family_color(__u8 ifa_family);
27enum color_attr oper_state_color(__u8 state);
d7bd2db5
MN
28
29#endif