Make it easier to bring up tun/tap devices
Sapan Bhatia [Thu, 2 Dec 2010 16:17:41 +0000 (11:17 -0500)]
support/Makefile [new file with mode: 0644]
support/pltap.c [moved from support/tap_test.c with 92% similarity]
support/pltun.c [moved from support/tun_test.c with 92% similarity]

diff --git a/support/Makefile b/support/Makefile
new file mode 100644 (file)
index 0000000..5cec452
--- /dev/null
@@ -0,0 +1,3 @@
+all: pltun pltap
+pltun: pltun.c tunalloc.c
+pltap: pltap.c tunalloc.c
similarity index 92%
rename from support/tap_test.c
rename to support/pltap.c
index 947019f..49e2d7e 100644 (file)
@@ -18,7 +18,8 @@ int main(void)
 
     printf("Sleeping for 120 secs...\n");
 
-    sleep(120);
+    while (1)
+        sleep(120);
 
     printf("Closing\n");
 
similarity index 92%
rename from support/tun_test.c
rename to support/pltun.c
index 947019f..49e2d7e 100644 (file)
@@ -18,7 +18,8 @@ int main(void)
 
     printf("Sleeping for 120 secs...\n");
 
-    sleep(120);
+    while (1)
+        sleep(120);
 
     printf("Closing\n");