1. 07 Nov, 2014 3 commits
    • Thomas Haller's avatar
      policy: add manager for default routes and support multiple default routes · e8824f6a
      Thomas Haller authored
      Up to now, NMPolicy would iterate over all devices to find the "best"
      device and assign the default route to that device.
      
      A better approach is to add a default route to *all* devices that
      are never-default=no. The relative priority is choosen according to
      the route metrics.
      
      If two devices receive the same metric, we want to prefer the device
      that activates first. That way, the default route sticks to the same
      device until a better device activates or the device deactivates.
      Hence, the order of activation is imporant in this case (as it is
      already now).
      
      Also, if several devices have identical metrics, increment their
      metrics so that every metric is unique.
      This makes the routing deterministic according to what we choose as best
      device.
      
      A special case is assumed devices. In this case we cannot adjust the metric
      in face of equal metrics.
      
      Add a new singleton class NMDefaultRouteManager that has a list of all
      devices and their default routes. The manager will order the devices by
      their priority and configure the routes using platform.
      
      Also update the metric for VPN connections. Later we will track VPN
      routes also via NMDefaultRouteManager. For now, fix the VPN metric because
      otherwise VPNs would always get metric 1024 (which is usually much larger then the
      device metrics).
      
      https://bugzilla.gnome.org/show_bug.cgi?id=735512Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
      e8824f6a
    • Thomas Haller's avatar
      808ad85f
    • Thomas Haller's avatar
      core: move definition of NMLinkType to nm-types.h · c52e3310
      Thomas Haller authored
      As we use NMLinkType in NetworkManagerUtils.h, we cannot use
      the utils header without nm-platform.h. That is clearly wrong.
      Apparently NMLinkType has a wider use outside of platform (and
      its name is not prefixed with 'platform' either).
      
      Move the enum definition to nm-types.h.
      Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
      c52e3310
  2. 20 Oct, 2014 1 commit
  3. 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
  4. 01 Aug, 2014 1 commit
    • 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
  5. 23 Jul, 2014 1 commit
    • Dan Winship's avatar
      core: fill in nm-types.h, clean out other headers · b28f6526
      Dan Winship authored
      Clean up some of the cross-includes between headers (which made it so
      that, eg, if you included NetworkManagerUtils.h in a test program, you
      would need to build the test with -I$(top_srcdir)/src/platform, and if
      you included nm-device.h you'd need $(POLKIT_CFLAGS)) by moving all
      GObject struct definitions for src/ and src/settings/ into nm-types.h
      (which already existed to solve the NMDevice/NMActRequest circular
      references).
      
      Update various .c files to explicitly include the headers they used to
      get implicitly, and remove some now-unnecessary -I options from
      Makefiles.
      b28f6526
  6. 17 Dec, 2012 1 commit
  7. 15 Feb, 2011 1 commit
  8. 04 Feb, 2011 1 commit
  9. 10 Nov, 2010 1 commit
  10. 28 Feb, 2009 1 commit
  11. 03 Nov, 2008 1 commit
  12. 26 Jun, 2008 1 commit
  13. 19 Feb, 2007 1 commit
    • Tambet Ingo's avatar
      2007-02-19 Tambet Ingo <tambet@ximian.com> · 3dcd9d2d
      Tambet Ingo authored
      	* src/vpn-manager/nm-vpn-manager.c: Handle the DBUS state changes itself.
      	Handle device state changes and disconnect VPN if it's device deactivates.
      
      	* src/nm-dbus-nm.c: 
      	* src/nm-dbus-nm.h: 
      	* src/nm-dbus-device.c: 
      	* src/nm-dbus-device.c: 
      	* src/nm-dbus-net.c: 
      	* src/nm-dbus-net.h: Remove. All of it is implemented byt the new dbus API.
      
      	* src/NetworkManagerMain.h: Get rid of all but 3 properties of NMData.
      
      	* src/nm-device.c (nm_device_get_by_udi):
      	(nm_device_get_by_iface): Remove. This doesn't belong here and is already
      	implemented in the correct location (NMManager).
      	Rip out all the test_device stuff.
      
      	* src/NetworkManagerPolicy.c: Remove the leftover activation success and
      	failure handlers, it's all done by NMDevice already.
      
      	* src/NetworkManager.c: Move the signal handling here from nm-logging.c
      	Remove the iochannel hack to route the unix signals to the main thread since
      	we're not threaded anymore.
      
      	* src/NetworkManagerAP.c: Implement HWAddress property.
      
      	* src/NetworkManagerDbus.c: Remove the dbus signal sending code, it happens
      	automatically with dbus-glib.
      
      	* src/nm-netlink-monitor.c: 
      	* src/nm-netlink-monitor.h:
      		- Move it low in the class hierarchy, don't reference any NM types.
      		- Remove private data from the header.
      		- Use type safe checks in public API methods.
      		- Make it a singleton so we don't have to pass the single reference around.
      
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2339 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      3dcd9d2d
  14. 27 Feb, 2006 1 commit
  15. 11 Feb, 2005 1 commit
    • Dan Williams's avatar
      2005-02-11 Dan Williams <dcbw@redhat.com> · 1cc2f8c3
      Dan Williams authored
      	* dhcpcd/client.c
      		- (dhcp_init): only print out client ID and class ID if they are specified
      
      	* src/NetworkManagerDbus.[ch]
      	  src/nm-dbus-nm.[ch]
      	  src/nm-dbus-device.[ch]
      	  src/nm-dbus-net.[ch]
      		- Move NM, Device, and Net functions to separate files and use the
      			dbus method list stuff in NetworkManagerDbusUtils.c to do
      			method dispatching
      
      	* src/NetworkManagerDbusUtils.c
      		- Add new validate_method called before each dispatch (if present)
      			that can validate the method call
      
      	* src/NetworkManagerWireless.c
      		- (nm_wireless_qual_to_percent): Fix misplaced "!" that caused signal
      			levels never to be evaluated
      
      	Patch from j@bootlab.org
      	* src/NetworkManagerDevice.c
      		- Add typedef for "u64"
      
      	* src/backends/NetworkManagerDebian.c
      		- Copy in Dave Woodhouse's fixes for IPv6
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@438 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      1cc2f8c3
  16. 25 Aug, 2004 1 commit
  17. 05 Aug, 2004 2 commits
  18. 28 Jul, 2004 1 commit
    • Dan Williams's avatar
      2004-07-27 Dan Williams <dcbw@redhat.com> · b0d607f9
      Dan Williams authored
      	* Remove various Makefile.in files
      
      	* TODO
      		- Add some more items
      
      	* configure.in
      		- Add checks for OpenSSL/md5 headers and libs
      
      	* src/Makefile.am
      		- Use OpenSSL CFLAGS
      
      	* src/NetworkManagerAP.[ch]
      		- Remove 'stamp' functions, replace with 'invalid' functions
      			to support user cancelling WEP key entry
      
      	* src/NetworkManagerDbus.c
      		- Remove 'stamp' return functions
      		- Treat returned user key as a passphrase and convert to a WEP key,
      			but don't actually use the WEP key yet.  We use the returned user
      			key as a hexadecimal WEP key until we can figure out a UI for
      			passphrase-vs-hex key
      
      	* src/NetworkManagerWireless.[ch]
      		- Add passphrase-to-128bit-key function
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@28 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      b0d607f9
  19. 25 Jul, 2004 1 commit
    • Dan Williams's avatar
      2004-07-24 Dan Williams <dcbw@redhat.com> · 8ae95bf5
      Dan Williams authored
      	* src/NetworkManager.[ch]
      	  src/NetworkManagerDbus.[ch]
      	  src/NetworkManagerDevice.[ch]
      	  src/NetworkManagerPolicy.c
      	  src/NetworkManagerWireless.[ch]
      		- Add many more g_return_if_fail()/g_return_val_if_fail() checks
      		- Pass the NMData application data structure through all calls
      			that need it so we can get rid of nm_get_global_data()
      		- Change deallocation of the allowed_ap_list GSList in preparation
      			for not completely clearing it every time we get an update,
      			but instead getting incremental updates via GConf/dbus
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@20 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      8ae95bf5
  20. 06 Jul, 2004 1 commit
    • Dan Williams's avatar
      2004-07-05 Dan Williams <dcbw@redhat.com> · 019e2337
      Dan Williams authored
      	* dispatcher-daemon/NetworkManagerDispatcher.c
      		- A bit more descriptive state message
      		- Don't segfault when reading directory
      
      	* src/NetworkManager.h
      		- Remove NMData desired_ap member, its now
      			per-device rather than global
      
      	* src/NetworkManager.c
      		- Remove references to desired_ap
      		- Move the allowed AP list refresh stuff into a thread
      
      	* src/NetworkManagerDevice.c
      	  src/NetworkManagerDevice.h
      		- Each wireless device now has a "best ap"
      		- Make device activate/deactivate functions per-device
      		- Make wireless scanning per-device
      		- Add IPv4 address discover functions, stub IPv6 ones
      		- Move ethernet address validation functions to NetworkManagerUtils.c
      		- Add wireless access point accessor function
      		- Get/Set functions for "best ap"
      
      	* src/NetworkManagerPolicy.c
      		- Move activate/deactivate stuff into NetworkManagerDevice.c, per-device
      		- Deal with per-device "best ap" rather than data->desired_apa
      		- Implement allowed access point worker thread
      		- Add nm_policy_essid_is_allowed() function
      
      	* src/NetworkManagerUtils.c
      	  src/NetworkManagerUtils.h
      	  	- Add nm_ethernet_address_is_valid() function
      		- Add IPv4/IPv6 address get functions
      
      	* src/NetworkManagerWireless.c
      	  src/NetworkManagerWireless.h
      		- Move scanning stuff into NetworkManagerDevice.c, per-device
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@12 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      019e2337
  21. 24 Jun, 2004 1 commit