libnl
3.2.3
|
00001 /* 00002 * netlink/data.h Abstract Data 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation version 2.1 00007 * of the License. 00008 * 00009 * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch> 00010 */ 00011 00012 #ifndef NETLINK_DATA_H_ 00013 #define NETLINK_DATA_H_ 00014 00015 #include <netlink/netlink.h> 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00021 struct nl_data; 00022 00023 /* General */ 00024 extern struct nl_data * nl_data_alloc(void *, size_t); 00025 extern struct nl_data * nl_data_alloc_attr(struct nlattr *); 00026 extern struct nl_data * nl_data_clone(struct nl_data *); 00027 extern int nl_data_append(struct nl_data *, void *, size_t); 00028 extern void nl_data_free(struct nl_data *); 00029 00030 /* Access Functions */ 00031 extern void * nl_data_get(struct nl_data *); 00032 extern size_t nl_data_get_size(struct nl_data *); 00033 00034 /* Misc */ 00035 extern int nl_data_cmp(struct nl_data *, struct nl_data *); 00036 00037 #ifdef __cplusplus 00038 } 00039 #endif 00040 00041 #endif