ER looutput (T_NET_BUF *output, TMO tmout) { ER error; NET_COUNT_LOOP(net_count_loop.out_octets, output->len); NET_COUNT_LOOP(net_count_loop.out_packets, 1); if ((error = tsnd_dtq(DTQ_LOOP_OUTPUT, output, tmout)) != E_OK) syslog(LOG_NOTICE, "[LOOP] drop error: %s", itron_strerror(error)); return error; }
ER ppp_output (T_NET_BUF *output, TMO tmout) { ER error = E_OK; #ifdef PPP_CFG_MODEM #if 0 /* 保留 */ /* モデムの接続完了まで待つ。*/ if ((error = wait_modem()) != E_OK) goto buf_ret; #endif #endif /* of #ifdef PPP_CFG_MODEM */ /* IPCP の接続完了まで待つ。*/ if ((error = wait_ipcp()) != E_OK) goto buf_ret; #ifdef PPP_IDLE_TIMEOUT wai_sem(SEM_IDLE_TIMEOUT); if (idle) { untimeout((FP)idle_timeout, NULL); idle = false; } sig_sem(SEM_IDLE_TIMEOUT); #endif /* of #ifdef PPP_IDLE_TIMEOUT */ /* PPP 出力キューに投入する。*/ if ((error = tsnd_dtq(DTQ_PPP_OUTPUT, output, tmout)) != E_OK) goto buf_ret; #ifdef PPP_IDLE_TIMEOUT wai_sem(SEM_IDLE_TIMEOUT); if (!idle && ppp_phase == PPP_PHASE_NETWORK) { timeout((FP)idle_timeout, NULL, PPP_IDLE_TIMEOUT); idle = true; } sig_sem(SEM_IDLE_TIMEOUT); #endif /* of #ifdef PPP_IDLE_TIMEOUT */ return error; buf_ret: syscall(rel_net_buf(output)); NET_COUNT_PPP(net_count_ppp.out_err_packets, 1); return error; }