Commit Graph

14 Commits

Author SHA1 Message Date
Pavel Šimerda
e2009e3fe3 platform: don't use gateway as key attribute for routes
On Linux, the gateway attribute is not a key attribute and therefore is
not necessary for functions that just need to identify a route. This may
be revisited when porting to other platforms but for now I want to keep
things simple.
2013-05-03 15:38:57 +02:00
Dan Winship
283b8fb7d0 platform: add ifindex arg to NMPlatform signals
In some cases, callers don't need to distinguish, eg,
ip4-address-added from ip6-address-added, but just need to know what
device the event occurred on. Make this simpler by including the
ifindex as a separate explicit argument, allowing callers to just
ignore the struct part.
2013-05-03 08:39:00 -04:00
Pavel Šimerda
a313da882a platform: suppress kernel's automatic creation of bond0 (rh #953466)
Which it does whenever the 'bonding' module gets loaded no matter
what name the user wants to give the new bond interface.

Ported nm-system fix from commit 7cc95d8, using system() to avoid
dependency on NM libs.

Automatic test included. You have to run 'rmmod bonding' before testing
to ensure that the module is not already inserted. Second run without
rmmod always succeeds.
2013-04-29 14:05:01 +02:00
Pavel Šimerda
f5507633f8 platform: bridging and bonding options 2013-04-20 03:43:25 +02:00
Pavel Šimerda
359dc35aa3 platform: setter/getter of /proc/sys and /sys options 2013-04-20 03:43:25 +02:00
Pavel Šimerda
81bf475b78 platform: master and slave devices 2013-04-20 03:43:25 +02:00
Pavel Šimerda
6ede6ed17f trivial: fix typo in comment 2013-04-17 12:30:09 +02:00
Pavel Šimerda
0361b1ca8f trivial: ETHTOOL_GLINK usage explanation 2013-04-17 12:27:29 +02:00
Pavel Šimerda
5cc26c60ef trivial: use nl_cache_free instead of nl_cache_put
nl_cache_put is not present in older but still supported libnl releases.
2013-04-15 13:46:50 +02:00
Pavel Šimerda
b636ea86b1 platform: link features (carrier-detect and vlans)
Thanks to Jiří Pírko for help with ethtool features.
2013-04-10 16:40:58 +02:00
Pavel Šimerda
3071cc6511 platform: route management
Extend nm-platform to support IPv4 and IPv6 route management.

Route features:

* Retrieve the list of IPv4 and IPv6 routes
* Add/delete/lookup IPv4 and IPv6 routes
* Flush all non-linklocal routes
2013-04-10 16:40:58 +02:00
Pavel Šimerda
0209db4111 platform: address management
Extend nm-platform to support IPv4 and IPv6 address management.

Address features:

* Retrieve the list of IPv4 and IPv6 addresses
* Add/delete/lookup IPv4 and IPv6 addresses
* Flush all non-linklocal addresses
2013-04-10 16:40:58 +02:00
Pavel Šimerda
c1e53dbf7c platform: link state, carrier and arp 2013-04-10 16:40:58 +02:00
Pavel Šimerda
15fd7cd75e platform: link management
Create the new nm-platform framework and implement link (or interface)
management. The nm-platform serves as the point of contact between
the rest of NetworkManager and the operating system.

There are two backends for nm-platform:

* NMFakePlatform: Fake kernel backend for testing purposes
* NMLinuxPlatform: Linux kernel backend for actual use

A comprehensive testsuite is included and will be extended with new
feature additions. To enable the Linux part of the testsuite, use
--enable-tests=root configure options and run 'make check' as root.
Use --enable-code-coverage for code coverage support.

  ./autogen.sh --enable-tests=root --enable-code-coverage
  make
  make -C src/platform check-code-coverage

Link features:

* Retrieve the list of links
* Translate between indexes and names
* Discover device type
* Add/remove dummy interfaces (for testing)

Thanks to Thomas Graf for helping with libnl3 synchronization issues.
2013-04-10 16:40:58 +02:00