add libnl-tiny as a small replacement for libnl with only genl support included
[openwrt/svn-archive/archive.git] / package / libnl-tiny / src / include / netlink-types.h
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
12 #ifndef NETLINK_LOCAL_TYPES_H_
13 #define NETLINK_LOCAL_TYPES_H_
14
15 #include <netlink/list.h>
16
17 struct nl_cache_ops;
18 struct nl_sock;
19 struct nl_object;
20
21 struct nl_cache
22 {
23 struct nl_list_head c_items;
24 int c_nitems;
25 int c_iarg1;
26 int c_iarg2;
27 struct nl_cache_ops * c_ops;
28 };
29
30 struct nl_cache_assoc
31 {
32 struct nl_cache * ca_cache;
33 change_func_t ca_change;
34 };
35
36 struct nl_cache_mngr
37 {
38 int cm_protocol;
39 int cm_flags;
40 int cm_nassocs;
41 struct nl_sock * cm_handle;
42 struct nl_cache_assoc * cm_assocs;
43 };
44
45 struct nl_parser_param;
46
47 #define LOOSE_COMPARISON 1
48
49
50 struct nl_data
51 {
52 size_t d_size;
53 void * d_data;
54 };
55
56 struct nl_addr
57 {
58 int a_family;
59 unsigned int a_maxsize;
60 unsigned int a_len;
61 int a_prefixlen;
62 int a_refcnt;
63 char a_addr[0];
64 };
65
66 #define IFQDISCSIZ 32
67
68 #define GENL_OP_HAS_POLICY 1
69 #define GENL_OP_HAS_DOIT 2
70 #define GENL_OP_HAS_DUMPIT 4
71
72 struct genl_family_op
73 {
74 uint32_t o_id;
75 uint32_t o_flags;
76
77 struct nl_list_head o_list;
78 };
79
80
81 #endif