libnl: /data/src/libnl3/include/netlink/route/cls/u32.h Source File

libnl 3.10.0

u32.h
1/* SPDX-License-Identifier: LGPL-2.1-only */
2/*
3 * Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch>
4 */
5
6#ifndef NETLINK_U32_H_
7#define NETLINK_U32_H_
8
9#include <netlink/netlink.h>
10#include <netlink/cache.h>
11#include <netlink/route/classifier.h>
12#include <netlink/route/action.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18extern void rtnl_u32_set_handle(struct rtnl_cls *, int, int, int);
19extern int rtnl_u32_set_classid(struct rtnl_cls *, uint32_t);
20extern int rtnl_u32_get_classid(struct rtnl_cls *, uint32_t *);
21extern int rtnl_u32_set_divisor(struct rtnl_cls *, uint32_t);
22extern int rtnl_u32_set_link(struct rtnl_cls *, uint32_t);
23extern int rtnl_u32_set_hashtable(struct rtnl_cls *, uint32_t);
24extern int rtnl_u32_set_hashmask(struct rtnl_cls *, uint32_t, uint32_t);
25extern int rtnl_u32_set_selector(struct rtnl_cls *, int, uint32_t, char, uint16_t, char);
26extern int rtnl_u32_set_cls_terminal(struct rtnl_cls *);
27
28extern int rtnl_u32_set_flags(struct rtnl_cls *, int);
29extern int rtnl_u32_add_mark(struct rtnl_cls *, uint32_t, uint32_t);
30extern int rtnl_u32_del_mark(struct rtnl_cls *);
31extern int rtnl_u32_add_key(struct rtnl_cls *, uint32_t, uint32_t,
32 int, int);
33extern int rtnl_u32_get_key(struct rtnl_cls *, uint8_t, uint32_t *, uint32_t *,
34 int *, int *);
35extern int rtnl_u32_add_key_uint8(struct rtnl_cls *, uint8_t, uint8_t,
36 int, int);
37extern int rtnl_u32_add_key_uint16(struct rtnl_cls *, uint16_t, uint16_t,
38 int, int);
39extern int rtnl_u32_add_key_uint32(struct rtnl_cls *, uint32_t, uint32_t,
40 int, int);
41extern int rtnl_u32_add_key_in_addr(struct rtnl_cls *, const struct in_addr *,
42 uint8_t, int, int);
43extern int rtnl_u32_add_key_in6_addr(struct rtnl_cls *, const struct in6_addr *,
44 uint8_t, int, int);
45extern int rtnl_u32_add_action(struct rtnl_cls *, struct rtnl_act *);
46extern int rtnl_u32_del_action(struct rtnl_cls *, struct rtnl_act *);
47extern struct rtnl_act* rtnl_u32_get_action(struct rtnl_cls *);
48
49#ifdef __cplusplus
50}
51#endif
52
53#endif
rtnl_u32_get_key
int rtnl_u32_get_key(struct rtnl_cls *, uint8_t, uint32_t *, uint32_t *, int *, int *)
Get the 32-bit key from the selector.
Definition u32.c:782
rtnl_u32_add_key
int rtnl_u32_add_key(struct rtnl_cls *, uint32_t, uint32_t, int, int)
Append new 32-bit key to the selector.
Definition u32.c:697
rtnl_u32_add_key_uint32
int rtnl_u32_add_key_uint32(struct rtnl_cls *, uint32_t, uint32_t, int, int)
Append new selector key to match a 32-bit number.
Definition u32.c:846
rtnl_u32_add_key_uint16
int rtnl_u32_add_key_uint16(struct rtnl_cls *, uint16_t, uint16_t, int, int)
Append new selector key to match a 16-bit number.
Definition u32.c:825
rtnl_act
Definition nl-route.h:122