Ejemplo n.º 1
0
void act_UP(void)
{
    idle_filter_init();
    flush_timeout_queue();
    interface_up();
    ppp_half_dead = 0;
    if (buffer_packets)
        forward_buffer();
    /* Once we get here, we might as well kill off any outstanding
     * FIFO requests */
    if (!use_req && req_pid) {
        killpg(req_pid, SIGKILL);
        kill(req_pid, SIGKILL);
        req_pid=0;
        syslog(LOG_INFO,"Cancelling link up requested denied in favour of existing link.");
    }
}
Ejemplo n.º 2
0
Archivo: slip.c Proyecto: OPSF/uClinux
static void start_bootp()
{
    char buf[128];

    idle_filter_init();

    sprintf(buf,"%s --dev sl%d",PATH_BOOTPC,link_iface);
    /* FIXME: there is still some possibility of a bad
     * interaction between the signal handlers and the command
     * running on the far side of the pipe. Probably I should
     * write my own popen() call the same way I have my open system() call.
     */
    if ((bootpfp = popen(buf,"r"))==NULL) {
	syslog(LOG_ERR,"Could not run command '%s': %m",buf);
	die(1);
    }
    pipe_init(fileno(bootpfp),&bootp_pipe);
    have_local = 0;
    have_remote = 0;
    waiting_for_bootp = 1;
}