General | |
struct nl_data * | nl_data_alloc (const void *buf, size_t size) |
Allocate a new abstract data object. More... | |
struct nl_data * | nl_data_alloc_attr (const struct nlattr *nla) |
Allocate abstract data object based on netlink attribute. More... | |
struct nl_data * | nl_data_clone (const struct nl_data *src) |
Clone an abstract data object. More... | |
int | nl_data_append (struct nl_data *data, void *buf, size_t size) |
Append data to an abstract data object. More... | |
void | nl_data_free (struct nl_data *data) |
Free an abstract data object. More... | |
Attribute Access | |
void * | nl_data_get (const struct nl_data *data) |
Get data buffer of abstract data object. More... | |
size_t | nl_data_get_size (const struct nl_data *data) |
Get size of data buffer of abstract data object. More... | |
Misc | |
int | nl_data_cmp (const struct nl_data *a, const struct nl_data *b) |
Compare two abstract data objects. More... | |
Allocate a new abstract data object.
Allocates a new abstract data and copies the specified data buffer into the new handle.
References nl_data::d_data, nl_data::d_size, data, NULL, and size.
Referenced by nfnl_nft_chain_set_name(), nfnl_nft_chain_set_table(), nfnl_nft_rule_set_chain(), nfnl_nft_rule_set_table(), nfnl_nft_set_set_name(), nfnl_nft_set_set_table(), nfnl_nft_table_set_name(), nl_data_alloc_attr(), nl_data_clone(), and rtnl_cls_data().
Allocate abstract data object based on netlink attribute.
Allocates a new abstract data and copies the payload of the attribute to the abstract data object.
References nl_data_alloc(), nla_data(), and nla_len().
Append data to an abstract data object.
Reallocates an abstract data and copies the specified data buffer into the new handle.
References BUG, nl_data::d_data, nl_data::d_size, NLE_NOMEM, and size.
Referenced by rtnl_u32_add_key().
Clone an abstract data object.
References nl_data::d_data, nl_data::d_size, and nl_data_alloc().
Compare two abstract data objects.
References nl_data_get(), and nl_data_get_size().
Free an abstract data object.
References nl_data::d_data.
Referenced by nfnl_nft_chain_set_name(), nfnl_nft_chain_set_table(), nfnl_nft_rule_set_chain(), nfnl_nft_rule_set_table(), nfnl_nft_set_set_name(), nfnl_nft_set_set_table(), and nfnl_nft_table_set_name().
Get data buffer of abstract data object.
References nl_data::d_data, nl_data::d_size, and NULL.
Referenced by nfnl_nft_chain_get_name(), nfnl_nft_chain_get_table(), nfnl_nft_rule_get_chain(), nfnl_nft_rule_get_table(), nfnl_nft_set_get_name(), nfnl_nft_set_get_table(), nfnl_nft_table_get_name(), nl_data_cmp(), nla_put_data(), and rtnl_cls_data().
Get size of data buffer of abstract data object.
References nl_data::d_size.
Referenced by nl_data_cmp(), and nla_put_data().