netlink-types.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * netlink-types.h Netlink Types (Private)
  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_LOCAL_TYPES_H_
  12. #define NETLINK_LOCAL_TYPES_H_
  13. #include <netlink/list.h>
  14. struct nl_cache_ops;
  15. struct nl_sock;
  16. struct nl_object;
  17. struct nl_cache
  18. {
  19. struct nl_list_head c_items;
  20. int c_nitems;
  21. int c_iarg1;
  22. int c_iarg2;
  23. struct nl_cache_ops * c_ops;
  24. };
  25. struct nl_cache_assoc
  26. {
  27. struct nl_cache * ca_cache;
  28. change_func_t ca_change;
  29. };
  30. struct nl_cache_mngr
  31. {
  32. int cm_protocol;
  33. int cm_flags;
  34. int cm_nassocs;
  35. struct nl_sock * cm_handle;
  36. struct nl_cache_assoc * cm_assocs;
  37. };
  38. struct nl_parser_param;
  39. #define LOOSE_COMPARISON 1
  40. struct nl_data
  41. {
  42. size_t d_size;
  43. void * d_data;
  44. };
  45. struct nl_addr
  46. {
  47. int a_family;
  48. unsigned int a_maxsize;
  49. unsigned int a_len;
  50. int a_prefixlen;
  51. int a_refcnt;
  52. char a_addr[0];
  53. };
  54. #define IFQDISCSIZ 32
  55. #define GENL_OP_HAS_POLICY 1
  56. #define GENL_OP_HAS_DOIT 2
  57. #define GENL_OP_HAS_DUMPIT 4
  58. struct genl_family_grp {
  59. struct genl_family *family; /* private */
  60. struct nl_list_head list; /* private */
  61. char name[GENL_NAMSIZ];
  62. u_int32_t id;
  63. };
  64. struct genl_family_op
  65. {
  66. uint32_t o_id;
  67. uint32_t o_flags;
  68. struct nl_list_head o_list;
  69. };
  70. #endif