00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef NETLINK_CLASSIFIER_H_
00013 #define NETLINK_CLASSIFIER_H_
00014
00015 #include <netlink/netlink.h>
00016 #include <netlink/cache.h>
00017 #include <netlink/route/tc.h>
00018 #include <netlink/utils.h>
00019
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023
00024 extern struct rtnl_cls *rtnl_cls_alloc(void);
00025 extern void rtnl_cls_put(struct rtnl_cls *);
00026
00027 extern int rtnl_cls_alloc_cache(struct nl_sock *, int, uint32_t,
00028 struct nl_cache **);
00029
00030 extern int rtnl_cls_build_add_request(struct rtnl_cls *, int,
00031 struct nl_msg **);
00032 extern int rtnl_cls_add(struct nl_sock *, struct rtnl_cls *, int);
00033
00034 extern int rtnl_cls_build_change_request(struct rtnl_cls *, int,
00035 struct nl_msg **);
00036 extern int rtnl_cls_build_delete_request(struct rtnl_cls *, int,
00037 struct nl_msg **);
00038 extern int rtnl_cls_delete(struct nl_sock *, struct rtnl_cls *,
00039 int);
00040
00041 extern void rtnl_cls_set_prio(struct rtnl_cls *, uint16_t);
00042 extern uint16_t rtnl_cls_get_prio(struct rtnl_cls *);
00043
00044 extern void rtnl_cls_set_protocol(struct rtnl_cls *, uint16_t);
00045 extern uint16_t rtnl_cls_get_protocol(struct rtnl_cls *);
00046
00047 #ifdef __cplusplus
00048 }
00049 #endif
00050
00051 #endif