Esempio n. 1
0
int
ppp_pstn_testing (PSTN_SET * settings)
{
  char buffer[64];
  pppondial_pstn_a ("9172233");
  ppp_options_pstn_a ("visiontek", "ippco123");
  ppp_pstn_a ("9172233", "visiontek", "ippco123", "0.0.0.0", "0.0.0.0",
	      "255.255.255.0");


  //  pppdial_pstn(settings->dialno);
  //  ppp_options(settings->username,settings->password);
  //  ppp_on_dial(settings->dialno);
  lk_dispclr ();
  lk_disptext (2, 0, "Connecting PPP", 0);
  lk_disptext (3, 0, "pls wait...", 0);
  if (ppp_open () < 0)
    {
      lk_dispclr ();
      lk_disptext (2, 0, "ISP Connection", 0);
      lk_disptext (3, 0, "Failed", 0);
      lk_disptext (5, 0, "Press any key", 0);
    }
  else
    {
      get_pstnip ();
      ppp_close ();
      lk_dispclr ();
      lk_disptext (2, 2, "PPP CONN. SUCCESS", 0);
      lk_disptext (3, 0, "WITH", 0);
      lk_disptext (3, 6, pstn_ip, 0);
      lk_disptext (5, 3, "Press any key", 0);
    }
  lk_getkey ();
  return 0;
}
Esempio n. 2
0
/**
 * Call ppp_open() inside the tcpip_thread context.
 */
static void pppapi_do_ppp_open(struct pppapi_msg_msg *msg) {
  msg->err = ppp_open(msg->ppp, msg->msg.open.holdoff);
  TCPIP_PPPAPI_ACK(msg);
}