data.h 976 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * netlink/data.h Abstract Data
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation version 2.1
  7. * of the License.
  8. *
  9. * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch>
  10. */
  11. #ifndef NETLINK_DATA_H_
  12. #define NETLINK_DATA_H_
  13. #include <netlink/netlink.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. struct nl_data;
  18. /* General */
  19. extern struct nl_data * nl_data_alloc(void *, size_t);
  20. extern struct nl_data * nl_data_alloc_attr(struct nlattr *);
  21. extern struct nl_data * nl_data_clone(struct nl_data *);
  22. extern int nl_data_append(struct nl_data *, void *, size_t);
  23. extern void nl_data_free(struct nl_data *);
  24. /* Access Functions */
  25. extern void * nl_data_get(struct nl_data *);
  26. extern size_t nl_data_get_size(struct nl_data *);
  27. /* Misc */
  28. extern int nl_data_cmp(struct nl_data *, struct nl_data *);
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif