6#ifndef NETLINK_LINK_API_H_
7#define NETLINK_LINK_API_H_
9#include <netlink/netlink.h>
10#include <netlink/route/link.h>
12#include "nl-priv-dynamic-core/nl-core.h"
104 struct nlattr *,
void *);
109 struct nlattr *,
void *);
114 struct nl_msg *msg,
void *);
119 struct nlattr *,
void *);
124 uint32_t *ext_filter_mask);
150 int (*ao_override_rtm)(
struct rtnl_link *);
155 struct nl_msg *msg,
void *);
189extern struct rtnl_link *link_lookup(
struct nl_cache *cache,
int ifindex);
void rtnl_link_af_ops_put(struct rtnl_link_af_ops *)
Give back reference to a set of operations.
int rtnl_link_register_info(struct rtnl_link_info_ops *)
Register operations for a link info type.
void * rtnl_link_af_alloc(struct rtnl_link *, const struct rtnl_link_af_ops *)
Allocate and return data buffer for link address family modules.
int rtnl_link_info_data_compare(struct rtnl_link *a, struct rtnl_link *b, int flags)
Compare link info data.
int rtnl_link_unregister_info(struct rtnl_link_info_ops *)
Unregister operations for a link info type.
void rtnl_link_info_ops_get(struct rtnl_link_info_ops *)
Take reference to a set of operations.
int rtnl_link_af_unregister(struct rtnl_link_af_ops *)
Unregister operations for a link address family.
int rtnl_link_af_register(struct rtnl_link_af_ops *)
Register operations for a link address family.
struct rtnl_link_info_ops * rtnl_link_info_ops_lookup(const char *)
Return operations of a specific link info type.
int rtnl_link_af_data_compare(struct rtnl_link *a, struct rtnl_link *b, int family)
Compare af data for a link address family.
void rtnl_link_info_ops_put(struct rtnl_link_info_ops *)
Give back reference to a set of operations.
struct rtnl_link_af_ops * rtnl_link_af_ops_lookup(unsigned int)
Return operations of a specific link address family.
void * rtnl_link_af_data(const struct rtnl_link *, const struct rtnl_link_af_ops *)
Return data buffer for link address family modules.
Attribute validation policy.
Available operations to modules implementing a link address family.
const struct nla_policy * ao_protinfo_policy
Validation policy for IFLA_PROTINFO attribute.
int(* ao_parse_protinfo)(struct rtnl_link *, struct nlattr *, void *)
Called if a IFLA_PROTINFO attribute needs to be parsed.
void(* ao_free)(struct rtnl_link *, void *)
Called when the link gets freed.
int(* ao_compare)(struct rtnl_link *, struct rtnl_link *, int, uint32_t, int)
Comparison function.
int(* ao_fill_pi)(struct rtnl_link *, struct nl_msg *msg, void *)
Called if a link message is sent to the kernel.
const int ao_fill_af_no_nest
IFLA_AF_SPEC nesting override.
const unsigned int ao_family
The address family this operations set implements.
void(* ao_dump[NL_DUMP_MAX+1])(struct rtnl_link *, struct nl_dump_params *, void *)
Dump address family specific link attributes.
int(* ao_parse_af)(struct rtnl_link *, struct nlattr *, void *)
Called if a IFLA_AF_SPEC attribute needs to be parsed.
int(* ao_parse_af_full)(struct rtnl_link *, struct nlattr *, void *)
Called if the full IFLA_AF_SPEC data needs to be parsed.
int(* ao_get_af)(struct nl_msg *msg, uint32_t *ext_filter_mask)
Called for GETLINK message to the kernel.
int ao_refcnt
Number of users of this operations, DO NOT MODIFY.
int(* ao_fill_af)(struct rtnl_link *, struct nl_msg *msg, void *)
Called if a link message is sent to the kernel.
const int ao_fill_pi_flags
PROTINFO type.
Available operations to modules implementing a link info type.
char * io_name
Name of link info type, must match name on kernel side.
void(* io_dump[NL_DUMP_MAX+1])(struct rtnl_link *, struct nl_dump_params *)
Called when the link object is dumped.
void(* io_free)(struct rtnl_link *)
Called to release all resources previously allocated in either io_alloc() or io_parse().
int io_refcnt
Reference count, DO NOT MODIFY.
int(* io_compare)(struct rtnl_link *, struct rtnl_link *, int flags)
Called to compare link info parameters between two links.
int(* io_alloc)(struct rtnl_link *)
Called to assign an info type to a link.
int(* io_parse)(struct rtnl_link *, struct nlattr *, struct nlattr *)
Called to parse the link info attribute.
int(* io_clone)(struct rtnl_link *, struct rtnl_link *)
Called when a link object is cloned.
int(* io_put_attrs)(struct nl_msg *, struct rtnl_link *)
Called when construction a link netlink message.