| 1 |
/* SPDX-License-Identifier: LGPL-2.1-only */ |
| 2 |
/* |
| 3 |
* Copyright (c) 2018 Volodymyr Bendiuga <[email protected]> |
| 4 |
*/ |
| 5 |
|
| 6 |
#ifndef NETLINK_FLOWER_H_ |
| 7 |
#define NETLINK_FLOWER_H_ |
| 8 |
|
| 9 |
#include <netlink/netlink.h> |
| 10 |
#include <netlink/cache.h> |
| 11 |
#include <netlink/route/classifier.h> |
| 12 |
#include <netlink/route/action.h> |
| 13 |
|
| 14 |
#ifdef __cplusplus |
| 15 |
extern "C" { |
| 16 |
#endif |
| 17 |
|
| 18 |
extern int rtnl_flower_set_proto(struct rtnl_cls *cls, uint16_t); |
| 19 |
extern int rtnl_flower_get_proto(struct rtnl_cls *cls, uint16_t *); |
| 20 |
|
| 21 |
extern int rtnl_flower_set_vlan_id(struct rtnl_cls *, uint16_t); |
| 22 |
extern int rtnl_flower_get_vlan_id(struct rtnl_cls *, uint16_t *); |
| 23 |
|
| 24 |
extern int rtnl_flower_set_vlan_prio(struct rtnl_cls *, uint8_t); |
| 25 |
extern int rtnl_flower_get_vlan_prio(struct rtnl_cls *, uint8_t *); |
| 26 |
|
| 27 |
extern int rtnl_flower_set_vlan_ethtype(struct rtnl_cls *, uint16_t); |
| 28 |
|
| 29 |
extern int rtnl_flower_set_dst_mac(struct rtnl_cls *, unsigned char *, |
| 30 |
unsigned char *); |
| 31 |
extern int rtnl_flower_get_dst_mac(struct rtnl_cls *, unsigned char *, |
| 32 |
unsigned char *); |
| 33 |
|
| 34 |
extern int rtnl_flower_set_src_mac(struct rtnl_cls *, unsigned char *, |
| 35 |
unsigned char *); |
| 36 |
extern int rtnl_flower_get_src_mac(struct rtnl_cls *, unsigned char *, |
| 37 |
unsigned char *); |
| 38 |
|
| 39 |
extern int rtnl_flower_set_ip_dscp(struct rtnl_cls *, uint8_t, uint8_t); |
| 40 |
extern int rtnl_flower_get_ip_dscp(struct rtnl_cls *, uint8_t *, uint8_t *); |
| 41 |
|
| 42 |
extern int rtnl_flower_set_ipv4_src(struct rtnl_cls *, in_addr_t, in_addr_t); |
| 43 |
extern int rtnl_flower_get_ipv4_src(struct rtnl_cls *, in_addr_t *, |
| 44 |
in_addr_t *); |
| 45 |
extern int rtnl_flower_set_ipv4_dst(struct rtnl_cls *, in_addr_t, in_addr_t); |
| 46 |
extern int rtnl_flower_get_ipv4_dst(struct rtnl_cls *, in_addr_t *, |
| 47 |
in_addr_t *); |
| 48 |
|
| 49 |
extern int rtnl_flower_set_flags(struct rtnl_cls *, int); |
| 50 |
|
| 51 |
extern int rtnl_flower_append_action(struct rtnl_cls *, struct rtnl_act *); |
| 52 |
extern int rtnl_flower_del_action(struct rtnl_cls *, struct rtnl_act *); |
| 53 |
extern struct rtnl_act* rtnl_flower_get_action(struct rtnl_cls *); |
| 54 |
|
| 55 |
#ifdef __cplusplus |
| 56 |
} |
| 57 |
#endif |
| 58 |
|
| 59 |
#endif |