2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-28 12:58:00 +00:00

7 Commits

Author SHA1 Message Date
Ben Pfaff
0a397a2fca netlink-protocol: Move CTRL_ATTR_MCAST definitions for consistency.
One of the current goals of netlink-protocol.h, for better or for worse, is
to ensure that the same definitions are available whether a Linux kernel is
in use or not.  One of the ways it accomplishes this is by putting the
conditional definitions that test for features missing in old kernels at
the very end, after the dummy definitions used on non-Linux platforms.
However, commit b0025c8389f "netlink-protocol: Define missing symbols"
added new conditional definitions only in the Linux platform case, which
means that those definitions won't be available on non-Linux platforms.
This commit moves them to the end, instead.

The symbols that are moved are only used from netlink-socket.c, which is
only built on Linux platforms, so this does not change an actual bug.  It
only makes the location of the definitions consistent with prior practice.
2011-09-06 09:33:26 -07:00
Ethan Jackson
b0025c8389 netlink-protocol: Define missing symbols.
OVS fails to build with xenddk-56100build3926 because it has an
outdated genetlink header.
2011-09-02 08:03:57 -07:00
Ben Pfaff
cceb11f5b1 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.
2011-01-27 09:26:05 -08:00
Ben Pfaff
7c62447839 netlink: New function nl_attr_type().
Linux since v2.6.24 has a couple of couple of bits at the top of
nla_type that one is apparently supposed to ignore.  This commit
starts doing that in Open vSwitch userspace.

Acked-by: Jesse Gross <jesse@nicira.com>
2010-12-10 11:13:31 -08:00
Ben Pfaff
365a25176b netlink: Make netlink-protocol.h compatible with <linux/netlink.h>.
Until now, netlink-protocol.h and <linux/netlink.h> could not both be
included by a single source file, because they contained conflicting
definitions.  This commit fixes the problem, by having netlink-protocol.h
delegate to <linux/netlink.h> where it is available.

Here's an example of the problem: odp-util.c includes both
datapath-protocol.h and will need netlink-protocol.h also so that it can
look through actions defined as struct nlattr.  datapath-protocol.h
includes <linux/if_link.h> for the definition of rtnl_link_stats64, and
<linux/if_link.h> includes <linux/netlink.h>.

Acked-by: Jesse Gross <jesse@nicira.com>
2010-12-10 11:12:53 -08:00
Ben Pfaff
a14bc59fb8 Update primary code license to Apache 2.0. 2009-06-15 15:11:30 -07:00
Ben Pfaff
064af42167 Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45. 2009-07-08 13:19:16 -07:00