Thread (10 messages) flat view 10 messages, 3 authors, 2012-02-26

Re: [PATCH 1/3] netlink: add netlink_dump_control structure for netlink_dump_start()

From: Jan Engelhardt <hidden>
Date: 2012-02-25 01:12:22
Also in: netfilter-devel

On Saturday 2012-02-25 01:30, pablo@netfilter.org wrote:
From: Pablo Neira Ayuso <pablo@netfilter.org>

Davem considers that the argument list of this interface is getting
out of control. This patch tries to address this issue following
his proposal:

struct netlink_dump_control c = { .dump = dump, .done = done, ... };

netlink_dump_start(..., &c);
What about adding skb and nlh into c as well? After all, skb
is not nearly as much {used directly} as it is in Xtables.
+		{
+			struct netlink_dump_control c = {
+				.dump = link->dump,
+				.done = link->done,
+			};
+			return netlink_dump_start(crypto_nlsk, skb, nlh, &c);
+		}
You can also use

		return netlink_dump_start(crypto_nlsk, skb,
		       &(const struct netlink_dump_control)
		       {.dump = link->dump, .done = link->done}));
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help