12#include <netlink-local.h>
13#include <netlink-tc.h>
14#include <netlink/netlink.h>
15#include <netlink/utils.h>
16#include <netlink/route/tc.h>
17#include <netlink/route/classifier.h>
18#include <netlink/route/classifier-modules.h>
19#include <netlink/route/cls/police.h>
26static struct trans_tbl police_types[] = {
27 __ADD(TC_POLICE_UNSPEC,unspec)
28 __ADD(TC_POLICE_OK,ok)
29 __ADD(TC_POLICE_RECLASSIFY,reclassify)
30 __ADD(TC_POLICE_SHOT,shot)
32 __ADD(TC_POLICE_PIPE,pipe)
47char * nl_police2str(
int type,
char *buf,
size_t len)
49 return __type2str(type, buf, len, police_types,
50 ARRAY_SIZE(police_types));
62int nl_str2police(
const char *name)
64 return __str2type(name, police_types, ARRAY_SIZE(police_types));