aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netlink.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2010-05-04 20:36:46 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-21 12:37:32 -0400
commit910a7e905f36e51a17d6e8bb4ad6dcd5ac5f1d53 (patch)
tree63587b03de37a6b9a6b58c203719a24d57edf850 /include/linux/netlink.h
parentd6523ddf2376f39eaa89a4d68a33052d20c138b9 (diff)
netlink: Implment netlink_broadcast_filtered
When netlink sockets are used to convey data that is in a namespace we need a way to select a subset of the listening sockets to deliver the packet to. For the network namespace we have been doing this by only transmitting packets in the correct network namespace. For data belonging to other namespaces netlink_bradcast_filtered provides a mechanism that allows us to examine the destination socket and to decide if we should transmit the specified packet to it. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/netlink.h')
-rw-r--r--include/linux/netlink.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 6eaca5e1e8ca..59d066936ab9 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -188,6 +188,10 @@ extern int netlink_has_listeners(struct sock *sk, unsigned int group);
188extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); 188extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
189extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, 189extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,
190 __u32 group, gfp_t allocation); 190 __u32 group, gfp_t allocation);
191extern int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb,
192 __u32 pid, __u32 group, gfp_t allocation,
193 int (*filter)(struct sock *dsk, struct sk_buff *skb, void *data),
194 void *filter_data);
191extern int netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); 195extern int netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code);
192extern int netlink_register_notifier(struct notifier_block *nb); 196extern int netlink_register_notifier(struct notifier_block *nb);
193extern int netlink_unregister_notifier(struct notifier_block *nb); 197extern int netlink_unregister_notifier(struct notifier_block *nb);