1. 18 Feb, 2019 1 commit
  2. 18 Apr, 2018 1 commit
  3. 05 Apr, 2018 1 commit
  4. 09 Jan, 2018 1 commit
    • Thomas Haller's avatar
      shared: add NMCListElem · 2aad517b
      Thomas Haller authored
      Sometimes, we want to use CList to track a simple data item. But contrary
      to GList/GSList, we need to define a structure to hold the data pointer
      and the CList member.
      Add a generic NMCListElem type that can be used for such simple uses.
      Before you ask: why not use GList/GSList? Because even simple operations
      like g_list_append() is O(n), which kinda defeats the purpose of having
      a doubly linked list.
      This code is added to a new header file nm-c-list.h, the reason is that
      there is no other good place:
        - "nm-utils/c-list.h" is a clone of upstream, it should not deviate.
        - "nm-utils/c-list-util.h" contains our utils functions for c-list.h
          but should be plain C, independent of glib.
        - "nm-utils/nm-shared-utils.h" contains our glib related utilities,
          but it should not drag in "c-list.h".
      So, "nm-c-list.h" is a utility libray that extends "c-list.h" and
      requires glib.
  5. 25 Jul, 2017 1 commit
    • Thomas Haller's avatar
      c-list: add c_list_sort() · 1c5d9829
      Thomas Haller authored
      Add a stable, recursive merge sort for CList.
      This could be improved by doing an iterative implementation.
      The recursive implementation's stack depth is not an issue,
      as it is bound by O(ln(n)). But an iterative implementation
      would safe the overhead of O(n*log(n)) function calls and be
      potentially faster.
  6. 21 Nov, 2016 1 commit
  7. 03 Oct, 2016 1 commit
  8. 07 Sep, 2016 2 commits
    • Thomas Haller's avatar
      dhcp: call synchronous Notify D-Bus method from nm-dhcp-helper · 2856a658
      Thomas Haller authored
      A D-Bus signal is asynchronous and it can happen that nm-dhcp-helper
      emits the "Event" signal before the server is able to register a handler:
         nmcli general logging level TRACE
         for i in `seq 1 500`; do $NM_DHCP_HELPER & done
         journalctl -u NetworkManager --since '1 min ago' | grep "didn't have associated interface" | wc -l
      Avoid that, by calling the synchronous D-Bus method "Notify".
      Interestingly, this race seem to exist since 2007.
      Actually, we called g_dbus_connection_signal_subscribe() from inside
      GDBusServer:new-connection signal. So it is not clear how such a race
      could exist. I was not able to reproduce it by putting a sleep
      before g_dbus_connection_signal_subscribe(). On the other hand, there
      is bug rh#1372854 and above reproducer which strongly indicates that
      events can be lost under certain circumstances.
      Now we instead g_dbus_connection_register_object() from the
      new-connection signal. According to my tests there was no more race
      as also backed by glib's documentation. Still, keep a simple retry-loop
      in nm-dhcp-helper just to be sure.
    • Thomas Haller's avatar
  9. 17 Aug, 2016 2 commits
    • Thomas Haller's avatar
      all: cleanup includes in header files · 0bdcab10
      Thomas Haller authored
      - don't include "nm-default.h" in header files. Every source file must
        include as first header "nm-default.h", thus our headers get the
        default include already implicitly.
      - we don't support compiling NetworkManager itself with a C++ compiler. Remove
        G_BEGIN_DECLS/G_END_DECLS from internal headers. We do however support
        users of libnm to use C++, thus they stay in public headers.
      (cherry picked from commit f19aff89)
    • Thomas Haller's avatar
      all: cleanup includes in header files · f19aff89
      Thomas Haller authored
      - don't include "nm-default.h" in header files. Every source file must
        include as first header "nm-default.h", thus our headers get the
        default include already implicitly.
      - we don't support compiling NetworkManager itself with a C++ compiler. Remove
        G_BEGIN_DECLS/G_END_DECLS from internal headers. We do however support
        users of libnm to use C++, thus they stay in public headers.
  10. 05 Aug, 2015 1 commit
  11. 24 Jul, 2015 1 commit
    • Dan Winship's avatar
      all: rename nm-glib-compat.h to nm-glib.h, use everywhere · 3452ee2a
      Dan Winship authored
      Rather than randomly including one or more of <glib.h>,
      <glib-object.h>, and <gio/gio.h> everywhere (and forgetting to include
      "nm-glib-compat.h" most of the time), rename nm-glib-compat.h to
      nm-glib.h, include <gio/gio.h> from there, and then change all .c
      files in NM to include "nm-glib.h" rather than including the glib
      headers directly.
      (Public headers files still have to include the real glib headers,
      since nm-glib.h isn't installed...)
      Also, remove glib includes from header files that are already
      including a base object header file (which must itself already include
      the glib headers).
  12. 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
  13. 01 Aug, 2014 2 commits
    • 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/
    • Dan Winship's avatar
      libnm-glib: fix a crash when using multiple NMClients · fe264a2d
      Dan Winship authored
      NMObjectCache was assuming there would never be more than one object
      with the same path, but since NMClient is an NMObject, it was getting
      cached too, so if you created two clients and then unreffed one of
      them, it's possible the wrong one could get left in the cache, causing
      a crash the next time the other one called nm_object_cache_clear().
      Fix this by only adding NMObjects to the cache in the codepaths where
      we also check to see if the object was already in the cache.
      (This also means we can remove the "except" argument to
      nm_object_cache_clear(), since the NMClient won't be cached any more.)
  14. 15 Jul, 2014 1 commit
    • 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.
  15. 23 Apr, 2012 1 commit
  16. 12 Mar, 2012 1 commit
  17. 16 Feb, 2011 1 commit
  18. 19 Jan, 2009 1 commit
  19. 14 Nov, 2008 1 commit
  20. 26 Aug, 2008 1 commit
  21. 26 Jun, 2008 1 commit
  22. 24 Mar, 2008 1 commit
    • Dan Williams's avatar
      2008-03-24 Dan Williams <dcbw@redhat.com> · 00735165
      Dan Williams authored
      	Massive fixup of libnm-glib to:
      	a) have all objects (with the exception of VPN) cache their properties and
      		update them asynchronously on PropertiesChanged signals from NM
      	b) return internal const data for most attributes/properties instead of
      		allocated values that the caller must free
      	c) cache wrapped objects such that a given D-Bus path will always map to the
      		same GObject returned by libnm-glib
      	d) remove a few signals and move them to GObject property notifications
      	e) match recent NM D-Bus API changes for activation/deactivation
      	f) remove some private functions from libnm-glib headers
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3491 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  23. 19 Dec, 2006 1 commit
    • Dan Williams's avatar
      2006-12-19 Dan Williams <dcbw@redhat.com> · a6f5833c
      Dan Williams authored
      	Big wpa_supplicant + dbus update; need latest wpa_supplicant from CVS
      	plus a few other patches from wpa_supplicant bugzilla.
      	* src/Makefile.am
      		- Move all connection management and association handling to
      			wpa_supplicant over dbus, rather than spawning a private copy
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2192 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  24. 13 Oct, 2006 1 commit
    • Dan Williams's avatar
      2006-10-13 Dan Williams <dcbw@redhat.com> · 129d0ca4
      Dan Williams authored
      	* src/supplicant-manager/Makefile.am
      		- Add new files
      	* src/supplicant-manager/nm-supplicant-manager.[ch]:
      		- Make it a minimal GObject
      	* src/supplicant-manager/nm-supplicant-settings-verify.[ch]:
      		- Verify settings destined for wpa_supplicant
      	* src/supplicant-manager/nm-supplicant-connection.[ch]:
      		- Minimal GObject to track wpa_supplicant controlled device
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2060 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  25. 27 Feb, 2006 1 commit
  26. 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]
      		- 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
  27. 25 Aug, 2004 1 commit
  28. 05 Aug, 2004 2 commits
  29. 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
  30. 25 Jul, 2004 1 commit
    • Dan Williams's avatar
      2004-07-24 Dan Williams <dcbw@redhat.com> · 8ae95bf5
      Dan Williams authored
      	* src/NetworkManager.[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
  31. 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
      		- 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
      	  	- Add nm_ethernet_address_is_valid() function
      		- Add IPv4/IPv6 address get functions
      	* src/NetworkManagerWireless.c
      		- 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
  32. 24 Jun, 2004 1 commit