libnl 3.7.0
pktloc.h
1/* SPDX-License-Identifier: LGPL-2.1-only */
2/*
3 * Copyright (c) 2010 Thomas Graf <tgraf@suug.ch>
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
16extern "C" {
17#endif
18
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
32extern int rtnl_pktloc_lookup(const char *, struct rtnl_pktloc **);
33extern struct rtnl_pktloc *rtnl_pktloc_alloc(void);
34extern void rtnl_pktloc_put(struct rtnl_pktloc *);
35extern int rtnl_pktloc_add(struct rtnl_pktloc *);
36extern void rtnl_pktloc_foreach(void (*cb)(struct rtnl_pktloc *, void *),
37 void *);
38
39#ifdef __cplusplus
40}
41#endif
42
43#endif
int rtnl_pktloc_add(struct rtnl_pktloc *)
Add a packet location to the hash table.
Definition: pktloc.c:213
int rtnl_pktloc_lookup(const char *, struct rtnl_pktloc **)
Lookup packet location alias.
Definition: pktloc.c:167
void rtnl_pktloc_put(struct rtnl_pktloc *)
Return reference of a packet location.
Definition: pktloc.c:197
struct rtnl_pktloc * rtnl_pktloc_alloc(void)
Allocate packet location object.
Definition: pktloc.c:180