6#include <netlink-private/netlink.h>
7#include <netlink-private/tc.h>
8#include <netlink/netlink.h>
9#include <netlink/utils.h>
10#include <netlink-private/route/tc-api.h>
11#include <netlink/route/classifier.h>
12#include <netlink/route/cls/police.h>
19static const struct trans_tbl police_types[] = {
20 __ADD(TC_POLICE_UNSPEC,unspec),
21 __ADD(TC_POLICE_OK,ok),
22 __ADD(TC_POLICE_RECLASSIFY,reclassify),
23 __ADD(TC_POLICE_SHOT,shot),
25 __ADD(TC_POLICE_PIPE,pipe),
40char * nl_police2str(
int type,
char *buf,
size_t len)
42 return __type2str(type, buf, len, police_types,
43 ARRAY_SIZE(police_types));
55int nl_str2police(
const char *name)
57 return __str2type(name, police_types, ARRAY_SIZE(police_types));