|
libnl
3.7.0
|
Abstract data type representing a binary data blob. More...
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, const 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... | |
Abstract data type representing a binary data blob.
Related sections in the development guide:
| struct nl_data* nl_data_alloc | ( | const void * | buf, |
| size_t | size | ||
| ) |
Allocate a new abstract data object.
| buf | Data buffer containing the actual data. |
| size | Size of data buffer. |
Allocates a new abstract data and copies the specified data buffer into the new handle.
Definition at line 44 of file data.c.
Referenced by nl_data_alloc_attr(), and nl_data_clone().
Here is the caller graph for this function:| struct nl_data* nl_data_alloc_attr | ( | const struct nlattr * | nla | ) |
Allocate abstract data object based on netlink attribute.
| nla | Netlink attribute of unspecific type. |
Allocates a new abstract data and copies the payload of the attribute to the abstract data object.
Definition at line 78 of file data.c.
References nl_data_alloc(), nla_data(), and nla_len().
Here is the call graph for this function:| struct nl_data* nl_data_clone | ( | const struct nl_data * | src | ) |
Clone an abstract data object.
| src | Abstract data object |
Definition at line 89 of file data.c.
References nl_data_alloc().
Here is the call graph for this function:| int nl_data_append | ( | struct nl_data * | data, |
| const void * | buf, | ||
| size_t | size | ||
| ) |
Append data to an abstract data object.
| data | Abstract data object. |
| buf | Data buffer containing the data to be appended. |
| size | Size of data to be apppended. |
Reallocates an abstract data and copies the specified data buffer into the new handle.
| void nl_data_free | ( | struct nl_data * | data | ) |
| void* nl_data_get | ( | const struct nl_data * | data | ) |
Get data buffer of abstract data object.
| data | Abstract data object. |
Definition at line 148 of file data.c.
Referenced by nl_data_cmp(), nla_put_data(), and rtnl_tc_data_peek().
Here is the caller graph for this function:| size_t nl_data_get_size | ( | const struct nl_data * | data | ) |
Get size of data buffer of abstract data object.
| data | Abstract data object. |
Definition at line 160 of file data.c.
Referenced by nl_data_cmp(), and nla_put_data().
Here is the caller graph for this function:| int nl_data_cmp | ( | const struct nl_data * | a, |
| const struct nl_data * | b | ||
| ) |
Compare two abstract data objects.
| a | Abstract data object. |
| b | Another abstract data object. |
Definition at line 180 of file data.c.
References nl_data_get(), and nl_data_get_size().
Here is the call graph for this function: