libnl  3.2.11
rtnl_link_af_ops Struct Reference

Available operations to modules implementing a link address family. More...

#include <api.h>

Data Fields

const unsigned int ao_family
 The address family this operations set implements.
int ao_refcnt
 Number of users of this operations, DO NOT MODIFY.
struct nla_policyao_protinfo_policy
 Validation policy for IFLA_PROTINFO attribute.
void *(* ao_alloc )(struct rtnl_link *)
 Called after address family has been assigned to link.
void *(* ao_clone )(struct rtnl_link *, void *)
 Called when the link is cloned, must allocate a clone of the address family specific buffer and return it.
void(* ao_free )(struct rtnl_link *, void *)
 Called when the link gets freed.
int(* ao_parse_protinfo )(struct rtnl_link *, struct nlattr *, void *)
 Called if a IFLA_PROTINFO attribute needs to be parsed.
int(* ao_parse_af )(struct rtnl_link *, struct nlattr *, void *)
 Called if a IFLA_AF_SPEC attribute needs to be parsed.
int(* ao_fill_af )(struct rtnl_link *, struct nl_msg *msg, void *)
 Called if a link message is sent to the kernel.
void(* ao_dump [NL_DUMP_MAX+1])(struct rtnl_link *, struct nl_dump_params *, void *)
 Dump address family specific link attributes.

Detailed Description

Available operations to modules implementing a link address family.

Definition at line 77 of file api.h.


Field Documentation

int rtnl_link_af_ops::ao_refcnt

Number of users of this operations, DO NOT MODIFY.

Definition at line 83 of file api.h.

Referenced by rtnl_link_af_ops_lookup(), rtnl_link_af_ops_put(), rtnl_link_af_register(), and rtnl_link_af_unregister().

struct nla_policy* rtnl_link_af_ops::ao_protinfo_policy

Validation policy for IFLA_PROTINFO attribute.

This pointer can be set to a nla_policy structure describing the minimal requirements the attribute must meet. Failure of meeting these requirements will result in a parsing error.

Definition at line 89 of file api.h.

void*(* rtnl_link_af_ops::ao_alloc)(struct rtnl_link *)

Called after address family has been assigned to link.

Must allocate data buffer to hold address family specific data and store it in link->l_af_data.

Definition at line 94 of file api.h.

Referenced by rtnl_link_af_alloc().

void*(* rtnl_link_af_ops::ao_clone)(struct rtnl_link *, void *)

Called when the link is cloned, must allocate a clone of the address family specific buffer and return it.

Definition at line 98 of file api.h.

void(* rtnl_link_af_ops::ao_free)(struct rtnl_link *, void *)

Called when the link gets freed.

Must free all allocated data

Definition at line 101 of file api.h.

int(* rtnl_link_af_ops::ao_parse_protinfo)(struct rtnl_link *, struct nlattr *, void *)

Called if a IFLA_PROTINFO attribute needs to be parsed.

Typically stores the parsed data in the address family specific buffer.

Definition at line 105 of file api.h.

int(* rtnl_link_af_ops::ao_parse_af)(struct rtnl_link *, struct nlattr *, void *)

Called if a IFLA_AF_SPEC attribute needs to be parsed.

Typically stores the parsed data in the address family specific buffer.

Definition at line 110 of file api.h.

int(* rtnl_link_af_ops::ao_fill_af)(struct rtnl_link *, struct nl_msg *msg, void *)

Called if a link message is sent to the kernel.

Must append the link address family specific attributes to the message.

Definition at line 115 of file api.h.