1. 03 Apr, 2019 1 commit
  2. 30 Apr, 2018 1 commit
  3. 17 Mar, 2017 4 commits
    • Thomas Haller's avatar
      libnm: revert coercing NMVpnConnectionStateReason to NMActiveConnectionStateReason · 5022e3b8
      Thomas Haller authored
      NMVpnConnectionStateReason is no longer used and replaced by
      NMActiveConnectionStateReason. However, the old enums should
      stay in place as they were:
      
      Otherwise:
        #define NMVpnConnectionStateReason NMActiveConnectionStateReason
      causes compiler warnings:
        NMVpnConnectionStateReason x;
        x = NM_VPN_CONNECTION_STATE_REASON_UNKNOWN;             // -Wenum-conversion
        if (x == NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS) { } // -Wenum-compare
      
      Similarly, a user who didn't upgrade shall continue to get the
      old GType for NM_TYPE_VPN_CONNECTION_STATE_REASON.
      
      In practice, old users will have no issues using the old enum
      the places where it worked before.
      The only use of the deprecated enum is in vpn_state_changed()
      signal slot of NMVpnConnection. This makes the signal slot
      itself deprecated. However, NMVpnConnection is an NMObject and commonly
      created within libnm itself, not by the user. It is very unlikely that
      a user of libnm subclassed NMVpnConnection and makes use of the
      vpn_state_changed() signal slot. So, deprecate it without replacement.
      
      Fixes: a91369f8
      5022e3b8
    • Thomas Haller's avatar
      e65aa9e6
    • Lubomir Rintel's avatar
      libnm-core: drop NMVpnConnectionStateReason · a91369f8
      Lubomir Rintel authored
      It's now the same as NMActiveConnectionStateReason. Keep a compatibility
      typedef and enum.
      a91369f8
    • Lubomir Rintel's avatar
      libnm-core/trivial: include literals next to NMVPNStateReason values · 67688fd2
      Lubomir Rintel authored
      Makes it slightly more readable, useful when we copy it to
      NMActiveConnectionStateReason.
      67688fd2
  4. 04 Oct, 2016 1 commit
    • Atul Anand's avatar
      libnm: API for Proxy Feature · 2a40112e
      Atul Anand authored
      libnm-core has been expanded to include proxy settings which clients
      like nmcli, nm-connection-editor use to configure proxy in PacRunner. It
      offers three modes i.e 'auto', 'manual'and 'none' and accordingly take
      data to configure PacRunner. The modes matches on the PacRunner side too.
      2a40112e
  5. 04 Jul, 2016 1 commit
  6. 05 Apr, 2016 1 commit
  7. 07 Nov, 2014 1 commit
  8. 16 Aug, 2014 1 commit
    • Dan Winship's avatar
      all: fix up multiple-include-guard defines · c81fb49a
      Dan Winship authored
      Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and
      libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include
      guard, which meant that nm-test-utils.h could not tell which of them
      was being included (and so, eg, if you tried to include
      nm-ip4-config.h in a libnm test, it would fail to compile because
      nm-test-utils.h was referring to symbols in src/nm-ip4-config.h).
      
      Fix this by changing the include guards in the non-API-stable parts of
      the tree:
      
        - libnm-glib/nm-ip4-config.h remains   NM_IP4_CONFIG_H
        - libnm/nm-ip4-config.h now uses     __NM_IP4_CONFIG_H__
        - src/nm-ip4-config.h now uses       __NETWORKMANAGER_IP4_CONFIG_H__
      
      And likewise for all other headers.
      
      The two non-"nm"-prefixed headers, libnm/NetworkManager.h and
      src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and
      __NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely
      consistent with the general scheme, do still mostly make sense in
      isolation.
      c81fb49a
  9. 01 Aug, 2014 5 commits
    • Dan Winship's avatar
      libnm: rename NetworkManager.h and NetworkManagerVPN.h · 3ddce748
      Dan Winship authored
      "NetworkManager.h"'s name (and non-standard capitalization) suggest
      that it's some sort of high-level super-important header, but it's
      really just low-level D-Bus stuff. Rename it to "nm-dbus-interface.h"
      and likewise "NetworkManagerVPN.h" to "nm-vpn-dbus-interface.h"
      3ddce748
    • Dan Winship's avatar
    • Dan Winship's avatar
      libnm, core, cli, tui: fix the capitalization of various types · 3ac0f528
      Dan Winship authored
      GLib/Gtk have mostly settled on the convention that two-letter
      acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
      become initial-caps-only (eg, "Tcp").
      
      NM was inconsistent, with most long acronyms using initial caps only
      (Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
      PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
      three-or-more-letter-long acronyms (and update nmcli and nmtui for the
      libnm changes).
      3ac0f528
    • Dan Winship's avatar
      libnm: add libnm/libnm-core (part 2) · eedcf185
      Dan Winship authored
      This fixes up the code from the previous "clean" import, and adds
      build infrastructure.
      
      [There are two slightly orthogonal sets of changes in this patch.
      First, the files added in the previous commit were modified as followed:
      
        # Replace internal references to "libnm-util" and "libnm-glib" with "libnm"
        perl -pi -e 's/libnm-(util|glib)/libnm/;' libnm-core/*.[ch] libnm-core/tests/*.[ch] libnm/*.[ch] libnm/tests/*.[ch]
      
        # Fix includes of the enum-types files
        perl -pi -e 's/nm-utils-enum-types/nm-core-enum-types/;' libnm-core/*.[ch] libnm-core/tests/*.[ch] libnm/*.[ch] libnm/tests/*.[ch]
        perl -pi -e 's/nm-glib-enum-types/nm-enum-types/;' libnm/*.[ch] libnm/tests/*.[ch]
      
        # Fix some python example code
        perl -pi -e 's/import NMClient/import NM/;' -e 's/NMClient.Client\(\)/NM.Client()/;' libnm/nm-client.c
      
      Then, the build infrastructure was added (without further modifying
      any existing files in libnm-core or libnm.)
      
      Note: to regenerate libnm.ver after rebase:
        (head -2 libnm-util/libnm-util.ver; (grep -h '\s'nm_ libnm-util/libnm-util.ver libnm-glib/libnm-glib.ver | env LANG=C sort); tail -3 libnm-util/libnm-util.ver) > libnm/libnm.ver
      ]
      eedcf185
    • Dan Winship's avatar
      libnm: add libnm/libnm-core (part 1) · d595f784
      Dan Winship authored
      This commit begins creating the new "libnm", which will replace
      libnm-util and libnm-glib.
      
      The main reason for the libnm-util/libnm-glib split is that the daemon
      needs to link to libnm-util (to get NMSettings, NMConnection, etc),
      but can't link to libnm-glib (because it uses many of the same type
      names as the NetworkManager daemon. eg, NMDevice). So the daemon links
      to only libnm-util, but basically all clients link to both.
      
      With libnm, there will be only a single client-visible library, and
      NetworkManager will internally link against a private "libnm-core"
      containing the parts that used to be in libnm-util.
      
      (The "libnm-core" parts still need to be in their own directory so
      that the daemon can see those header files without also seeing the
      ones in libnm/ that conflict with its own headers.)
      
      [This commit just copies the source code from libnm-util/ to
      libnm-core/, and libnm-glib/ to libnm/:
      
        mkdir -p libnm-core/tests/
        mkdir -p libnm/tests/
        cp libnm-util/*.[ch] libnm-util/nm-version.h.in libnm-core/
        rm -f libnm-core/nm-version.h libnm-core/nm-setting-template.[ch] libnm-core/nm-utils-enum-types.[ch]
        cp libnm-util/tests/*.[ch] libnm-core/tests/
        cp libnm-glib/*.[ch] libnm/
        rm -f libnm/libnm_glib.[ch] libnm/libnm-glib-test.c libnm/nm-glib-enum-types.[ch]
        cp libnm-glib/tests/*.[ch] libnm/tests/
      
      ]
      d595f784
  10. 23 Jul, 2014 1 commit
  11. 15 Jul, 2014 4 commits
    • Dan Winship's avatar
      libnm-util: NetworkManager.h/NetworkManagerVPN.h doc fixups · 6e51e460
      Dan Winship authored
      Add gtk-docs for enum types that previously didn't have them.
      
      Explicitly note the relationship between NetworkManager.h /
      NetworkManagerVPN.h types and the corresponding introspection/*.xml
      types.
      6e51e460
    • Dan Winship's avatar
      libnm-util, libnm-glib: whitespace fixes · 2570c5a1
      Dan Winship authored
      Fix indentation, kill trailing whitespace, split some long lines.
      2570c5a1
    • Dan Winship's avatar
      libnm-util, libnm-glib: standardize copyright/license headers · cb7e1893
      Dan Winship authored
      - Remove list of authors from files that had them; these serve no
        purpose except to quickly get out of date (and were only used in
        libnm-util and not libnm-glib anyway).
      
      - Just say "Copyright", not "(C) Copyright" or "Copyright (C)"
      
      - Put copyright statement after the license, not before
      
      - Remove "NetworkManager - Network link manager" from the few files
        that contained it, and "libnm_glib -- Access network status &
        information from glib applications" from the many files that
        contained it.
      
      - Remove vim modeline from nm-device-olpc-mesh.[ch], add emacs modeline
        to files that were missing it.
      cb7e1893
    • Dan Winship's avatar
      libnm-util: move NetworkManager.h, etc, from include/ to here · 7eb0288a
      Dan Winship authored
      NetworkManager.h, NetworkManagerVPN.h, and nm-version.h are part of
      the libnm-util API, so move them to libnm-util.
      
      include/ still contains headers that are strictly NM-internal (eg,
      nm-glib-compat.h).
      7eb0288a
  12. 27 Sep, 2013 2 commits
    • Jiří Klimeš's avatar
      vpn: fix VPN plugin D-Bus errors · 282b9df6
      Jiří Klimeš authored
      The errors were documented as org.freedesktop.NetworkManager.VPN.Error.*,
      but the actual values were org.freedesktop.NetworkManager.VPN.Plugin.*
      
      Also update the errors documentation.
      282b9df6
    • Jiří Klimeš's avatar
      vpn: fix connecting to VPN (bgo #708255) · 9dff8306
      Jiří Klimeš authored
      The ConnectInteractive() -> Connect() fallback code doesn't work, because
      _connect_internal() changes the state to NM_VPN_SERVICE_STATE_STARTING before
      checking if it can implement ConnectInteractive(), and then when the Connect()
      call comes in, the VPN is not in STOPPED or INIT, so it returns an error.
      
      The commit moves setting state to STARTING after the ConnectInteractive() check
      availability, in the plugin. We introduce new plugin error and set it when the
      the plugin does not implement ConnectInteractive(). NetworkManager uses this
      error for ConnectInteractive() -> Connect() fallback.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=708255
      9dff8306
  13. 30 May, 2012 2 commits
    • Dan Winship's avatar
      vpn: support IPv6 over VPNs · 960c1ae8
      Dan Winship authored
      Add new API to allow passing both IPv4 and IPv6 configuration
      information from VPN plugins to the backend.
      
      Now instead of a single Ip4Config, a plugin has Config, Ip4Config, and
      Ip6Config. "Config" contains information which is neither IPv4 nor
      IPv6 specific, and also indicates which of Ip4Config and Ip6Config are
      present. Ip4Config now only contains the IPv4-specific bits of
      configuration.
      
      There is backward compatibility in both directions: if the daemon is
      new and the VPN plugin is old, then NM will notice that the plugin
      emitted the Ip4Config signal without having emitted the Config signal
      first, and so will assume that it is IPv4-only, and that the generic
      bits of configuration have been included with the Ip4Config. If the
      daemon is old and the plugin is new, then NMVPNPlugin will copy the
      values from the generic config into the IPv4 config as well. (In fact,
      NMVPNPlugin *always* does this, because it's harmless, and it's easier
      than actually checking the daemon version.)
      
      Currently the VPN is still configured all-at-once, after both IPv4 and
      IPv6 information has been received, but the APIs allow for the
      possibility of configuring them one at a time in the future.
      960c1ae8
    • Dan Winship's avatar
      vpn: allow connecting to an IPv6-based VPN endpoint · f3069897
      Dan Winship authored
      Even if a VPN is only tunneling IPv4, you might still be connected to
      the tunnel endpoint via IPv6. Allow
      NM_VPN_PLUGIN_IP4_CONFIG_EXT_GATEWAY to be either an IPv4 or an IPv6
      address, and set up an appropriate static route either way.
      f3069897
  14. 15 Mar, 2012 1 commit
  15. 13 Aug, 2010 1 commit
  16. 17 Aug, 2009 1 commit
  17. 13 Aug, 2009 2 commits
  18. 11 Oct, 2008 2 commits
    • Dan Williams's avatar
      2008-10-11 Dan Williams <dcbw@redhat.com> · f078992e
      Dan Williams authored
      	* include/NetworkManager.h
      	  introspection/nm-device.xml
      	  include/NetworkManagerVPN.h
      		- Add a few more state reasons for the device deactivated state
      
      	* src/nm-device-interface.c
      	  src/nm-device-interface.h
      		- (nm_device_interface_deactivate): add a 'reason' argument
      
      	* src/nm-device.c
      	  src/nm-device.h
      		- (nm_device_deactivate, nm_device_take_down): add a 'reason' argument
      		- (nm_device_state_changed): pass the state change reason to
      			nm_device_take_down()
      		- (nm_device_set_managed): take a 'reason' argument, and pass it along
      			to the state change function
      
      	* src/nm-manager.c
      	  src/nm-manager.h
      		- (remove_one_device, handle_unmanaged_devices, sync_devices,
      		   impl_manager_sleep): pass a reason code to nm_device_set_managed()
      		- (nm_manager_deactivate_connection): add a 'reason' argument and pass
      			something reasonable along to VPN deactivation
      
      	* src/vpn-manager/nm-vpn-manager.c
      	  src/vpn-manager/nm-vpn-manager.h
      		- (nm_vpn_manager_deactivate_connection): add a 'reason' argument and
      			pass that along to nm_vpn_connection_disconnect()
      
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4174 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      f078992e
    • Dan Williams's avatar
      2008-10-11 Dan Williams <dcbw@redhat.com> · 1c0a0ec4
      Dan Williams authored
      	Add support for VPN subnet gateways (bgo #549196)
      
      	* include/NetworkManager.h
      		- Add key for internal VPN subnet gateway
      
      	* src/vpn-manager/nm-vpn-connection.c
      		- (ip_address_to_string): return a const from a static buffer so we
      			don't leak a lot of strings
      		- (print_vpn_config): print internal VPN gateway as well
      		- (nm_vpn_connection_ip4_config_get): grab internal VPN gateway from
      			VPN service too
      		- (nm_vpn_connection_get_ip4_internal_gateway): new function
      
      	* src/NetworkManagerSystem.c
      	  src/NetworkManagerSystem.h
      		- (nm_system_device_replace_default_ip4_route): split into two, one for
      			VPN connections and one for normal devices
      		- (replace_default_ip4_route): break out route stuff into its own function
      		- (nm_system_replace_default_ip4_route_vpn,
      		   nm_system_replace_default_ip4_route): simplify by having two cases,
      			one for VPNs and one for normal devices
      
      	* src/NetworkManagerPolicy.c
      		- (update_routing_and_dns): simplify, use split default route replacement
      			functions
      
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4169 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      1c0a0ec4
  19. 22 Sep, 2008 1 commit
    • Tambet Ingo's avatar
      2008-09-22 Tambet Ingo <tambet@gmail.com> · b37fc863
      Tambet Ingo authored
      	* src/vpn-manager/nm-vpn-connection.c: Add a signal handler for the
      	"Failure" signal from VPN plugins, store the failure reason, and
      	use it when the state is changed to failure.
      
      	* introspection/nm-vpn-plugin.xml: Fix the "Failure" signal's type
      	description.
      
      	* include/NetworkManagerVPN.h (NMVPNConnectionStateReason): Add a new
      	reason to the end of the list to not break the API.
      	(NMVPNPluginFailure): Move it here (from libnm-glib/nm-vpn-plugin.h)
      	so it can be shared by plugins and daemon.
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4088 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      b37fc863
  20. 07 Jul, 2008 1 commit
  21. 26 Jun, 2008 1 commit
  22. 06 Jun, 2008 1 commit
    • Dan Williams's avatar
      2008-06-06 Dan Williams <dcbw@redhat.com> · 7b1882b5
      Dan Williams authored
      	Patch from Tambet Ingo  <tambet@gmail.com>
      
      	* src/NetworkManagerSystem.c
      	  src/NetworkManagerSystem.h
      		- (nm_system_device_add_ip4_route_via_device_with_iface): remove
      		- (nm_system_device_set_from_ip4_config): remove unused route_to_iface
      		- (nm_system_device_set_ip4_route): clean up
      		- (nm_system_vpn_device_set_from_ip4_config): clean up, add VPN routes
      
      	* src/nm-device.c
      		- (nm_device_set_ip4_config): remove unused route_to_iface bits
      
      	* src/vpn-manager/nm-vpn-connection.c
      		- (ip_address_to_string): new function
      		- (print_vpn_config): use ip_address_to_string
      		- (merge_vpn_routes): add user-defined routes to the ip4 config
      		- (nm_vpn_connection_ip4_config_get): add routes the VPN server sent
      
      	* include/NetworkManagerVPN.h
      		- Add 'routes' key
      
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3728 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      7b1882b5
  23. 13 May, 2008 1 commit
  24. 01 Oct, 2007 1 commit
    • Dan Williams's avatar
      2007-10-01 Dan Williams <dcbw@redhat.com> · e5b834c1
      Dan Williams authored
      	* include/NetworkManagerVPN.h
      		- define VPN connection state change reason codes
      
      	* src/vpn-manager/Makefile.am
      	  src/vpn-manager/nm-vpn-marshal.list
      	  src/vpn-manager/nm-vpn-marshal-main.c
      		- Add marshallers for StateChanged signal
      
      	* introspection/nm-vpn-connection.xml
      		- New Banner property
      		- StateChanged signal now includes a 'reason' argument
      
      	* src/vpn-manager/nm-vpn-connection.c
      	  src/vpn-manager/nm-vpn-connection.h
      		- Add a "Banner" property that contains the returned VPN server login
      			banner (if any); valid only in the ACTIVATED state
      		- (nm_vpn_connection_set_state, nm_vpn_connection_disconnect): now takes
      			a 'reason' argument and emits that reason along with the
      			state-changed signal
      		- Fix up calls to nm_vpn_connection_set_state() to include a reason
      		- (nm_vpn_connection_ip4_config_get): save banner for later
      		- (nm_vpn_connection_get_banner, get_property,
      		   nm_vpn_connection_class_init): implement Banner property
      
      	* src/vpn-manager/nm-vpn-service.c
      		- (nm_vpn_service_connections_stop): take a reason argument; copy the
      			connection list because elements may get added/removed from it
      			while iterating over the list
      		- (connection_state_changed): signal now includes the 'reason' argument
      
      	* libnm-glib/nm-vpn-connection.c
      	  libnm-glib/nm-vpn-connection.h
      		- (nm_vpn_connection_get_banner): new function
      		- (state_changed_proxy): handle reason argument
      
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2916 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      e5b834c1
  25. 27 Sep, 2007 1 commit
  26. 12 Sep, 2007 1 commit
    • Tambet Ingo's avatar
      2007-09-12 Tambet Ingo <tambet@gmail.com> · 326d1e86
      Tambet Ingo authored
              * src/vpn-manager/nm-vpn-connection.[ch]: 
              * src/vpn-manager/nm-vpn-manager.[ch]:
              * src/vpn-manager/nm-vpn-service.[ch]: Rewrite the vpn handling
              * code. Using 
              dbus-glib, GObjects, signals etc.
      
              * libnm-glib/nm-vpn-manager.[ch]: 
              * libnm-glib/nm-vpn-connection.[ch]: Now that the NM
              * implementation changed
              so much, rewrite these too.
      
              * libnm-glib/Makefile.am: Add new files to build, build new
              * binding files for
              the new introspection files.
      
              * libnm-glib/nm-client.[ch]: Remove all VPN related stuff from
              * here.
      
              * libnm-glib/nm-dbus-utils.[ch]: Renamed from nm-utils.[ch] that
              * was shadowing
              the header with the same name from libnm-utils.
      
              * libnm-glib/nm-vpn-plugin.[ch]: Implement.
      
              * libnm-util/Makefile.am: Add nm-utils.[ch] to build.
      
              * introspection/nm-vpn-plugin.xml: Implement.
      
              * introspection/nm-vpn-connection.xml: Implement.
      
              * introspection/nm-vpn-manager.xml: Implement.
      
              * src/NetworkManagerSystem.c
              * (nm_system_vpn_device_set_from_ip4_config): Remove
              the named manager argument, it can just as easily get it as the
      caller.
              (nm_system_vpn_device_unset_from_ip4_config): Ditto.
      
              * src/vpn-manager/nm-dbus-vpn.[ch]: Remove.
      
              * src/nm-dbus-manager.h: Fix up the name_owner signal signature.
      
              * src/dhcp-manager/nm-dhcp-manager.c (garray_to_string): Remove,
              * use one from
              libnm-utils.
      
              * libnm-util/nm-connection.c: Ditto.
      
              * src/NetworkManagerMain.h: Remove, it's finally empty.
      
              * configure.in: Remove utils/ from build.
      
              * include/NetworkManagerVPN.h: Add some more defines to reduce
              * the amount
              of hard-coded strings.
      
              * utils/: Move it over to libnm-util.
      
              * test/Makefile.am: Link against libnm-util now that util/ is
              * gone.
      
              * dispatcher-daemon/Makefile.am: Ditto.
      
              * src/Makefile.am: Ditto.
      
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2798 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      326d1e86