diff options
author | Ben Pfaff <blp@nicira.com> | 2011-01-09 16:57:45 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-01-27 09:26:05 -0800 |
commit | cceb11f5b12d09cc8afc87ca4fd03e941234d439 (patch) | |
tree | 9dcdb79b49856023c9f63f4595d82c4a18b37ecf /lib/netlink-socket.h | |
parent | 18c58479a14f760fb03c2062f9a35961fc74ebb5 (diff) |
netlink-socket: Add functions for joining and leaving multicast groups.
When this library was originally implemented, support for Linux 2.4 was
important. The Netlink implementation in Linux only added support for
joining and leaving multicast groups after a socket is bound as of Linux
2.6.14, so the library did not support it either. But the current version
of Open vSwitch targets Linux 2.6.18 and over, so it's fine to add this
support now, and this commit does so.
This will be used more extensively in upcoming commits.
Reviewed by Justin Pettit.
Diffstat (limited to 'lib/netlink-socket.h')
-rw-r--r-- | lib/netlink-socket.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/netlink-socket.h b/lib/netlink-socket.h index dc21ce83..ad06d811 100644 --- a/lib/netlink-socket.h +++ b/lib/netlink-socket.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010 Nicira Networks. + * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,11 +45,12 @@ struct nl_sock; #endif /* Netlink sockets. */ -int nl_sock_create(int protocol, int multicast_group, - size_t so_sndbuf, size_t so_rcvbuf, - struct nl_sock **); +int nl_sock_create(int protocol, struct nl_sock **); void nl_sock_destroy(struct nl_sock *); +int nl_sock_join_mcgroup(struct nl_sock *, unsigned int multicast_group); +int nl_sock_leave_mcgroup(struct nl_sock *, unsigned int multicast_group); + int nl_sock_send(struct nl_sock *, const struct ofpbuf *, bool wait); int nl_sock_sendv(struct nl_sock *sock, const struct iovec iov[], size_t n_iov, bool wait); |