Commit graph

3749 commits

Author SHA1 Message Date
Dan Williams b6b069d02e 2004-08-13 Dan Williams <dcbw@redhat.com>
* panel-applet/Makefile.am
		- Fix up cleanfiles and server_DATA/server_in_files


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@52 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-13 17:03:51 +00:00
Dan Williams 6b0bddf916 2004-08-13 Dan Williams <dcbw@redhat.com>
* configure.in
	  panel-applet/Makefile.am
		- Fixes to allow distcheck to pass


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@51 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-13 15:59:47 +00:00
Dan Williams 1984461297 2004-08-13 Dan Williams <dcbw@redhat.com>
* CONTRIBUTING
		- Add


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@50 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-13 15:41:31 +00:00
Dan Williams 7efe5ebc25 2004-08-13 Dan Williams <dcbw@redhat.com>
* README
		- Update with some comments on theory of operation


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@49 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-13 15:34:34 +00:00
Dan Williams 0895829142 2004-08-12 Dan Williams <dcbw@redhat.com>
* info-daemon/passphrase.glade
		- Set window title to " "

	* panel-applet/Makefile.am
	  panel-applet/keyring.png
		- Deliver to correct place

	* panel-applet/NMWirelessApplet.[ch]
		- Add comments
		- Remove applet->have_active_device as its no longer used
		- (nmwa_load_theme): load keyring.png too
		- (error_dialog): remove
		- (show_warning_dialog): subsume functionality of error dialog too
		- (nmwa_destroy, nmwa_new): create and dispose of an application-wide GConfClient
		- (nmwa_handle_network_choice): add to deal with user clicking on an item from
			the networks menu
		- (nmwa_menu_item_activated): GtkMenuItem "activate" signal handler
		- (nmwa_button_clicked, nmwa_setup_widgets): create and populate the menu on startup
			and when we get broadcasts of changed wireless access points only, not when the
			user clicks on the button to display the menu (too long of a wait)
		- (nmwa_add_menu_item): Make active network bold, and place a keyring icon beside
			networks that are encrypted
		- (nmwa_dispose_menu, nmwa_menu_item_data_free): dispose of the data we place on each
			menu item with g_object_set_data()

	* panel-applet/NMWirelessAppletDbus.[ch]
		- (nmwa_dbus_get_bool): add method to return boolean value from dbus message
		- (nmwa_dbus_get_active_network): add (nmwa_dbus_get_string() wrapper to get active network)
		- (nmwa_dbus_add_networks_to_menu): clean up, only show one instance of each ESSID in the menu
		- (nmwa_dbus_set_network): force NetworkManager to use a particular network for wireless cards
		- (nmwa_dbus_init, nmwa_dbus_filter): Trap network appear/disappear and device
			activation/deactivation signals and rebuild the menu when they happen

	* src/NetworkManager.c
		- (main): use new nm_spawn_process() rather than system()

	* src/NetworkManagerDbus.c
		- (nm_dbus_devices_handle_request): don't compare AP structure addresses directly, but essids
			instead.  Since we can now force best_aps to stick around, the AP structure to which
			dev->options.wireless.best_ap points to won't necessarily be in the device's device list
			if a scan has happened since the best_ap was frozen.  Also add "setNetwork" method
			to freeze the best_ap.

	* src/NetworkManagerDevice.[ch]
		- (nm_device_activation_worker): Use new nm_spawn_process() call rather than system()
		- (nm_device_*_best_ap): add freeze/unfreeze/get_frozen functions, and don't really update
			the best_ap in nm_device_update_best_ap() if the best_ap is frozen AND in the device's
			ap list

	* src/NetworkManagerUtils.[ch]
		- (nm_spawn_process): add replacement for system() usage


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@48 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-12 19:58:01 +00:00
Dan Williams f9b8cb84d1 2004-08-11 Dan Williams <dcbw@redhat.com>
* panel-applet/NMWirelessApplet.[ch]
		- Fix up copyright and credits to include Bastien and Eskil,
			who created the gnome-applets wireless applet, from whose
			skeleton this one was created
		- Rework nmwa_update_state()/nmwa_draw() so that state and which
			pixmap to draw is computed during nmwa_update_state()
		- Applet now shows itself all the time due to panel packing issues
			which caused the applet to previously never come back after hiding.
			When a wired device is the active device, the applet shows "not connected"

	* panel-applet/NMWirelessAppletDbus.[ch]
		- Clean up error messages and show what function they are from
		- nmwa_dbus_get_active_wireless_device()->nmwa_dbus_get_active_device()
		- Add new device type getters, and a status getter

	* src/NetworkManagerDbus.c
		- (nm_dbus_devices_handle_request): Don't return an active network unless that
			network is actually in the device's ap list
		- (nm_dbus_nm_message_handler): Fix silly mistake returning status

	* src/NetworkManagerDevice.c
		- (nm_device_update_best_ap): If the best AP is NULL, clear out the ESSID of the
			card

	* test/nmclienttest.c
		- Report status of NetworkManager too


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@47 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-11 19:31:41 +00:00
Dan Williams d06aa3e6ff 2004-08-11 Dan Williams <dcbw@redhat.com>
* info-daemon/NetworkManagerInfo.c:
		- (main): clean up Seth's code style

	* info-daemon/NetworkManagerInfoDbus.c:
		- Use the more aptly-named path/service/interface constants from NetworkManager
		- Don't return empty strings ("") as object paths ever, instead return errors

	* panel-applet/NMWirelessApplet.c:
		- Clean up Seth's code style

	* src/NetworkManager.[ch]
		- (nm_remove_device_from_list): remove anything having to do with pending_device
		- (main, nm_print_usage): change --daemon=[yes|no] -> --no-daemon

	* src/NetworkManagerAPList.[ch]
		- Move Iter struct right above the iter functions to preserve opacity
		- (nm_ap_list_remove_ap): implement
		- (nm_ap_list_update_network): deal with errors returned from nm_dbus_get_network_priority(),
			remove AP if NetworkManagerInfo doesn't know anything about it
		- (nm_ap_list_diff): user NMAPList iterators
		- (nm_ap_list_print_members): implement debugging function

	* src/NetworkManagerDbus.[ch]
		- (nm_dbus_nm_get_active_device): remove anything to do with pending_device
		- (nm_dbus_get_user_key_for_network): remove DBusPendingCall stuff (unused),
			and move the actual key setting stuff into NetworkManagerDevice.c
		- (nm_dbus_get_network_priority): return -1 now on errors
		- (nm_dbus_nmi_filter): fix strcmp() error that caused PreferredNetworkUpdate signals to
			get lost, and force the active device to update its "best" ap when AP lists change
		- (nm_dbus_nm_message_handler): Update conditions for returning "connecting" for a "status"
			method call due to pending_device member removal

	* src/NetworkManagerDevice.[ch]
		- Move NMDevice structure to the top
		- Add a wireless scan mutex and a best_ap mutex to the Wireless Options structure
		- Remove Pending Action stuff from everywhere
		- (nm_device_activation_*): We now "begin" activation and start a thread to do the
			activation for us.  This thread blocks until all conditions for activation have
			been met (ie for wireless devices, we need a valid WEP key and a "best" ap), and
			then setup up the interface and runs dhclient.  We have to do this because there
			is no guaruntee how long dhclient takes, and while we are blocking on it, we cannot
			run our main loop and respond to dbus method calls or HAL device removals/inserts
		- (nm_device_set_user_key_for_network): Move logic here from NetworkManagerDbus.c so we
			can tell nm_device_activation_worker() that we've got a key
		- (nm_device_*_best_ap): lock access to best_ap member of Wireless Options structure
		- (nm_device_get_path_for_ap): dumb it down so the list doesn't lock against itself when
			diffing (AP appear/disappear signal functions make sure the AP is actually in the device's
list)
		- (nm_device_update_best_ap): move logic from nm_wireless_is_ap_better() here

	* src/NetworkManagerPolicy.c
		- Remove anything to do with pending_device
		- Adjust device activation to deal with activation-in-worker-thread

	* src/NetworkManagerUtils.c
		- Clean up locking debugging a bit

	* src/NetworkManagerWireless.[ch]
		- (nm_wireless_is_ap_better): remove, stick logic in nm_device_update_best_ap().  This function
			was badly named and is better as a device function

	* panel-applet/.cvsignore: add


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@46 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-11 18:14:02 +00:00
Seth Nickell 8e04fc11ff * panel-applet/NMWirelessApplet.c: (nmwa_timeout_handler),
(nmwa_button_clicked), (nmwa_populate_menu), (nmwa_setup_widgets),
	(nmwa_new):
	* src/NetworkManagerDbus.c: (nm_dbus_nmi_filter):

	Don't load the menus until clicked on (also removes a call outside
	normal code paths at first load).

	Hide applet when NM is not present.

	Improve printf debugging stuff.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@45 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-09 19:47:21 +00:00
Dan Williams b1bfbd809b 2004-08-09 Dan Williams <dcbw@redhat.com>
* dispatcher-daemon/NetworkManagerDispatcher.c:
		- Covert uses of dbus_message_iter_* over to dbus_message_get_args
		- Use constants for NetworkManager interface, service, and path


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@44 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-09 18:39:20 +00:00
Dan Williams 280998b894 2004-08-09 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDbus.c:
		- (nm_dbus_nm_get_active_device, nm_dbus_nm_get_devices): Never return an empty object path,
			instead return an error message
		- (nm_dbus_devices_handle_request): Return error when getActiveNetwork/getNetworks is called
			on a wired device.  Also never return an empty object path, instead return an error message


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@43 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-09 15:10:46 +00:00
Seth Nickell eacb8da619 2004-08-06 Seth Nickell <seth@gnome.org>
* panel-applet/NMWirelessApplet.c: (nmwa_new):

	Check the error code when getting a connection.

	* panel-applet/NMWirelessAppletDbus.c: (nmwa_dbus_init):

	Check if the NM service exists when initializing (rather than
	assuming it does not).

	* src/NetworkManagerDbus.c: (nm_dbus_init):

	Don't acquire the well-known service name until we have
	registered object/path handlers and can actually receive
	calls.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@42 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-06 20:24:53 +00:00
Dan Williams 00a4a641d6 Don't pass blank path through dbus
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@41 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-06 19:43:37 +00:00
Dan Williams 0505220a13 convert warning dialogs->fprintfs
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@40 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-06 18:57:51 +00:00
Dan Williams e8b7b7c07d 2004-08-06 Dan Williams <dcbw@redhat.com>
* panel-applet/*
		- Add panel applet

	* src/NetworkManagerPolicy.c
	  src/NetworkManager.c
		- Get access point lists from NetworkManagerInfo on-demand,
			and look for ServiceCreate/ServiceDeleted signals to see when
			we should query NMI for lists
	* src/NetworkManagerAPList.c
		- Make sure to init the list's mutex
		- Convert traversals of the list over to the list iter functions

	* src/NetworkManagerDbus.[ch]
		- Use more aptly-named path/service/interface constants
		- Treat both active and pending devices the same for "getActiveDevice"
		- Add a "status" method returning "connected", "connecting", or "disconnected"

	* src/NetworkManagerDevice.c
		- Honor "ignored" network list when picking best ap to use


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@39 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-06 18:19:06 +00:00
Seth Nickell 528a111490 2004-08-06 Seth Nickell <seth@gnome.org>
* aclocal.m4:

	Autogenerated, remove from CVS.

	* autogen.sh:

	Don't hardcode automake version.

	* configure.in:
	* info-daemon/Makefile.am:
	* info-daemon/NetworkManagerInfo.c: (main):

	Use GnomeProgram et al. for doing session management.
	Use popt stuff for argument parsing rather than doing
	it manugally.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@38 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-06 15:37:43 +00:00
Dan Williams 91b6c02f0d Fix argument list
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@37 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-05 20:17:10 +00:00
Dan Williams 1be4ee2556 2004-08-05 Dan Williams <dcbw@redhat.com>
* test/nminfotest.c
		- Update to new NMI dbus API, check different network types

	* info-daemon/NetworkManagerInfoDbus.c
		- Update to new NM dbus API, ie network type sent in query message


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@36 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-05 20:15:58 +00:00
Dan Williams 86f70ddb09 Add passphrase dialog bits
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@35 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-05 18:55:16 +00:00
Dan Williams f76484abc3 2004-08-05 Dan Williams <dcbw@redhat.com>
* An assload of changes


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@34 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-05 18:54:29 +00:00
Dan Williams 3151e9092e 2004-08-02 Dan Williams <dcbw@redhat.com>
* TODO
		- new task: proper logging support

	* info-daemon/NetworkManagerInfo.c
		- Correct spelling of "canceled"
		- Correct casting of objects for g_signal_connect()

	* info-daemon/NetworkManagerInfoDbus.c
		- Add defines for NetworkManager namespace and object path, and use them
		- Add filter function to trap new signals from NetworkManager:
			WirelessNetworkAppeared, WirelessNetworkDisappeared

	* info-daemon/passphrase.glade
		- Change name of "ok" button to "Login to Network..."
		- Mark invisible

	* src/NetworkManager.c
		- Code and debug message cleanups
		- Rename "nm_add_current_devices"->"nm_add_initial_devices"
		- (nm_add_initial_devices) Check returned string array of devices
			and don't try to add devices if array is NULL
		- (main) Initialize libhal a bit later, make code a bit clearer

	* src/NetworkManagerAP.[ch]
		- New accessor and data member "matched": used to speed up AP list
			diffing
		- New accessor and data member "enc_method": will be used during key
			fallback to cache which passphrase->key conversion actually works
			so we don't have to do it every time

	* src/NetworkManagerAPList.[ch]
		- (nm_ap_list_find_ap_in_list) New: find an AP by essid in an AP list
		- (nm_ap_list_diff) New: given two lists of access points, find the differences
			between them, and send WirelessNetworkAppeared/Disappeared signals over
			dbus in response to those differences

	* src/NetworkManagerDbus.[ch]
		- (nm_dbus_get_object_path_from_ap) New: given a device and an access point,
			make an object path for that access point (NOTE that we don't yet check to
			make sure that access point is actually in the device's AP list yet)
		- (nm_dbus_get_ap_from_object_path) Renamed from nm_dbus_get_network_from_object_path
		- (nm_dbus_signal_wireless_network_appeared, nm_dbus_signal_wireless_network_disappeared)
			New: signal appearance/disappearance of wireless networks
		- (nm_dbus_set_user_key_for_network) Mark the network/ap as invalid if the user cancelled
			key entry

	* src/NetworkManagerDevice.[ch]
		- (nm_device_ap_list_clear) Use nm_ap_list_free rather than doing it ourselves
		- (nm_device_ap_list_get) New: return the AP list (static function)
		- (nm_device_do_normal_scan) Destroy old AP list later, so that we can diff the
			new one resulting from the scan with the old one

	* src/NetworkManagerWireless.c
		- (nm_wireless_is_most_prefered_ap) "invalid" access points cannot be "best" access points

	* test/nminfotest.c
		- #define object paths and namespaces and use the #defines rather than static strings
		- Test out user-key functionality of NetworkManagerInfo too


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@33 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-02 21:12:40 +00:00
Dan Williams 8336b11023 2004-07-29 Dan Williams <dcbw@redhat.com>
* info-daemon/NetworkManagerInfoDbus.c
	  src/NetworkManagerDbus.c
		- Update to current DBus (ie don't use decomposed paths when registering
			object paths/fallbacks)


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@32 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-30 18:21:46 +00:00
Dan Williams e37ba613bf 2004-07-29 Dan Williams <dcbw@redhat.com>
* info-daemon/NetworkManagerInfoDbus.c
	  src/NetworkManagerAPList.c
	  	- Ensure that 'network' is not empty


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@31 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-29 16:00:48 +00:00
Bryan W. Clark d9fa4c0293 fixed default system.d location
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@30 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-28 18:16:19 +00:00
Bryan W. Clark f7a95cdbe7 removed configure from rep
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@29 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-28 18:04:23 +00:00
Dan Williams b0d607f91a 2004-07-27 Dan Williams <dcbw@redhat.com>
* 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
2004-07-28 02:49:33 +00:00
Dan Williams 3f49df44eb 2004-07-27 Dan Williams <dcbw@redhat.com>
* TODO
		- Add a couple of items


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@27 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-27 20:49:11 +00:00
Dan Williams be590d9793 2004-07-27 Dan Williams <dcbw@redhat.com>
* info-daemon/NetworkManagerInfo.c
		- Update allowed network's GConf key when user enters a WEP key explicitly

	* info-daemon/NetworkManagerDbus.c
		- Fix some comments
		- nmi_dbus_get_allowed_networks(): kill warning


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@26 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-27 20:25:35 +00:00
Dan Williams 8945fdfd7c 2004-07-27 Dan Williams <dcbw@redhat.com>
* initscript/Makefile.in
		- Remove

	* initscript/Makefile.am
		- Add correct rules to install the init.d initscript

	* info-daemon/NetworkManagerInfoDbus.c
		- Remove debug fprintf

	* src/NetworkManagerDbus.[ch]
		- Remove debug fprintfs
		- Add macros for NetworkManagerInfo object path/namespace
		- Use said macros instead of constant strings


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@25 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-27 18:48:14 +00:00
Dan Williams 7a4149d5c2 2004-07-27 Dan Williams <dcbw@redhat.com>
* initscript/.cvsignore
		- Add

	* info-daemon/Makefile.am
		- Install .glade files and keyring.png
		- Fix stupid omission of a \ that caused half the flags not to be
			passed to gcc

	* info-daemon/NetworkManagerInfo.c
		- gtk_signal_connect->g_signal_connect
		- Alert NetworkManagerInfo to new glade file location


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@24 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-27 17:05:24 +00:00
Dan Williams 3a05be0ce5 2004-07-27 Dan Williams <dcbw@redhat.com>
* test/nmclienttest.c
	  test/nminfotest.c
		- Add missing <dbus/dbus.h> headers
		- Add GPL message at top


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@23 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-27 16:24:48 +00:00
Dan Williams 814cfbc5fc 2004-07-27 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAPList.[ch]
	  src/Makefile.am
		- Add.  Deal with allowed network list additions, deletions, and updates

	* dispatcher-daemon/NetworkManagerDispatcher.c
		- Add missing <dbus/dbus.h> header

	* info-daemon/NetworkManagerInfo.[ch]
		- Add missing <dbus/dbus.h> header
		- Implement the GConf notify callback to signal NetworkManager of an allowed
			network change
		- Better error checking

	* info-daemon/NetworkManagerInfoDbus.[ch]
		- Add missing <dbus/dbus.h> header
		- Convert to using dbus_message_append_args/dbus_message_get_args
		- Implement nmi_dbus_signal_update_allowed_network() to signal NetworkManager
			that an allowed network changed.  We don't want to signal on individual
			keys _inside_ an allowed network really, just want NM to query the info
			daemon for updated info on all keys.
		- Better error checking

	* src/NetworkManager.[ch]
		- Add missing <dbus/dbus.h> header
		- Move allowed_ap_list free functions to NetworkManagerAPList.[ch]
		- Zero out NMData structure on free
		- No longer use a thread for allowed_ap_list updating, instead its now done
			through dbus queries against NetworkManagerInfo
		- Populate allowed_ap_list initially before adding existing network devices
			to the device list, so wireless devices can get their "best" AP

	* src/NetworkManagerDbus.[ch]
		- Convert to using dbus_message_append_args/dbus_message_get_args
		- Better error checking
		- Implement Allowed Network info functions to request allowed network
			info from NetworkManagerInfo
		- Implement the filter function to process signals from NetworkManagerInfo
			about changing allowed networks

	* src/NetworkManagerDevice.c
		- Fix file descriptor leak in nm_device_update_ip4_address()

`CVS: Modified Files:


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@22 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-27 16:15:36 +00:00
Dan Williams 4d6a840768 2004-07-27 Dan Williams <dcbw@redhat.com>
* .cvsignore
	  src/.cvsignore
	  test/.cvsignore
	  dispatcher-daemon/.cvsignore
	  info-daemon/.cvsignore
		- Add .cvsignore files to reduce noise when diffing


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@21 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-27 15:58:22 +00:00
Dan Williams 8ae95bf594 2004-07-24 Dan Williams <dcbw@redhat.com>
* 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
2004-07-25 02:40:19 +00:00
Dan Williams 846858e487 2004-07-22 Dan Williams <dcbw@redhat.com>
* configure.in
		- Add checks for GConf libs & headers & flags

	* info-daemon/Makefile.am
		- Add GConf flags & libs to compile/link stages of NetworkManagerInfo

	* info-daemon/NetworkManagerInfo.[ch]
		- Don't use gquarks for data storage, just use normal data storage
		- Add gconf bits to watch /system/networking/wireless/allowed_networks

	* info-daemon/NetworkManagerDbus.[ch]
		- Add method call for getting allowed networks
		- Add method calls for getting an allowed network's essid, priority, and key
		- Hook the method calls up to GConf
		- Split user key dialog code into separate function (nmi_dbus_get_key_for_network)
		- nmi_dbus_nmi_message_handler(): make sure to unref the reply message after sending

	* src/NetworkManagerDbus.[ch]
		- Switch for enumeration of networks to using essid instead

	* test/Makefile.am
	  test/nminfotest.c
	  	- Add test program for NetworkManagerInfo


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@19 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-22 05:17:36 +00:00
Dan Williams 1e4fbdcd95 2004-07-19 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDbus.c
		- Switch from indexed device paths to names.  Less code, more efficient.
			ie "/org/freedesktop/NetworkManager/0" -> "/org/freedesktop/NetworkManager/eth0"


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@18 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-19 06:52:25 +00:00
Dan Williams 32587b0ba4 2004-07-19 Dan Williams <dcbw@redhat.com>
* dispatcher-daemon/NetworkManagerDispatcher.c
		- (nm_dbus_filter): Remove obsolete response to NeedKeyForNetwork signal


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@17 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-19 06:18:37 +00:00
Dan Williams aab500146f 2004-07-19 Dan Williams <dcbw@redhat.com>
* Makefile.am
		- Add info-daemon directory

	* configure.in
		- Check for glade libs and headers
		- Add info-daemon directory

	* src/NetworkManagerAP.c
		- nm_ap_new_from_ap(): Fix bug that resulted in an APs encryption status not getting
			copied over to the new AP.

	* src/NetworkManagerDbus.c
	  src/NetworkManagerDbus.h
		- Deal with nm_device_ap_list_get_ap()->nm_device_ap_list_get_ap_by_index() change
		- Remove nm_dbus_signal_need_key_for_network()
		- Add disabled code for asynchronous user wep key callbacks
		- Add functions for getting, setting, and cancelling user key operations
		- Remove "setKeyForNetwork" device dbus method call, its on NetworkManager object instead
		- Add "setKeyForNetwork" dbus method call on NetworkManager object

	* src/NetworkManagerDevice.c
	  src/NetworkManagerDevice.h
		- nm_device_update_link_active(): revert changes for wireless link detection, the WEP-key-is-wrong
			logic is in device activation now
		- nm_device_activate(): for wireless devices, if we can't associate with access point (perhaps
			key is wrong) trigger get-user-key pending action
		- Implement get-user-key pending action stuff, tie to dbus messages
		- Rename nm_device_ap_list_get_ap() -> nm_device_ap_list_get_ap_by_index()
		- Add nm_device_ap_list_get_ap_by_essid()
		- Instead of copying "best" access points, ref them instead so that the key we set
			sticks around

	* src/NetworkManagerPolicy.c
		- Deal with wrong WEP key, but right access point (and if so, return link_active = TRUE)
		- Don't cancel pending actions on a device if its the same device as last iteration
		- Only promote pending_device->active_device if activation was successfull

	* src/Makefile.am
		- Rename nmclienttest->nmtest

	* info-daemon/Makefile.am
	  info-daemon/NetworkManagerInfo.c
	  info-daemon/NetworkManagerInfo.h
	  info-daemon/NetworkManagerInfoDbus.c
	  info-daemon/NetworkManagerInfoDbus.h
	  info-daemon/passphrase.glade
	  info-daemon/NetworkManagerInfo.conf
	  info-daemon/keyring.png
	  	- Import sources for info-daemon, which pops up dialog for passphrase/key when
	  		NetworkManager asks for it, and also will (soon) provide "allowed" access point
	  		lists to NetworkManager by proxying user's GConf


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@16 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-19 06:08:52 +00:00
Dan Williams 088b0d8eb2 2004-07-15 Dan Williams <dcbw@redhat.com>
* src/Makefile.am
		- Turn on warnings

	* src/NetworkManager.c
		- nm_create_device_and_add_to_list(): call nm_device_deactivate() rather
			that doing the deactivation ourselves
		- Cancel an pending actions on a device if its being removed
		- Break up link state checking a bit, make non-active wireless cards
			deactivated to save power
		- Remove unused variables

	* src/NetworkManager.h
		- Add support for "pending" device

	* src/NetworkManagerAP.h
	  src/NetworkManagerAP.c
		- Add support for determining whether and AP has encryption enabled or not
		- AP address is now "struct ether_addr" rather than a string

	* src/NetworkManagerDbus.h
	  src/NetworkManagerDbus.c
		- Add signal NeedKeyForNetwork, method SetKeyForNetwork (testing only)
		- Changes for AP address from struct ether_addr->string

	* src/NetworkManagerDevice.h
	  src/NetworkManagerDevice.c
		- Remove unused variables, fix warnings
		- Add support for Pending Actions (things that block a device from being "active"
			until they are completed).
		- First pending action:  Get a WEP key from the user
		- Add nm_device_is_wire[d|less](), rename nm_device_is_wireless()
		- Clean up explicit testing of dev->iface_type to use nm_device_is_wireless()
		- Update wireless link checking to try to determine if the AP we are associated
			with is correct, but the WEP key we are using is just wrong.  If its wrong,
			trigger the GetUserKey pending action on the device
		- If dhclient can't get an IP address, it brings the device down.  Bring it back
			up in that case, otherwise we can't scan or link-check on it
		- Add IP address change notifications at appropriate points (still needs some work)
		- Add nm_device_need_ap_switch(), checks whether we need to switch access points or not

	* src/NetworkManagerPolicy.h
	  src/NetworkManagerPolicy.c
		- Split out "best" access point determiniation into separate function
		- Make device activation 2-stage:  first the device is pending, then
			in the next iteration through it becomes "active" unless it has
			pending actions

	* src/NetworkManagerUtils.h
	  src/NetworkManagerUtils.c
		- Clean up unused variables and warnings
		- Wrap our debug macros in {} to prevent possible confusion

	* src/NetworkManagerWireless.c
		- Forgot to return current best priority, which lead to last available AP always
			being chosen no matter what its priority was.  Corrected.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@15 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-15 16:51:48 +00:00
Dan Williams d3ad52d649 2004-07-15 Dan Williams <dcbw@redhat.com>
* dispatcher-daemon/Makefile.am
		- Turn on warnings

	* dispatcher-daemon/NetworkManagerDispatcher.c
		- Remove unused variables due to warnings
		- Fix some comments
		- Print message on receipt of NeedKeyForNetwork signal (testing only)


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@14 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-15 14:49:04 +00:00
Dan Williams 0073d4dd55 2004-07-06 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c
		- Add IPv4 address update for active device during link state check
		- Don't allow wireless cards to be powered up when they are not the
			active device

	* src/NetworkManagerDbus.c
	  src/NetworkManagerDbus.h
		- Add DBUS IPv4 address change signal
		- Add DBUS IPv4 address get method for devices

	* src/NetworkManagerDevice.c
		- Make setting the WEP key actually work
		- Move IP address get/set/update stuff here, per-device
		- Power down/bring down wireless device when deactivated
		- For scanning wireless devices, if first scan returned ENODATA, try again

	* src/NetworkManagerPolicy.c
		- Only set the WEP key for an allowed access point if there is one.
			We were setting it to be blank if one wasn't specified.

	* src/NetworkManagerUtils.h
	  src/NetworkManagerUtils.c
		- Move the IP address stuff to NetworkManagerDevice.c

	* dispatcher-daemon/NetworkManagerDispatcher.c
		- Add device IPv4 address change notification stuff


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@13 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-07-06 04:45:00 +00:00
Dan Williams 019e2337bf 2004-07-05 Dan Williams <dcbw@redhat.com>
* 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
2004-07-06 01:34:10 +00:00
Dan Williams d340cafffa 2004-06-29 Dan Williams <dcbw@redhat.com>
* dispatcher-daemon/NetworkManagerDispatcher.c
		- Implement script callout functionality


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@11 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-06-29 20:10:19 +00:00
Dan Williams 80f835caed 2004-06-24 Dan Williams <dcbw@redhat.com>
* NetworkManager.c
	    - Spacing cleanups
	    - Flush device routes and ip addresses when added to the device list

	* NetworkManagerDbus.c
	    - Spacing cleanups
	    - Add missing returns in the two signal functions

	* NetworkManagerPolicy.c
	    - Spacing and variable cleanups


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@10 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-06-24 18:20:48 +00:00
Dan Williams 873738b61b 2004-06-24 Dan Williams <dcbw@redhat.com>
* Makefile.am
	  Makefile.in
	  configure.in
	  dispatcher-daemon/Makefile.am
	  dispatcher-daemon/Makefile.in
	  dispatcher-daemon/NetworkManagerDispatcher.c

	    Add a daemon that receives signals from NetworkManager
	  and will (eventually) call scripts in /etc/somewhere
	  when devices go up or down.

	* NetworkManager.c
	  NetworkManagerDbus.c

	    Spacing cleanups.

	* NetworkManagerPolicy.c

	    - Rename nm_policy_switch_interface->nm_policy_switch_device
	    - nm_policy_switch_device():
				Use kill (pid) instead of system ("kill <pid>")
	    - nm_state_modification_monitor():
				Add wireless essid to output of debug statements
				Correct typo in device compare to switch or not (should be !=)
				Don't sleep after sending "no longer active" signal, was useless


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@9 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-06-24 17:55:51 +00:00
Dan Williams d7df622d00 2004-06-24 Dan Williams <dcbw@redhat.com>
* Initial import


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@8 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-06-24 14:28:05 +00:00
Dan Williams a7dcd633a1 inode.c should also not be here, not part of NetworkManager
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@7 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-06-24 14:20:54 +00:00
Dan Williams c2e0901bcf remove older tarball
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@6 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-06-24 14:19:48 +00:00
Dan Williams c39587c1c2 Initial revision
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-06-24 14:18:37 +00:00
(no author) 51bb897c07 New repository initialized by cvs2svn.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-06-24 14:18:37 +00:00