SetIPaddress(char *Action, usigned char *ipaddress)
{
int pid;
pid = fork();
if(0 == pid)
{
sprintf(buffer, "%d.%d.%d.%d.%d.%d",ipaddress[0] ,ipaddress[1],ipaddress[2],ipaddress[3],ipaddress[4],ipaddress[5]);
if(strcmp(Action, "IP") == 0)
{
execl("/bin/busybox", "ifconfig", "eth0", buffer,NULL);
}
else if(strcmp(Action, "NETMASK") == 0)
{
execl("/bin/busybox", "ifconfig", "eth0", "netmask", buffer, NULL);
}
}
}