1. 24 May, 2016 1 commit
    • Thomas Haller's avatar
      core: drop NMConnectionProvider and use NMSettings directly · 5337003c
      Thomas Haller authored
      This is not C# but glib. Using interfaces is so cumbersome, that they
      don't simplify code but make it more complicated.
      
      E.g. following signals and its subscribers is complicated enough. It gets
      more complicated by having NM_SETTINGS_SIGNAL_CONNECTION_ADDED and
      NM_CP_SIGNAL_CONNECTION_ADDED. Of course, your favorite IDE has no idea
      about glib interfaces, so figuring out who calls who gets more
      complicated.
      
      This undoes commit 4fe48b12. Originally,
      NMConnectionProvider had only one function get_best_connection(). But it
      kept growing and more functions were added.
      
      If we want to ~hide~ certain part of the NMSettings API, we should move them
      to a separate header which gives internal access.
      5337003c
  2. 17 May, 2016 1 commit
  3. 28 Apr, 2016 2 commits
  4. 26 Apr, 2016 1 commit
  5. 07 Apr, 2016 1 commit
  6. 05 Apr, 2016 2 commits
    • Thomas Haller's avatar
      build: disable deprecation checks for internal compilation · 9152dec9
      Thomas Haller authored
      For internal compilation we want to be able to use deprecated
      API without warnings.
      
      Define the version min/max macros to effectively disable deprecation
      warnings.
      
      However, don't do it via CFLAGS option in the makefiles, instead hack it
      to "nm-default.h". After all, *every* source file that is for internal
      compilation needs to include this header as first.
      9152dec9
    • Thomas Haller's avatar
      build: reorder files for building platform · e4c1699a
      Thomas Haller authored
      Build the sources in order so that files that depend on other
      files are build after the files they depend on.
      e4c1699a
  7. 21 Mar, 2016 1 commit
  8. 11 Mar, 2016 2 commits
    • Thomas Haller's avatar
      systemd: split "nm-sd.h" out of "nm-sd-adapt.h" · aed3c810
      Thomas Haller authored
      Now we have:
      
      "nm-sd.h" is a header file of NetworkManager with utilities
      related to systemd. It can be used anywhere freely.
      
      Also, systemd headers that are considered public API (like
      "sd-event.h") can be used without restrictions.
      
      When compiling the systemd sources, we always must include
      "nm-sd-adapt.h" as first. Similarly, systemd headers must
      not include "nm-sd-adapt.h", because they are either public
      (in which case the adapter is not needed) or they are internal
      (in which case they are themself included via a systemd source).
      
      Sometimes, we must internal API (like "dhcp-lease-internal.h").
      In this case, we also must include "nm-sd-adapt.h".
      aed3c810
    • Thomas Haller's avatar
      systemd: integrate sd-event into glib main loop · a8bc65b1
      Thomas Haller authored
      We should not try to reimplement sd-event based on glib,
      instead we should hook sd-event into the glib mainloop.
      a8bc65b1
  9. 08 Mar, 2016 2 commits
  10. 07 Mar, 2016 1 commit
    • Thomas Haller's avatar
      platform: add network namespace support to platform · c7b38625
      Thomas Haller authored
      Add a new NMPNetns class. This allows creation, deletion and
      switching of network namespaces. The API only offers push/pop
      operations to switch the namespace. This way the API enforces
      the user to always restore the previous namespace.
      
      A NMPlatform instance not only uses the netlink socket, but also
      sysfs, udev, ethtool, mii. Still, a NMPlatform instance lives
      entirely inside one namespace and is not spanning multiple namespaces.
      To properly support network namespaces, the platform instance must
      switch the namespace as necessary, transparent to the caller.
      Udev is only supported in the main namespace.
      
      For now, network namespaces are not actually used and are disabled
      via the NM_PLATFORM_NETNS_SUPPORT argument.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=762408
      c7b38625
  11. 04 Mar, 2016 1 commit
  12. 01 Mar, 2016 2 commits
    • Thomas Haller's avatar
      systemd/tests: add test util for systemd · 51e29288
      Thomas Haller authored
      Most interestingly is also, whether we can link libsystemd.a without
      having undefined references (which might be wrongly satisfied by an
      externally loaded libsystem shared library.
      51e29288
    • Thomas Haller's avatar
      core: split "nm-core-utils.h" out of "NetworkManagerUtils.h" · adb56d13
      Thomas Haller authored
      "NetworkManagerUtils.h" contains a bunch of helper tools for core
      daemon ("src/").
      
      Unfortunately, it has dependencies to other parts of core,
      such as "nm-device.h" and "nm-platform.h". Split out a part
      of tools that are independent so that they can be used without
      dragging in other dependencies.
      
      "nm-core-utils.h" should only use libnm-core, "nm-logging.h"
      and shared.
      
      "NetworkManagerUtils.h" should provide all "nm-core-utils.h" and
      possibly other utilities that have larger dependencies.
      adb56d13
  13. 29 Feb, 2016 1 commit
  14. 20 Jan, 2016 1 commit
  15. 24 Dec, 2015 1 commit
    • Thomas Haller's avatar
      build: rename directory "include" to "shared" · db80ec05
      Thomas Haller authored
      Up to now, the "include" directory contained (only) header files that were
      used project-wide by libs, core, clients, et al.
      
      Since the directory now also contains a non-header file, the "include"
      name is misleading. Instead of adding yet another directory that is
      project-wide, with non-header-only content, rename the "include"
      directory to "shared".
      db80ec05
  16. 01 Dec, 2015 2 commits
    • Beniamino Galvani's avatar
      device: remove NMDeviceGre · 3dfeec75
      Beniamino Galvani authored
      As per previous commit, GRE tunnels are now represented as generic IP
      tunnel devices.
      3dfeec75
    • Beniamino Galvani's avatar
      device: add NMDeviceIPTunnel · 570fdce9
      Beniamino Galvani authored
      The new object type represents tunnels over IPv4 and IPv6.
      
      We have a single setting type (NMSettingIPTunnel) for tunnels and it
      can't be shared among different device factories. So we define also a
      single device type for all tunnels.
      
      This new object will also represent GRE tunnels, which before were
      instantiated as NMDeviceGre and had a ".Device.Gre" D-Bus
      interface. This commit introduces a change in behavior.
      570fdce9
  17. 24 Nov, 2015 1 commit
  18. 10 Nov, 2015 1 commit
  19. 14 Oct, 2015 1 commit
  20. 13 Oct, 2015 1 commit
    • Lubomir Rintel's avatar
      vpn-manager: support multiple VPN connections of the same type · 5b48befa
      Lubomir Rintel authored
      A separate instance of the support plugin is spawned for each connection with
      a different bus name. The bus name is passed via --bus-name <name> argument.
      Plugins that support the feature indicate it with
      support-multiple-connections=true key in the [VPN Connection] section.
      
      The bus name is currently generated by adding a .<connection.uuid> to the VPN
      service name. It's guarranteed unique, but if it proves to be too long or ugly
      it can easily be replaced with something more meaningful (such as the same number
      as is used for connection's DBus name).
      
      NMVpnService has been removed and folded into NMVpnConnection. A
      NMVpnConnection will spawn a service plugin instance whenever it is activated
      and notices the bus name it needs is not provided.
      
      The NMVpnManager no longer needs to keep track of the connections in use apart
      for compatibility purposes with plugins that don't support the feature.
      5b48befa
  21. 12 Oct, 2015 1 commit
    • Beniamino Galvani's avatar
      device: export list of LLDP neighbors through D-Bus · 07a9364d
      Beniamino Galvani authored
      This adds a LldpNeighbors property to the Device D-Bus interface
      carrying information about devices discovered through LLDP. The
      property is an array of hashes and each hash describes the values of
      LLDP TLVs for a specific neighbor.
      07a9364d
  22. 30 Sep, 2015 1 commit
    • Thomas Haller's avatar
      build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h" · 7bf10a75
      Thomas Haller authored
      For libnm library, "nm-dbus-interface.h" contains defines like the D-Bus
      paths of NetworkManager. It is desirable to have this header usable without
      having a dependency on "glib.h", for example for a QT application. For that,
      commit c0852964 removed that dependancy.
      
      For libnm-glib library, the analog to "nm-dbus-interface.h" is
      "NetworkManager.h", and the same applies there. Commit
      159e827a removed that include.
      However, that broke build on PackageKit [1] which expected to get the
      version macros by including "NetworkManager.h". So at least for libnm-glib,
      we need to preserve old behavior so that a user including
      "NetworkManager.h" gets the version macros, but not "glib.h".
      
      Extract the version macros to a new header file "nm-version-macros.h".
      This header doesn't include "glib.h" and can be included from
      "NetworkManager.h". This gives as previous behavior and a glib-free
      include.
      
      For libnm we still don't include "nm-version-macros.h" to "nm-dbus-interface.h".
      Very few users will actually need the version macros, but not using
      libnm.
      Users that use libnm, should just include (libnm's) "NetworkManager.h" to
      get all headers.
      As a special case, a user who doesn't want to use glib/libnm, but still
      needs both "nm-dbus-interface.h" and "nm-version-macros.h", can include
      them both separately.
      
      [1] https://github.com/hughsie/PackageKit/issues/85
      
      Fixes: 4545a7fe
      7bf10a75
  23. 16 Sep, 2015 2 commits
  24. 10 Sep, 2015 1 commit
    • Dan Winship's avatar
      settings: trivial: rename NMSystemConfigInterface to NMSettingsPlugin · dfb77e3b
      Dan Winship authored
      Since there have not been separate system and user settings services
      since 0.8, the "system" in NMSystemConfigInterface is kind of
      meaningless. Rename it to NMSettingsPlugin, which describes what it
      does better.
      
      This is just:
      
          git mv src/settings/nm-system-config-interface.h src/settings/nm-settings-plugin.h
          git mv src/settings/nm-system-config-interface.c src/settings/nm-settings-plugin.c
          perl -pi -e 's/SystemConfigInterface/SettingsPlugin/g;' \
                   -e 's/system_config_interface/settings_plugin/g;' \
                   -e 's/system-config-interface/settings-plugin/g;' \
                   -e 's/SYSTEM_CONFIG_INTERFACE/SETTINGS_PLUGIN/g;' \
                   -e 's/sc_plugin/settings_plugin/g;' \
                   -e 's/SC_PLUGIN/SETTINGS_PLUGIN/g;' \
                   -e 's/SC_IS_PLUGIN/SETTINGS_IS_PLUGIN/g;' \
                   -e 's/SC_TYPE_PLUGIN/SETTINGS_TYPE_PLUGIN/g;' \
                   -e 's/SCPlugin/SettingsPlugin/g;' \
                   -e 's/nm_system_config_factory/nm_settings_plugin_factory/g;' \
               $(find src/settings -type f)
      
      (followed by some whitespace fixups in nm-settings-plugin.c, and a
      Makefile.am fix for the rename)
      dfb77e3b
  25. 04 Sep, 2015 1 commit
  26. 10 Aug, 2015 1 commit
    • Dan Winship's avatar
      core: final gdbus porting · 1cf35cb2
      Dan Winship authored
      Port remaining bits to gdbus and remove stray dbus-glib references
      
      Drop the dbus-glib version check from configure, since nothing depends
      on new dbus-glib any more.
      
      Move nm-dbus-glib-types.h and nm-gvaluearray-compat.h from include/ to
      libnm-util/ since they are now only used by libnm-util and libnm-glib.
      1cf35cb2
  27. 07 Aug, 2015 1 commit
  28. 05 Aug, 2015 3 commits
  29. 04 Aug, 2015 2 commits
  30. 24 Jul, 2015 1 commit
    • Dan Winship's avatar
      core: rename NMDBusManager to NMBusManager · 02370be7
      Dan Winship authored
      Our gdbus generated types use the same names as their corresponding
      "real" types, but with "NM" changed to "NMDBus".
      
      Unfortunately, that means that introspection/nmdbus-manager.c (the
      generated type for src/nm-manager.c) uses the same type name as the
      entirely unrelated src/nm-dbus-manager.c.
      
      Fix this by removing the "d" from src/nm-dbus-manager.c. (We could
      rename the generated type instead, but then it becomes inconsistent
      with all the other generated types, and we're already using it as
      "NMDBusManager" in libnm/nm-manager.c.)
      02370be7