]> git.pld-linux.org Git - packages/NetworkManager.git/blame - NetworkManager-pld.patch
- new snap (20050713)
[packages/NetworkManager.git] / NetworkManager-pld.patch
CommitLineData
e9eb136c 1diff -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
4@@ -56,7 +56,7 @@
5 exit 1
6 else
7 case $with_distro in
8- redhat|gentoo|debian|slackware) ;;
9+ redhat|gentoo|debian|slackware|pld) ;;
10 *)
11 echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)"
12 exit 1
13@@ -68,6 +68,7 @@
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)
18
19 AC_CHECK_HEADER(iwlib.h, [],
20 [AC_MSG_ERROR(iwlib.h not found. Install wireless-tools.)], [])
21diff -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
24@@ -24,6 +24,10 @@
25 libnmbackend_la_SOURCES += NetworkManagerSlackware.c
26 endif
27
28+if TARGET_PLD
29+libnmbackend_la_SOURCES += NetworkManagerPLD.c
30+endif
31+
32 libnmbackend_la_LIBADD = $(DBUS_LIBS) $(GTHREAD_LIBS)
33 libnmbackend_la_CPPFLAGS = $(DBUS_CFLAGS) \
34 $(GTHREAD_CFLAGS) \
35diff -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
38@@ -0,0 +1,232 @@
39+/* NetworkManager -- Network link manager
40+ *
41+ * Narayan Newton <narayan_newton@yahoo.com>
42+ *
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.
47+ *
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.
52+ *
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.
56+ *
57+ * (C) Copyright 2004 RedHat, Inc.
58+ * (C) Copyright 2004 Narayan Newton
59+ * (C) Copyright 2005 wrobell <wrobell@pld-linux.org>
60+ */
61+
62+#include <stdio.h>
63+#include <sys/types.h>
64+#include <signal.h>
65+#include "NetworkManagerSystem.h"
66+#include "NetworkManagerUtils.h"
67+#include "NetworkManagerDevice.h"
68+
69+/*
70+ * PLD specific backend based on Slackware backend.
71+ */
72+
73+/*
74+ * nm_system_init
75+ *
76+ * Initializes the distribution-specific system backend
77+ *
78+ */
79+void nm_system_init (void)
80+{
81+}
82+
83+/*
84+ * nm_system_device_flush_routes
85+ *
86+ * Flush all routes associated with a network device
87+ *
88+ */
89+void nm_system_device_flush_routes (NMDevice *dev)
90+{
91+ char buf [100];
92+
93+ g_return_if_fail (dev != NULL);
94+
95+ /* Not really applicable for test devices */
96+ if (nm_device_is_test_device (dev))
97+ return;
98+
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);
102+}
103+
104+
105+/*
106+ * nm_system_device_flush_addresses
107+ *
108+ * Flush all network addresses associated with a network device
109+ *
110+ */
111+void nm_system_device_flush_addresses (NMDevice *dev)
112+{
113+ char buf [100];
114+
115+ g_return_if_fail (dev != NULL);
116+
117+ /* Not really applicable for test devices */
118+ if (nm_device_is_test_device (dev))
119+ return;
120+
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);
124+}
125+
126+
127+/*
128+ * nm_system_device_setup_static_ip4_config
129+ *
130+ * Set up the device with a particular IPv4 address/netmask/gateway.
131+ *
132+ * Returns: TRUE on success
133+ * FALSE on error
134+ *
135+ */
136+gboolean nm_system_device_setup_static_ip4_config (NMDevice *dev)
137+{
138+ syslog (LOG_WARNING, "nm_system_device_setup_static_ip4_config() is not implemented yet for this distribution.\n");
139+}
140+
141+
142+/*
143+ * nm_system_device_update_config_info
144+ *
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.
148+ *
149+ */
150+void nm_system_device_update_config_info (NMDevice *dev)
151+{
152+}
153+
154+
155+/*
156+ * nm_system_enable_loopback
157+ *
158+ * Bring up the loopback interface
159+ *
160+ */
161+void nm_system_enable_loopback (void)
162+{
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");
165+}
166+
167+
168+/*
169+ * nm_system_delete_default_route
170+ *
171+ * Remove the old default route in preparation for a new one
172+ *
173+ */
174+void nm_system_delete_default_route (void)
175+{
176+ nm_spawn_process ("/sbin/ip route del default");
177+}
178+
179+
180+/*
181+ * nm_system_kill_all_dhcp_daemons
182+ *
183+ * Kill all DHCP daemons currently running, done at startup.
184+ *
185+ */
186+void nm_system_kill_all_dhcp_daemons (void)
187+{
188+ nm_spawn_process ("/usr/bin/killall -q dhcpcd");
189+}
190+
191+
192+/*
193+ * nm_system_update_dns
194+ *
195+ * Make glibc/nscd aware of any changes to the resolv.conf file by
196+ * restarting nscd.
197+ *
198+ */
199+void nm_system_update_dns (void)
200+{
201+}
202+
203+
204+/*
205+ * nm_system_load_device_modules
206+ *
207+ * These should already be loaded
208+ *
209+ */
210+void nm_system_load_device_modules (void)
211+{
212+}
213+
214+
215+/*
216+ * nm_system_restart_mdns_responder
217+ *
218+ * Restart the multicast DNS responder so that it knows about new
219+ * network interfaces and IP addresses.
220+ *
221+ */
222+void nm_system_restart_mdns_responder (void)
223+{
224+}
225+
226+
227+/*
228+ * nm_system_device_add_ip6_link_address
229+ *
230+ * Add a default link-local IPv6 address to a device.
231+ *
232+ */
233+void nm_system_device_add_ip6_link_address (NMDevice *dev)
234+{
235+}
236+
237+
238+/*
239+ * nm_system_device_add_default_route_via_device
240+ *
241+ * Flush all routes associated with a network device
242+ *
243+ */
244+void nm_system_device_add_default_route_via_device (NMDevice *dev)
245+{
246+}
247+
248+
249+/*
250+ * nm_system_flush_loopback_routes
251+ *
252+ * Flush all routes associated with the loopback device, because it
253+ * sometimes gets the first route for ZeroConf/Link-Local traffic.
254+ *
255+ */
256+void nm_system_flush_loopback_routes (void)
257+{
258+}
259+
260+
261+/*
262+ * nm_system_flush_arp_cache
263+ *
264+ * Flush all entries in the arp cache.
265+ *
266+ */
267+void nm_system_flush_arp_cache (void)
268+{
269+}
270+
This page took 0.102889 seconds and 4 git commands to generate.