1 diff -Nur NetworkManager-0.4.orig/configure.in NetworkManager-0.4/configure.in
2 --- NetworkManager-0.4.orig/configure.in 2005-05-19 21:58:50.000000000 +0100
3 +++ NetworkManager-0.4/configure.in 2005-05-20 23:22:23.000000000 +0100
8 - redhat|gentoo|debian|slackware) ;;
9 + redhat|gentoo|debian|slackware|pld) ;;
11 echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)"
14 AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
15 AM_CONDITIONAL(TARGET_MANDRAKE, test x"$with_distro" = xmandrake)
16 AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
17 +AM_CONDITIONAL(TARGET_PLD, test x"$with_distro" = xpld)
19 AC_CHECK_HEADER(iwlib.h, [],
20 [AC_MSG_ERROR(iwlib.h not found. Install wireless-tools.)], [])
21 diff -Nur NetworkManager-0.4.orig/src/backends/Makefile.am NetworkManager-0.4/src/backends/Makefile.am
22 --- NetworkManager-0.4.orig/src/backends/Makefile.am 2005-05-16 19:35:20.000000000 +0100
23 +++ NetworkManager-0.4/src/backends/Makefile.am 2005-05-20 23:23:16.000000000 +0100
25 libnmbackend_la_SOURCES += NetworkManagerSlackware.c
29 +libnmbackend_la_SOURCES += NetworkManagerPLD.c
32 libnmbackend_la_LIBADD = $(DBUS_LIBS) $(GTHREAD_LIBS)
33 libnmbackend_la_CPPFLAGS = $(DBUS_CFLAGS) \
35 diff -Nur NetworkManager-0.4.orig/src/backends/NetworkManagerPLD.c NetworkManager-0.4/src/backends/NetworkManagerPLD.c
36 --- NetworkManager-0.4.orig/src/backends/NetworkManagerPLD.c 1970-01-01 01:00:00.000000000 +0100
37 +++ NetworkManager-0.4/src/backends/NetworkManagerPLD.c 2005-05-20 23:22:23.000000000 +0100
39 +/* NetworkManager -- Network link manager
41 + * Narayan Newton <narayan_newton@yahoo.com>
43 + * This program is free software; you can redistribute it and/or modify
44 + * it under the terms of the GNU General Public License as published by
45 + * the Free Software Foundation; either version 2 of the License, or
46 + * (at your option) any later version.
48 + * This program is distributed in the hope that it will be useful,
49 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
50 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 + * GNU General Public License for more details.
53 + * You should have received a copy of the GNU General Public License
54 + * along with this program; if not, write to the Free Software
55 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
57 + * (C) Copyright 2004 RedHat, Inc.
58 + * (C) Copyright 2004 Narayan Newton
59 + * (C) Copyright 2005 wrobell <wrobell@pld-linux.org>
63 +#include <sys/types.h>
65 +#include "NetworkManagerSystem.h"
66 +#include "NetworkManagerUtils.h"
67 +#include "NetworkManagerDevice.h"
70 + * PLD specific backend based on Slackware backend.
76 + * Initializes the distribution-specific system backend
79 +void nm_system_init (void)
84 + * nm_system_device_flush_routes
86 + * Flush all routes associated with a network device
89 +void nm_system_device_flush_routes (NMDevice *dev)
93 + g_return_if_fail (dev != NULL);
95 + /* Not really applicable for test devices */
96 + if (nm_device_is_test_device (dev))
99 + /* Remove routing table entries */
100 + snprintf (buf, 100, "/sbin/ip route flush dev %s", nm_device_get_iface (dev));
101 + nm_spawn_process (buf);
106 + * nm_system_device_flush_addresses
108 + * Flush all network addresses associated with a network device
111 +void nm_system_device_flush_addresses (NMDevice *dev)
115 + g_return_if_fail (dev != NULL);
117 + /* Not really applicable for test devices */
118 + if (nm_device_is_test_device (dev))
121 + /* Remove all IP addresses for a device */
122 + snprintf (buf, 100, "/sbin/ip address flush dev %s", nm_device_get_iface (dev));
123 + nm_spawn_process (buf);
128 + * nm_system_device_setup_static_ip4_config
130 + * Set up the device with a particular IPv4 address/netmask/gateway.
132 + * Returns: TRUE on success
136 +gboolean nm_system_device_setup_static_ip4_config (NMDevice *dev)
138 + syslog (LOG_WARNING, "nm_system_device_setup_static_ip4_config() is not implemented yet for this distribution.\n");
143 + * nm_system_device_update_config_info
145 + * Retrieve any relevant configuration info for a particular device
146 + * from the system network configuration information. Clear out existing
147 + * info before setting stuff too.
150 +void nm_system_device_update_config_info (NMDevice *dev)
156 + * nm_system_enable_loopback
158 + * Bring up the loopback interface
161 +void nm_system_enable_loopback (void)
163 + nm_spawn_process ("/sbin/ip link set dev lo up");
164 + nm_spawn_process ("/sbin/ip addr add 127.0.0.1/8 brd 127.255.255.255 dev lo label loopback");
169 + * nm_system_delete_default_route
171 + * Remove the old default route in preparation for a new one
174 +void nm_system_delete_default_route (void)
176 + nm_spawn_process ("/sbin/ip route del default");
181 + * nm_system_kill_all_dhcp_daemons
183 + * Kill all DHCP daemons currently running, done at startup.
186 +void nm_system_kill_all_dhcp_daemons (void)
188 + nm_spawn_process ("/usr/bin/killall -q dhcpcd");
193 + * nm_system_update_dns
195 + * Make glibc/nscd aware of any changes to the resolv.conf file by
199 +void nm_system_update_dns (void)
205 + * nm_system_load_device_modules
207 + * These should already be loaded
210 +void nm_system_load_device_modules (void)
216 + * nm_system_restart_mdns_responder
218 + * Restart the multicast DNS responder so that it knows about new
219 + * network interfaces and IP addresses.
222 +void nm_system_restart_mdns_responder (void)
228 + * nm_system_device_add_ip6_link_address
230 + * Add a default link-local IPv6 address to a device.
233 +void nm_system_device_add_ip6_link_address (NMDevice *dev)
239 + * nm_system_device_add_default_route_via_device
241 + * Flush all routes associated with a network device
244 +void nm_system_device_add_default_route_via_device (NMDevice *dev)
250 + * nm_system_flush_loopback_routes
252 + * Flush all routes associated with the loopback device, because it
253 + * sometimes gets the first route for ZeroConf/Link-Local traffic.
256 +void nm_system_flush_loopback_routes (void)
262 + * nm_system_flush_arp_cache
264 + * Flush all entries in the arp cache.
267 +void nm_system_flush_arp_cache (void)