Intermec ck1 Reference Guide

Page of 390
Chapter 2 — Configuring the CK1 System 
CK1 SDK Programmer’s Reference Manual 
79 
 
 
  PrintPPPConfig(ConnectType, &PPPConfig); 
   
 
break; 
      case '3' 
: if (ResetPPPConnection()) 
 
 
    printf("Fail Reset PPP Connection\n"); 
   
 
else 
 
 
    printf("Success Reset PPP Connection\n"); 
   
 
break; 
      case '4' 
: if (RequestPPPStatus() != PPP_STATE_CLIENT_NOTSTART) 
   
 
 
 
    printf("current ppp Connect Mode = %d\n", 
RequestPPPStatus()); 
 
 
    printf("ResetPPPConnection or Change PPP connect type in advance\n"); 
 
 
    break; 
   
 
 
 
  if (DialPPPConnection()) 
 
 
    printf("Fail calling Dial PPP API\n"); 
   
 
else 
 
 
    printf(" start dial PPP Connection\n"); 
   
 
break; 
      case '5' 
: if (RequestPPPStatus() != PPP_STATE_CLIENT_NOTSTART) 
   
 
 
 
    printf("current ppp Connect Mode = %d\n", 
RequestPPPStatus()); 
 
 
    printf("ResetPPPConnection or Change PPP connect type in advance\n"); 
 
 
    break; 
 
   
 
 
 
  if (DialPPPConnection()) 
 
 
    printf("Fail calling Dial PPP API\n"); 
   
 
else 
   
 
 
 
    printf(" start dial PPP Connection\n"); 
 
 
    while ((PPPStatus = RequestPPPStatus()) == 
PPP_STATE_CLIENT_CONNECTING) 
 
 
    { 
 
 
      printf("ppp client connecting...wait.....\n"); 
 
 
      sleep(2); 
 
 
    } 
 
 
    if (PPPStatus == PPP_STATE_CLIENT_CONNECTED) 
 
 
      printf("Success Dial PPP Connection\n"); 
 
 
    else 
 
 
      printf("ppp dial complete and fail to connect to peer\n"); 
   
 
   
 
break; 
      case '6' 
: printf("Finally we got PPPGETTY status = 
%d\n",RequestPPPStatus()); 
   
 
break; 
      case '7'  : printf("Key in new Connect Type\n"); 
 
 
  scanf("%d", &ConnectType); 
 
 
  if (WritePPPCurrentType(ConnectType)) 
 
 
    printf("fail to write file pppconf.current\n"); 
   
 
else 
 
 
    printf("current ppp Connect Mode = 
%d\n",ReadPPPCurrentType()); 
   
 
break; 
      case 'q' 
      case 'Q'  : Choice = 0; 
   
 
break; 
      default 
: printf("\nWrong selection\n");