platform: link management
authorPavel Šimerda <psimerda@redhat.com>
Wed, 27 Mar 2013 21:23:24 +0000 (22:23 +0100)
committerPavel Šimerda <psimerda@redhat.com>
Wed, 10 Apr 2013 14:40:58 +0000 (16:40 +0200)
commit15fd7cd75ea2122a4fbf7af03051080adaff666c
tree41b643e4c9d81a2bfe79a35114774456b87c98ea
parentb530603019ec78e660079c0b6e025ba3064a3611
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.
18 files changed:
configure.ac
src/Makefile.am
src/main.c
src/platform/Makefile.am [new file with mode: 0644]
src/platform/nm-fake-platform.c [new file with mode: 0644]
src/platform/nm-fake-platform.h [new file with mode: 0644]
src/platform/nm-linux-platform.c [new file with mode: 0644]
src/platform/nm-linux-platform.h [new file with mode: 0644]
src/platform/nm-platform.c [new file with mode: 0644]
src/platform/nm-platform.h [new file with mode: 0644]
src/platform/tests/.gitignore [new file with mode: 0644]
src/platform/tests/Makefile.am [new file with mode: 0644]
src/platform/tests/dump.c [new file with mode: 0644]
src/platform/tests/monitor.c [new file with mode: 0644]
src/platform/tests/test-common.c [new file with mode: 0644]
src/platform/tests/test-common.h [new file with mode: 0644]
src/platform/tests/test-link.c [new file with mode: 0644]
valgrind.suppressions