8#include <netlink/netlink.h>
9#include <netlink/utils.h>
10#include <netlink/route/classifier.h>
11#include <netlink/route/cls/police.h>
13#include "nl-priv-dynamic-core/nl-core.h"
20static const struct trans_tbl police_types[] = {
21 __ADD(TC_POLICE_UNSPEC,unspec),
22 __ADD(TC_POLICE_OK,ok),
23 __ADD(TC_POLICE_RECLASSIFY,reclassify),
24 __ADD(TC_POLICE_SHOT,shot),
26 __ADD(TC_POLICE_PIPE,pipe),
41char * nl_police2str(
int type,
char *buf,
size_t len)
43 return __type2str(type, buf, len, police_types,
44 ARRAY_SIZE(police_types));
56int nl_str2police(
const char *name)
58 return __str2type(name, police_types, ARRAY_SIZE(police_types));