⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gprstst.cpp

📁 一个PPP上网协议源码,可通过GPRS网络接入因特网.
💻 CPP
字号:
/*//////////////////////////////////////////////////////////////////////////
Description: The program executes the necessary operations to make
	     the ETR232i, including GPRS module, connecting to internet.

//////////////////////////////////////////////////////////////////////////*/
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include "etr_ppp.h"
#include "GPRS.h"

int main(  )
{
   int             i1, i2;
   unsigned char   OwnIPStr[20];
   PPPGPRSState    PPPState;

   printf( "GPRS Test Demo V1.0\n" );

   for( i1=0, i2=-1; ; )
      {
      PPPState = PPP_Running( );
      if( PPPState!=PPPLINKUP )
	 {
	 i1 = 0;
	 if( PPPState != i2 )
	    {
	    printf( "RIdx=%d ", PPPState );
	    i2 = PPPState;
	    }
	 continue;
	 }
      if( i1==0 )
	 {
	 GetOWNIP( OwnIPStr );
	 printf( "\nIP=%d.%d.%d.%d\n", OwnIPStr[0], OwnIPStr[1], OwnIPStr[2], OwnIPStr[3] );
	 i1 = 1;
	 }
      if( kbhit( ) )   { getch(); break; }
      }

   return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -