diff options
author | Thomas Graf <tgr@lsx.localdomain> | 2008-04-29 23:31:30 +0200 |
---|---|---|
committer | Thomas Graf <tgr@lsx.localdomain> | 2008-04-29 23:31:30 +0200 |
commit | 535e83162249ed6274ba46bc72d8cc683ba20e17 (patch) | |
tree | fa3b60b4116668b86d23c11b695ff371d771b997 /include/netlink/list.h | |
parent | 8ac78f1552fa6b6340776513c8a7c36f7b72e498 (diff) | |
download | libnl-535e83162249ed6274ba46bc72d8cc683ba20e17.tar.gz |
Big routing code rework (API/ABI BREAK!)
Adds all missing routing attributes and brings the routing
related code to a working state. In the process the API
was broken several times with the justification that nobody
is using this code yet.
The changes include new example code which is also a prototype
for how plain CLI tools could look like to control routes.
Diffstat (limited to 'include/netlink/list.h')
-rw-r--r-- | include/netlink/list.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/netlink/list.h b/include/netlink/list.h index e7a2646..c6876a7 100644 --- a/include/netlink/list.h +++ b/include/netlink/list.h @@ -68,6 +68,9 @@ static inline int nl_list_empty(struct nl_list_head *head) #define NL_LIST_HEAD(name) \ struct nl_list_head name = { &(name), &(name) } +#define nl_list_first_entry(head, type, member) \ + nl_list_entry((head)->next, type, member) + #define nl_list_for_each_entry(pos, head, member) \ for (pos = nl_list_entry((head)->next, typeof(*pos), member); \ &(pos)->member != (head); \ |