Debian Codegraph @

include/netlink/route/pktloc.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3 * Copyright (c) 2010 Thomas Graf <[email protected]>
4 */
5
6 #ifndef NETLINK_PKTLOC_H_
7 #define NETLINK_PKTLOC_H_
8
9 #include <netlink/netlink.h>
10 #include <netlink/cache.h>
11 #include <netlink/route/tc.h>
12
13 #include <linux/tc_ematch/tc_em_cmp.h>
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 struct rtnl_pktloc
20 {
21 char * name;
22 uint8_t layer;
23 uint8_t shift;
24 uint16_t offset;
25 uint16_t align;
26 uint32_t mask;
27 uint32_t refcnt;
28
29 struct nl_list_head list;
30 };
31
32 extern int rtnl_pktloc_lookup(const char *, struct rtnl_pktloc **);
33 extern struct rtnl_pktloc *rtnl_pktloc_alloc(void);
34 extern void rtnl_pktloc_put(struct rtnl_pktloc *);
35 extern int rtnl_pktloc_add(struct rtnl_pktloc *);
36 extern void rtnl_pktloc_foreach(void (*cb)(struct rtnl_pktloc *, void *),
37 void *);
38
39 #ifdef __cplusplus
40 }
41 #endif
42
43 #endif