From 710550be055da67c9c0184061b61e2c63894afbf Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Thu, 2 Dec 2010 11:17:41 -0500 Subject: [PATCH] Make it easier to bring up tun/tap devices --- support/Makefile | 3 +++ support/{tap_test.c => pltap.c} | 3 ++- support/{tun_test.c => pltun.c} | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 support/Makefile rename support/{tap_test.c => pltap.c} (92%) rename support/{tun_test.c => pltun.c} (92%) diff --git a/support/Makefile b/support/Makefile new file mode 100644 index 0000000..5cec452 --- /dev/null +++ b/support/Makefile @@ -0,0 +1,3 @@ +all: pltun pltap +pltun: pltun.c tunalloc.c +pltap: pltap.c tunalloc.c diff --git a/support/tap_test.c b/support/pltap.c similarity index 92% rename from support/tap_test.c rename to support/pltap.c index 947019f..49e2d7e 100644 --- a/support/tap_test.c +++ b/support/pltap.c @@ -18,7 +18,8 @@ int main(void) printf("Sleeping for 120 secs...\n"); - sleep(120); + while (1) + sleep(120); printf("Closing\n"); diff --git a/support/tun_test.c b/support/pltun.c similarity index 92% rename from support/tun_test.c rename to support/pltun.c index 947019f..49e2d7e 100644 --- a/support/tun_test.c +++ b/support/pltun.c @@ -18,7 +18,8 @@ int main(void) printf("Sleeping for 120 secs...\n"); - sleep(120); + while (1) + sleep(120); printf("Closing\n"); -- 2.43.0