run ppp to pair
execl("/sbin/pppd", "pppd", buf, "115200", "192.167.7.1:192.167.7.10", "noauth", "nodetach", "debug", "local", "persist", "silent", "logfile", "/tmp/abc.txt", NULL);
exit(0);
} else if (pid > 0) {
printf("HELLO CHILD\n");
sleep(1);
dup2(ptyfd, 0);
dup2(ptyfd, 1);
execl("/sbin/pppd", "pppd", "noauth", "logfile", "/tmp/pppd.log", NULL);
exit(0);
Comments
Post a Comment