2
#include <netlink-local.h>
3
#include <netlink-tc.h>
4
#include <netlink/netlink.h>
5
#include <netlink/utils.h>
6
#include <netlink/route/pktloc.h>
12
%name-prefix "pktloc_"
14
%parse-param {void *scanner}
15
%lex-param {void *scanner}
19
struct rtnl_pktloc *l;
25
extern int pktloc_lex(YYSTYPE *, YYLTYPE *, void *);
27
static void yyerror(YYLTYPE *locp, void *scanner, const char *msg)
29
NL_DBG(1, "Error while parsing packet location file: %s\n", msg);
33
%token <i> ERROR NUMBER LAYER ALIGN
36
%type <i> mask layer align shift
39
%destructor { free($$); } NAME
51
NAME align layer NUMBER mask shift
53
struct rtnl_pktloc *loc;
55
if (!(loc = rtnl_pktloc_alloc())) {
56
NL_DBG(1, "Allocating a packet location "
68
if (rtnl_pktloc_add(loc) < 0) {
69
NL_DBG(1, "Duplicate packet location entry "
86
{ $$ = TCF_LAYER_NETWORK; }