1 /* 2 * netlink/route/cls/u32.h u32 classifier 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation version 2.1 7 * of the License. 8 * 9 * Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch> 10 */ 11 12 #ifndef NETLINK_U32_H_ 13 #define NETLINK_U32_H_ 14 15 #include <netlink/netlink.h> 16 #include <netlink/cache.h> 17 #include <netlink/route/classifier.h> 18 #include <netlink/route/action.h> 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 extern void rtnl_u32_set_handle(struct rtnl_cls *, int, int, int); 25 extern int rtnl_u32_set_classid(struct rtnl_cls *, uint32_t); 26 extern int rtnl_u32_get_classid(struct rtnl_cls *, uint32_t *); 27 extern int rtnl_u32_set_divisor(struct rtnl_cls *, uint32_t); 28 extern int rtnl_u32_set_link(struct rtnl_cls *, uint32_t); 29 extern int rtnl_u32_set_hashtable(struct rtnl_cls *, uint32_t); 30 extern int rtnl_u32_set_hashmask(struct rtnl_cls *, uint32_t, uint32_t); 31 extern int rtnl_u32_set_selector(struct rtnl_cls *, int, uint32_t, char, uint16_t, char); 32 extern int rtnl_u32_set_cls_terminal(struct rtnl_cls *); 33 34 extern int rtnl_u32_set_flags(struct rtnl_cls *, int); 35 extern int rtnl_u32_add_mark(struct rtnl_cls *, uint32_t, uint32_t); 36 extern int rtnl_u32_del_mark(struct rtnl_cls *); 37 extern int rtnl_u32_add_key(struct rtnl_cls *, uint32_t, uint32_t, 38 int, int); 39 extern int rtnl_u32_get_key(struct rtnl_cls *, uint8_t, uint32_t *, uint32_t *, 40 int *, int *); 41 extern int rtnl_u32_add_key_uint8(struct rtnl_cls *, uint8_t, uint8_t, 42 int, int); 43 extern int rtnl_u32_add_key_uint16(struct rtnl_cls *, uint16_t, uint16_t, 44 int, int); 45 extern int rtnl_u32_add_key_uint32(struct rtnl_cls *, uint32_t, uint32_t, 46 int, int); 47 extern int rtnl_u32_add_key_in_addr(struct rtnl_cls *, const struct in_addr *, 48 uint8_t, int, int); 49 extern int rtnl_u32_add_key_in6_addr(struct rtnl_cls *, const struct in6_addr *, 50 uint8_t, int, int); 51 extern int rtnl_u32_add_action(struct rtnl_cls *, struct rtnl_act *); 52 extern int rtnl_u32_del_action(struct rtnl_cls *, struct rtnl_act *); 53 extern struct rtnl_act* rtnl_u32_get_action(struct rtnl_cls *); 54 55 #ifdef __cplusplus 56 } 57 #endif 58 59 #endif 60