diff options
author | Russ Dill | 2002-10-14 21:41:28 +0000 |
---|---|---|
committer | Russ Dill | 2002-10-14 21:41:28 +0000 |
commit | 61fb48930f45aa536584b2047f9e703186e8f69f (patch) | |
tree | e3b93e0a694be81939f8c4762553c43ffdb9b10b /networking/udhcp/frontend.c | |
parent | 9060a7315980bb05f42eab76b88746d43e138188 (diff) | |
download | busybox-61fb48930f45aa536584b2047f9e703186e8f69f.zip busybox-61fb48930f45aa536584b2047f9e703186e8f69f.tar.gz |
added full udhcp integration
Diffstat (limited to 'networking/udhcp/frontend.c')
-rw-r--r-- | networking/udhcp/frontend.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/networking/udhcp/frontend.c b/networking/udhcp/frontend.c new file mode 100644 index 0000000..de57795 --- /dev/null +++ b/networking/udhcp/frontend.c @@ -0,0 +1,16 @@ +#include <string.h> + +extern int udhcpd_main(int argc, char *argv[]); +extern int udhcpc_main(int argc, char *argv[]); + +int main(int argc, char *argv[]) +{ + int ret = 0; + char *base = strrchr(argv[0], '/'); + + if (strstr(base ? (base + 1) : argv[0], "dhcpd")) + ret = udhcpd_main(argc, argv); + else ret = udhcpc_main(argc, argv); + + return ret; +} |