blob: fa77ab977c4a42f86f02afdbf5a866e2b8ffeef9 [file] [log] [blame]
Russ Dill61fb4892002-10-14 21:41:28 +00001#include <string.h>
2
3extern int udhcpd_main(int argc, char *argv[]);
4extern int udhcpc_main(int argc, char *argv[]);
5
6int main(int argc, char *argv[])
7{
8 int ret = 0;
9 char *base = strrchr(argv[0], '/');
Eric Andersenc7bda1c2004-03-15 08:29:22 +000010
Russ Dill61fb4892002-10-14 21:41:28 +000011 if (strstr(base ? (base + 1) : argv[0], "dhcpd"))
12 ret = udhcpd_main(argc, argv);
13 else ret = udhcpc_main(argc, argv);
Eric Andersenc7bda1c2004-03-15 08:29:22 +000014
Russ Dill61fb4892002-10-14 21:41:28 +000015 return ret;
16}