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

libnl 3.10.0

mdb.h
1/* SPDX-License-Identifier: LGPL-2.1-only */
2
3#ifndef NETLINK_MDB_H_
4#define NETLINK_MDB_H_
5
6#include <netlink/netlink.h>
7#include <netlink/cache.h>
8#include <netlink/route/link.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14struct rtnl_mdb;
15struct rtnl_mdb_entry;
16
17struct rtnl_mdb *rtnl_mdb_alloc(void);
18void rtnl_mdb_put(struct rtnl_mdb *mdb);
19
20int rtnl_mdb_alloc_cache(struct nl_sock *sk, struct nl_cache **result);
21int rtnl_mdb_alloc_cache_flags(struct nl_sock *sock,
22 struct nl_cache **result,
23 unsigned int flags);
24
25uint32_t rtnl_mdb_get_ifindex(struct rtnl_mdb *mdb);
26void rtnl_mdb_add_entry(struct rtnl_mdb *mdb,
27 struct rtnl_mdb_entry *_entry);
28
29void rtnl_mdb_foreach_entry(struct rtnl_mdb *mdb,
30 void (*cb)(struct rtnl_mdb_entry *, void *),
31 void *arg);
32
33int rtnl_mdb_entry_get_ifindex(struct rtnl_mdb_entry *mdb_entry);
34int rtnl_mdb_entry_get_vid(struct rtnl_mdb_entry *mdb_entry);
35int rtnl_mdb_entry_get_state(struct rtnl_mdb_entry *mdb_entry);
36struct nl_addr *rtnl_mdb_entry_get_addr(struct rtnl_mdb_entry
37 *mdb_entry);
38uint16_t rtnl_mdb_entry_get_proto(struct rtnl_mdb_entry *mdb_entry);
39#ifdef __cplusplus
40}
41#endif
42#endif