1. 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
  2. 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
  3. 06 Jun, 2014 4 commits
    • Dan Williams's avatar
      dispatcher: add PRE_UP states · 19d7386b
      Dan Williams authored
      This event runs before a connection/device is announced as
      "activated" or "connected", to enable scripts to do things
      before applications begin using connectivity.  For example,
      this could be used to manage /etc/resolv.conf outside of
      NetworkManager and ensure that resolv.conf had correct
      information before DNS is used.
      
      Note that this is different than the Debian or Gentoo "pre-up"
      event used in /etc/network/interfaces, as that event runs before
      any L2 configuration has started.  If we really need an event
      like that, we'll add it later as "lower-up".
      19d7386b
    • Dan Williams's avatar
      dispatcher: robustify canceling dispatcher calls · 286e926e
      Dan Williams authored
      Thomas pointed out that using the address of the DispatcherInfo
      structure as the dispatcher call ID could cause a mis-cancelation
      if malloc re-used the same block in the future.  While the code
      should be correctly clearing call IDs after the callback runs
      or is canceled, just use numeric IDs to avoid potential crashses.
      286e926e
    • Dan Williams's avatar
      dispatcher: add synchronous dispatcher calls · 90b747fa
      Dan Williams authored
      On shutdown we can't defer the response to a callback, so we need to
      use synchronous D-Bus calls.  Second, sometimes we want to block on
      the dispatcher response, like for pre-down.
      90b747fa
    • Dan Williams's avatar
      dispatcher: only dispatch if scripts exist · 5150cb88
      Dan Williams authored
      If there are no dispatcher scripts, don't bother dispatching any
      events.  This saves some time configuring networking if the event
      would have no effect anyway.
      5150cb88
  4. 11 Sep, 2012 3 commits
  5. 21 May, 2012 1 commit
  6. 17 Dec, 2010 1 commit
    • Dan Williams's avatar
      policy: stop touching /etc/hosts · 39eed50e
      Dan Williams authored
      Handling of /etc/hosts is highly site- and admin- specific in
      many more complex cases, and it's exceedingly hard and error-
      prone for NetworkManager to handle all those cases.  So remove
      this functionality entirely.  That's not a big loss, as it
      turns out there's a much more elegant solution.
      
      The only requirement is that the machine's hostname map back
      to an IP address owned by the machine.  That requirement can
      be satisifed by nss-myhostname or even possibly the distro's
      installer.  If the user does not want nss-myhostname then it
      can be uninstalled.  Distros should use a "recommends" feature
      in their packaging system so that the NetworkManager package
      does *not* have a hard requirement on nss-myhostname.  Thus
      everyone is happy; things Just Work when nss-myhostname is
      installed, but more advanced users can uninstall it and
      customize /etc/hosts as they wish.
      
      Another alternative is a dispatcher script that listents for
      the 'hostname' event, and updates /etc/hosts according to the
      administrator's preference.
      39eed50e
  7. 07 Oct, 2010 1 commit
  8. 22 Jun, 2010 1 commit
    • Dan Williams's avatar
      policy: map hostname to current IP address (bgo #619931) · debb16cf
      Dan Williams authored
      Instead of always mapping the current hostname to 127.0.0.1 or
      whatever the user mapped it to manually, make sure the hostname
      maps to the default device's IPv4 and IPv6 address if there's
      a default device.
      
      This helps out services that do a lookup on the machine hostname
      to determine the IP address, which while a broken behavior (since
      there are too many edge-cases) is pretty wide-spread and thus
      we should support it.
      debb16cf
  9. 18 Jun, 2010 1 commit
  10. 19 Apr, 2010 1 commit
  11. 02 Mar, 2010 1 commit
    • Dan Williams's avatar
      hosts: always check and update /etc/hosts if needed (rh #569914) · e8b5bcca
      Dan Williams authored
      If the hostname was changed while NM wasn't running, and thus /etc/hosts
      was out of sync with the new hostname, NM wouldn't make sure that
      the new hostname was mapped in /etc/hosts.  Make sure that happens
      and add a bunch of testcases for /etc/hosts rewriting.
      e8b5bcca
  12. 03 Nov, 2008 1 commit
  13. 26 Jun, 2008 1 commit
  14. 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
  15. 27 Feb, 2006 1 commit
  16. 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
  17. 25 Aug, 2004 1 commit
  18. 05 Aug, 2004 2 commits
  19. 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
  20. 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
  21. 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
  22. 24 Jun, 2004 1 commit