2007-12-06 14:51:43 +00:00
|
|
|
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
|
|
|
|
|
|
2004-08-24 00:31:47 +00:00
|
|
|
/* 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>
|
2005-12-31 08:21:24 +00:00
|
|
|
#include "nm-device.h"
|
|
|
|
|
#include "nm-ip4-config.h"
|
2004-08-24 00:31:47 +00:00
|
|
|
|
2004-11-16 02:41:53 +00:00
|
|
|
/* Prototypes for system/distribution dependent functions,
|
|
|
|
|
* implemented in the backend files in backends/ directory
|
|
|
|
|
*/
|
2004-08-24 00:31:47 +00:00
|
|
|
|
2004-08-25 20:52:19 +00:00
|
|
|
void nm_system_init (void);
|
2004-10-13 20:57:23 +00:00
|
|
|
gboolean nm_system_device_has_active_routes (NMDevice *dev);
|
2005-04-15 15:43:42 +00:00
|
|
|
|
2004-10-12 11:15:47 +00:00
|
|
|
void nm_system_device_flush_routes (NMDevice *dev);
|
2005-04-15 15:43:42 +00:00
|
|
|
void nm_system_device_flush_routes_with_iface (const char *iface);
|
|
|
|
|
|
2004-12-17 17:16:22 +00:00
|
|
|
void nm_system_device_add_default_route_via_device(NMDevice *dev);
|
2005-04-15 15:43:42 +00:00
|
|
|
void nm_system_device_add_default_route_via_device_with_iface(const char *iface);
|
|
|
|
|
|
2005-05-16 12:57:08 +00:00
|
|
|
void nm_system_device_add_route_via_device_with_iface (const char *iface, const char *route);
|
|
|
|
|
|
2004-10-12 11:15:47 +00:00
|
|
|
void nm_system_device_flush_addresses (NMDevice *dev);
|
2005-04-15 15:43:42 +00:00
|
|
|
void nm_system_device_flush_addresses_with_iface (const char *iface);
|
|
|
|
|
|
2004-10-12 11:15:47 +00:00
|
|
|
void nm_system_enable_loopback (void);
|
2004-12-17 17:16:22 +00:00
|
|
|
void nm_system_flush_loopback_routes (void);
|
2004-10-12 11:15:47 +00:00
|
|
|
void nm_system_delete_default_route (void);
|
2004-12-17 17:16:22 +00:00
|
|
|
void nm_system_flush_arp_cache (void);
|
2004-10-12 11:15:47 +00:00
|
|
|
void nm_system_kill_all_dhcp_daemons (void);
|
|
|
|
|
void nm_system_update_dns (void);
|
2004-12-16 04:24:20 +00:00
|
|
|
void nm_system_restart_mdns_responder (void);
|
2005-02-10 21:16:03 +00:00
|
|
|
void nm_system_device_add_ip6_link_address (NMDevice *dev);
|
2004-08-24 00:31:47 +00:00
|
|
|
|
2007-08-28 15:54:55 +00:00
|
|
|
void * nm_system_device_get_system_config (NMDevice *dev);
|
2005-04-15 15:43:42 +00:00
|
|
|
void nm_system_device_free_system_config (NMDevice *dev, void *system_config_data);
|
|
|
|
|
|
2006-01-19 18:00:48 +00:00
|
|
|
gboolean nm_system_device_get_disabled (NMDevice *dev);
|
|
|
|
|
|
2007-12-06 14:51:43 +00:00
|
|
|
gboolean nm_system_device_set_from_ip4_config (const char *iface,
|
|
|
|
|
NMIP4Config *config,
|
|
|
|
|
gboolean route_to_iface);
|
|
|
|
|
|
2007-09-12 16:23:53 +00:00
|
|
|
gboolean nm_system_vpn_device_set_from_ip4_config (NMDevice *active_device,
|
|
|
|
|
const char *iface,
|
|
|
|
|
NMIP4Config *config,
|
2007-09-26 15:42:09 +00:00
|
|
|
GSList *routes);
|
2007-09-12 16:23:53 +00:00
|
|
|
|
|
|
|
|
gboolean nm_system_vpn_device_unset_from_ip4_config (NMDevice *active_device,
|
|
|
|
|
const char *iface,
|
|
|
|
|
NMIP4Config *config);
|
2005-04-15 15:43:42 +00:00
|
|
|
|
|
|
|
|
gboolean nm_system_device_set_up_down (NMDevice *dev, gboolean up);
|
2006-06-09 14:24:19 +00:00
|
|
|
gboolean nm_system_device_set_up_down_with_iface (const char *iface, gboolean up);
|
2005-04-15 15:43:42 +00:00
|
|
|
|
2004-11-16 02:41:53 +00:00
|
|
|
gboolean nm_system_device_update_resolv_conf (void *data, int len, const char *domain_name);
|
|
|
|
|
|
2006-01-23 21:02:39 +00:00
|
|
|
void nm_system_set_hostname (NMIP4Config *config);
|
2005-12-14 16:00:17 +00:00
|
|
|
void nm_system_activate_nis (NMIP4Config *config);
|
|
|
|
|
void nm_system_shutdown_nis (void);
|
|
|
|
|
|
2006-03-21 17:57:01 +00:00
|
|
|
void nm_system_set_mtu (NMDevice *dev);
|
2006-03-29 Robert Love <rml@novell.com>
Patch by Vinay R <rvinay@novell.com> and Robert Love <rml@novell.com>,
to add support for per-route MSS and improve support for per-interface
MTU:
* src/NetworkManagerSystem.c: Modify nm_system_device_set_ip4_route to
optionally take an MSS parameter and set it for the given route.
Remove nm_system_device_set_ip4_route_with_iface. Pass in the
NMIP4Config's stored MSS, if any.
* src/nm-ip4-config.c: Add 'mtu' and 'mss' to NMIP4Config, representing
the interface's MTU and the route's MSS, respectively. Add functions
nm_ip4_config_get_mtu, nm_ip4_config_set_mtu, nm_ip4_config_get_mss,
and nm_ip4_config_set_mss for retrieving and setting the MTU and the
MSS.
* src/nm-ip4-config.h: Add prototypes for nm_ip4_config_get_mtu,
nm_ip4_config_set_mtu, nm_ip4_config_get_mss, and
nm_ip4_config_set_mss.
* src/vpn-manager/nm-vpn-service.c: Modify to receive the MSS from the
VPN daemon.
* src/backends/NetworkManager{Arch,Debian,Gentoo,RedHat,Slackware,SUSE}.c:
Change the retval of nm_system_get_mtu to guint32.
* src/dhcp-manager/nm-dhcp-manager.c: Set the MTU on the new DHCP-given
NMIP4Config to the MTU provided by the system, if any. TODO: If DHCP
servers can specify MTU's, we should set it here if the MTU was not
provided.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1660 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-03-29 19:26:53 +00:00
|
|
|
guint32 nm_system_get_mtu (NMDevice *dev);
|
2006-03-21 17:57:01 +00:00
|
|
|
|
2006-02-28 21:41:16 +00:00
|
|
|
gboolean nm_system_should_modify_resolv_conf (void);
|
|
|
|
|
|
2004-08-24 00:31:47 +00:00
|
|
|
#endif
|