Data Fields

rtnl_link_info_ops Struct Reference

Available operations to modules implementing a link info type. More...

#include <api.h>

Data Fields

char * io_name
 Name of link info type, must match name on kernel side.
int io_refcnt
 Reference count, DO NOT MODIFY.
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.
void(* io_dump [NL_DUMP_MAX+1])(struct rtnl_link *, struct nl_dump_params *)
 Called when the link object is dumped.
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.
void(* io_free )(struct rtnl_link *)
 Called to release all resources previously allocated in either io_alloc() or io_parse().
struct nl_list_head io_list

Detailed Description

Available operations to modules implementing a link info type.

Definition at line 26 of file api.h.


Field Documentation

int(* rtnl_link_info_ops::io_alloc)(struct rtnl_link *)

Called to assign an info type to a link.

Has to allocate enough resources to hold attributes. Can use link->l_info to store a pointer.

Definition at line 37 of file api.h.

Referenced by rtnl_link_set_info_type().

int(* rtnl_link_info_ops::io_parse)(struct rtnl_link *, struct nlattr *, struct nlattr *)

Called to parse the link info attribute.

Must parse the attribute and assign all values to the link.

Definition at line 42 of file api.h.

void(* rtnl_link_info_ops::io_dump[NL_DUMP_MAX+1])(struct rtnl_link *, struct nl_dump_params *)

Called when the link object is dumped.

Must dump the info type specific attributes.

Definition at line 48 of file api.h.

int(* rtnl_link_info_ops::io_clone)(struct rtnl_link *, struct rtnl_link *)

Called when a link object is cloned.

Must clone all info type specific attributes.

Definition at line 53 of file api.h.

int(* rtnl_link_info_ops::io_put_attrs)(struct nl_msg *, struct rtnl_link *)

Called when construction a link netlink message.

Must append all info type specific attributes to the message.

Definition at line 57 of file api.h.

void(* rtnl_link_info_ops::io_free)(struct rtnl_link *)

Called to release all resources previously allocated in either io_alloc() or io_parse().

Definition at line 61 of file api.h.