NetworkManager/src/NetworkManagerSystem.h

59 lines
2.4 KiB
C
Raw Normal View History

/* NetworkManager -- Network link manager
*
* Dan Williams <dcbw@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* (C) Copyright 2004 Red Hat, Inc.
*/
#ifndef NETWORK_MANAGER_SYSTEM_H
#define NETWORK_MANAGER_SYSTEM_H
#include <glib.h>
#include "NetworkManagerDevice.h"
/* Prototypes for system/distribution dependent functions,
* implemented in the backend files in backends/ directory
*/
void nm_system_init (void);
gboolean nm_system_device_run_dhcp (NMDevice *dev);
void nm_system_device_stop_dhcp (NMDevice *dev);
2004-10-13 Dan Williams <dcbw@redhat.com> * panel-applet/NMWirelessApplet.c - Add function to print out applet_state in a readable manner * src/NetworkManager.c - (main): Don't segfault when nm_dbus_init() fails, we had a left-over call to hal_shutdown() into which we passed NULL * src/NetworkManagerAP.c - (nm_ap_set_essid): Allow NULL essids * src/NetworkManagerAPList.[ch] - More use of nm_ap_list_[un]lock () - (nm_ap_list_get_ap_by_essid): don't warn when looking for a NULL network/essid, just return nothing. Also skip over NULL essid access points in the list when searching - (nm_ap_list_get_ap_by_address): new function - (nm_ap_list_update_network): set the access point's key source to NULL when the key returned from NetworkManagerInfo is NULL or of 0 length - nm_ap_list_update_keys() -> nm_ap_list_update_properties(), and copy timestamp over too - (nm_ap_list_copy_essids_by_address): new function, attempt to find the correct ESSID for a blank-essid access point by searching through another list and matching access point MAC addresses - (nm_ap_list_diff): exclude blank-essid access points from the diffs * src/NetworkManagerDbus.c - (nm_dbus_nm_set_active_device): deal with random networks the user may specify. This is mainly for access points that don't broadcast their essid. So if the user tells us to associate with some random ESSID that's not in our access point list, we find out if the access point does in fact exist (by attempting association and then matching that access point's MAC address with the essid the user gave us) and then we switch to it. - (nm_dbus_devices_handle_request): don't add blank-essid access points to the returned list of networks for the "getNetworks" method * src/NetworkManagerDevice.[ch] - Extra debugging info for link detection - (nm_device_ap_list_get_ap_by_address): new function, return an AP based on MAC address - (nm_device_get_path_for_ap): ignore blank-essid access points - (nm_device_wireless_network_exists): new function, find out whether a random ESSID exists by attempting to associate with it - (nm_device_do_normal_scan): allow blank-essid access points in our device list as long as they have an AP MAC address we can use. Also send WirelessNetwork[Dis]Appeared signals for non-active devices too. Lets the applet update more frequently. * src/backends/NetworkManagerGentoo.c - Patch from: Robert Paskowitz - Update backend code for Gentoo - Implement nm_system_device_update_config_info () * test/nmclienttest.c - (set_network_device): new function, takes a command-line argument and tells NetworkManager to use that wireless network git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@222 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-13 20:57:23 +00:00
gboolean nm_system_device_has_active_routes (NMDevice *dev);
void nm_system_device_flush_routes (NMDevice *dev);
void nm_system_device_add_default_route_via_device(NMDevice *dev);
void nm_system_device_flush_addresses (NMDevice *dev);
void nm_system_device_update_config_info (NMDevice *dev);
gboolean nm_system_device_setup_static_ip4_config (NMDevice *dev);
void nm_system_enable_loopback (void);
void nm_system_flush_loopback_routes (void);
void nm_system_delete_default_route (void);
void nm_system_flush_arp_cache (void);
void nm_system_kill_all_dhcp_daemons (void);
void nm_system_update_dns (void);
void nm_system_load_device_modules (void);
void nm_system_restart_mdns_responder (void);
/* Prototyps for system-layer network functions (ie setting IP address, etc) */
gboolean nm_system_device_set_ip4_address (NMDevice *dev, int ip4_address);
gboolean nm_system_device_set_ip4_netmask (NMDevice *dev, int ip4_netmask);
gboolean nm_system_device_set_ip4_broadcast (NMDevice *dev, int ip4_broadcast);
gboolean nm_system_device_set_ip4_default_route (NMDevice *dev, int ip4_def_route);
gboolean nm_system_device_update_resolv_conf (void *data, int len, const char *domain_name);
#endif