| 1 |
/* SPDX-License-Identifier: LGPL-2.1-only */ |
| 2 |
/* |
| 3 |
* Copyright (c) 2003-2008 Thomas Graf <[email protected]> |
| 4 |
*/ |
| 5 |
|
| 6 |
#ifndef NETLINK_DATA_H_ |
| 7 |
#define NETLINK_DATA_H_ |
| 8 |
|
| 9 |
#include <netlink/netlink.h> |
| 10 |
|
| 11 |
#ifdef __cplusplus |
| 12 |
extern "C" { |
| 13 |
#endif |
| 14 |
|
| 15 |
struct nlattr; |
| 16 |
|
| 17 |
struct nl_data; |
| 18 |
|
| 19 |
/* General */ |
| 20 |
extern struct nl_data * nl_data_alloc(const void *, size_t); |
| 21 |
extern struct nl_data * nl_data_alloc_attr(const struct nlattr *); |
| 22 |
extern struct nl_data * nl_data_clone(const struct nl_data *); |
| 23 |
extern int nl_data_append(struct nl_data *, const void *, size_t); |
| 24 |
extern void nl_data_free(struct nl_data *); |
| 25 |
|
| 26 |
/* Access Functions */ |
| 27 |
extern void * nl_data_get(const struct nl_data *); |
| 28 |
extern size_t nl_data_get_size(const struct nl_data *); |
| 29 |
|
| 30 |
/* Misc */ |
| 31 |
extern int nl_data_cmp(const struct nl_data *, |
| 32 |
const struct nl_data *); |
| 33 |
|
| 34 |
#ifdef __cplusplus |
| 35 |
} |
| 36 |
#endif |
| 37 |
|
| 38 |
#endif |