]>
git.proxmox.com Git - mirror_frr.git/blob - zebra/tc_netlink.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Zebra Traffic Control (TC) interaction with the kernel using netlink.
5 * Copyright (C) 2022 Shichu Yang
8 #ifndef _ZEBRA_TC_NETLINK_H
9 #define _ZEBRA_TC_NETLINK_H
17 /* Represent a prefixed address in flower filter */
28 PREFIXLEN_SPECIFIED
= (1 << 0),
29 ADDRTYPE_INET
= (1 << 1),
30 ADDRTYPE_UNSPEC
= (1 << 2),
31 ADDRTYPE_MULTI
= (1 << 3),
33 ADDRTYPE_INET_UNSPEC
= ADDRTYPE_INET
| ADDRTYPE_UNSPEC
,
34 ADDRTYPE_INET_MULTI
= ADDRTYPE_INET
| ADDRTYPE_MULTI
37 extern enum netlink_msg_status
38 netlink_put_tc_qdisc_update_msg(struct nl_batch
*bth
,
39 struct zebra_dplane_ctx
*ctx
);
40 extern enum netlink_msg_status
41 netlink_put_tc_class_update_msg(struct nl_batch
*bth
,
42 struct zebra_dplane_ctx
*ctx
);
43 extern enum netlink_msg_status
44 netlink_put_tc_filter_update_msg(struct nl_batch
*bth
,
45 struct zebra_dplane_ctx
*ctx
);
48 * "filter" & "class" in the following become "tfilter" & "tclass" for
49 * the sake of consistency with kernel message types (RTM_NEWTFILTER etc.)
52 extern int netlink_qdisc_read(struct zebra_ns
*zns
);
53 extern int netlink_tfilter_read_for_interface(struct zebra_ns
*zns
,
56 extern int netlink_tfilter_change(struct nlmsghdr
*h
, ns_id_t ns_id
,
58 extern int netlink_tclass_change(struct nlmsghdr
*h
, ns_id_t ns_id
,
60 extern int netlink_qdisc_change(struct nlmsghdr
*h
, ns_id_t ns_id
, int startup
);
67 #endif /* HAVE_NETLINK */
69 #endif /* _ZEBRA_TC_NETLINK_H */