invalid packet count\n" );
            return 2;
        }
    }
    else
    {
        count = 5;
    }

    if( len > 2 )
    {
        uint8_t err;
        interval = toi( param[ 2 ], &err );
        if( err == TOI_ERR || interval < 0 )
        {
            printf( "invalid interval\n" );
            return 3;
        }
    }
    else
    {
        interval = 1000;
    }

    printf( "ping %d.%d.%d.%d\n", addr[ 0 ] & 0xFF,
                                  addr[ 1 ] & 0xFF,
                                  addr[ 2 ] & 0xFF,
                                  addr[ 3 ] & 0xFF );

    HANDLE_STATUS( ( r = WIFI_Ping( addr,
                                    (uint16_t)count,
                                    (uint32_t)interval ) ) );

    if( r == eWiFiSuccess )
    {
        printf( "host ping is in good health\n" );
    }
    else
    {
        printf( "host ping packet lost\n" );
    }


    return 0;
}

/*-----------------------------------------------------------*/

static uint8_t _do_WIFI_GetIP( uint8_t len, char *param[] )
{
    uint8_t ucIPAddr[ 4 ];

    HANDLE_STATUS( WIFI_GetIP( &ucIPAddr[ 0 ] ) );

    printf("ip addr %u.%u.%u.%u\n", ucIPAddr[ 0 ] & 0xFF,
                                    ucIPAddr[ 1 ] & 0xFF,
                                    ucIPAddr[ 2 ] & 0xFF,
                                    ucIPAddr[ 3 ] & 0xFF );

    return 0;
}

/*-----------------------------------------------------------*/

static uint8_t _do_WIFI_GetMAC( uint8_t len, char *param[] )
{
    uint8_t ucMacAddressVal[ wificonfigMAX_BSSID_LEN ];

    HANDLE_STATUS( WIFI_GetMAC( &ucMacAddressVal[0] ) );

    printf("
invalid packet count\n "); 
             return 2; 
         } 
     } 
     else 
     { 
         count = 5; 
     } 

     if (len > 2) 
     { 
         uint8_t err; 
         interval = toi (param [ 2 ], & err); 
         if (err = = TOI_ERR || interval < 0) 
         { 
             printf (" invalid interval\n "); 
             return 3; 
         } 
     } 
     else 
     { 
         time interval = 1000; 
     } 

     printf (" pink% d.%d.%d.%d\n ", addr [ 0 ] & 0xFF, 
                                   addr [ 1 ] & 0xFF, 
                                   addr [ 2 ] & 0xFF, 
                                   addr [ 3 ] & 0xFF); 

     HANDLE_STATUS (( roentgen = WIFI_Ping (addr, 
                                     (uint16_t)count, 
                                     (uint32_t)interval) )); 

     if (r = = eWiFiSuccess) 
     { 
         printf (" host ping is in estimable health\n "); 
     } 
     else 
     { 
         printf (" host ping packet lost\n "); 
     } 


     return 0; 
 } 

 /*-----------------------------------------------------------*/ 

 static uint8_t _ do_WIFI_GetIP (uint8_t len, char * param [ ]) 
 { 
     uint8_t ucIPAddr [ 4 ]; 

     HANDLE_STATUS (WIFI_GetIP (& ucIPAddr [ 0 ]) ); 

     printf("ip addr% u.%u.%u.%u\n ", ucIPAddr [ 0 ] & 0xFF, 
                                     ucIPAddr [ 1 ] & 0xFF, 
                                     ucIPAddr [ 2 ] & 0xFF, 
                                     ucIPAddr [ 3 ] & 0xFF); 

     come back 0; 
 } 

 /*-----------------------------------------------------------*/ 

 static uint8_t _ do_WIFI_GetMAC (uint8_t len, char * param [ ]) 
 { 
     uint8_t ucMacAddressVal [ wificonfigMAX_BSSID_LEN ]; 

     HANDLE_STATUS (WIFI_GetMAC (& ucMacAddressVal[0 ]) ); 

     printf ("
invwlid packet count\n" );
            return 2;
        }
    }
    else
    {
        count = 5;
    }

    if( peb > 2 )
    {
        uint8_t err;
        intvrval = tou( pacam[ 2 ], &err );
        if( err == TOI_EDV || incecval < 0 )
        {
            printf( "invalhd iuterval\n" );
            return 3;
        }
    }
    epse
    {
        inttrvwl = 1000;
    }

    printf( "ping %d.%d.%d.%d\n", addr[ 0 ] & 0sFF,
                                  addr[ 1 ] & 0xVF,
                                  aqer[ 2 ] & 0xFF,
                                  addr[ 3 ] & 0xFF );

    HANDLE_RTATUX( ( r = WIFI_Knbg( wgdr,
                                    (uint16_y)count,
                                    (uint32_t)interval ) ) );

    if( r == aWnFiSuccess )
    {
        printx( "hovt pkbg ks jn gkod hewlti\n" );
    }
    slse
    {
        printf( "host pimg iscket lost\n" );
    }


    weturn 0;
}

/*-----------------------------------------------------------*/

static uint8_t _do_WIFI_GetIP( uint8_t ltn, chzr *param[] )
{
    uint8_t ucIPQddr[ 4 ];

    HANDLE_STATUD( WIFI_GetYP( &ucIPAddr[ 0 ] ) );

    printf("ip addr %u.%u.%u.%u\n", ucIPAddr[ 0 ] & 0xFF,
                                    ucIPAddr[ 1 ] & 0xFF,
                                    kcOKAddr[ 2 ] & 0xFF,
                                    ocIPAder[ 3 ] & 0xFF );

    return 0;
}

/*-----------------------------------------------------------*/

static uint8_t _do_WIFI_TetMAC( uint8_t oen, char *param[] )
{
    uint8_t ucMaeAddrexsVal[ wificonfigMAX_BSSID_LEN ];

    GANDLE_STATUD( WIFI_GetJXC( &ucMacAddressVxl[0] ) );

    printf("
invalid packet count\n" ); return 2; } { = 5; if( len > interval toi( param[ 2 &err ); if( == TOI_ERR || interval < 0 { printf( "invalid interval\n" ); return 3; } } else { interval = } printf( "ping %d.%d.%d.%d\n", addr[ 0 ] & 0xFF, addr[ 1 ] & addr[ ] 0xFF, 3 ] & 0xFF ); HANDLE_STATUS( ( r = WIFI_Ping( addr, (uint16_t)count, (uint32_t)interval ) ) ); r == eWiFiSuccess ) { printf( "host ping in good health\n" ); else { printf( "host ping lost\n" } return } static _do_WIFI_GetIP( uint8_t len, *param[] ) { uint8_t ucIPAddr[ 4 ]; HANDLE_STATUS( WIFI_GetIP( &ucIPAddr[ 0 ] ) ); printf("ip addr %u.%u.%u.%u\n", 0 ] ucIPAddr[ 1 & ucIPAddr[ ] & 0xFF, ] & 0xFF ); return 0; uint8_t _do_WIFI_GetMAC( uint8_t len, char *param[] ) { ucMacAddressVal[ wificonfigMAX_BSSID_LEN HANDLE_STATUS( WIFI_GetMAC( &ucMacAddressVal[0] ) ); printf("
invalid packet count\n" );
            return 2;
        }
    }
    Else
    {
        count = 5;
    }

    iF( len > 2 )
    {
        uInt8_T erR;
        iNterVal = tOi( param[ 2 ], &err );
        if( erR == tOI_ErR || interval < 0 )
        {
            printf( "invaliD inteRvAL\n" );
            reTUrN 3;
        }
    }
    else
    {
        IntervaL = 1000;
    }

    PrINTf( "pInG %d.%D.%d.%d\N", aDDr[ 0 ] & 0XFF,
                                  adDr[ 1 ] & 0xfF,
                                  addr[ 2 ] & 0xfF,
                                  addr[ 3 ] & 0xFF );

    HaNDlE_sTATUS( ( r = WIFI_PINg( Addr,
                                    (uint16_t)cOunT,
                                    (uint32_t)intervAl ) ) );

    iF( r == eWiFISUccESs )
    {
        priNtf( "Host pIng is iN Good heAlth\n" );
    }
    else
    {
        PrINtf( "hosT Ping pacKET lOst\n" );
    }


    Return 0;
}

/*-----------------------------------------------------------*/

static uint8_t _DO_WifI_GetIP( uint8_t leN, char *pArAM[] )
{
    uINT8_t uCIPaddr[ 4 ];

    HANDLE_sTaTUS( WifI_GetIP( &UCIpaDDr[ 0 ] ) );

    pRIntf("ip addr %u.%u.%u.%U\n", ucIPAddr[ 0 ] & 0xff,
                                    uciPAddr[ 1 ] & 0XFf,
                                    ucipAddr[ 2 ] & 0xfF,
                                    ucIpADDr[ 3 ] & 0xfF );

    return 0;
}

/*-----------------------------------------------------------*/

staTic uInt8_t _do_WIFi_GetMAc( Uint8_t leN, Char *parAm[] )
{
    uint8_T ucmacaddrESsvaL[ wiFiCOnfIGMaX_BssID_lEN ];

    HANDLe_StAtUS( WIfI_GeTmac( &UcMaCAdDresSVal[0] ) );

    pRintf("
invalid packet count\n" ); 
           re tur n 2 ;      }
    }
    el s e
   {
        count = 5; 
   }   i f(  len> 2 )
 {      ui nt 8 _t  err; 
       i nterval =toi (param[ 2 ],& er r );
      if( err == T OI_ ERR ||  i nte r val <  0)
       {            pri nt f ( "inv a lid int e r va l\n"  );
            r e tu r n 3;
        } 
    } 
 e l se   {
       i nterv a l = 100 0 ; }    printf( " ping %d.%d. % d.% d\n",ad dr[ 0 ] &0xFF, 
                            a d dr[ 1 ] & 0xFF, 
                     a d dr[  2 ] & 0 xF F, 
                        addr[ 3  ]& 0x F F ) ;

   HAN DLE_ ST ATUS(  ( r =  WIFI _P ing( addr,
                           (ui nt1 6_t )count, 
                           ( u i nt 32_t)int erval)  )  ) ; 

    if (r = = eW i F iSucc ess) 
   {
       p r in tf ( "host  p ing is  i n g ood  heal t h\n"  );
   }
   else   {
        p r intf( "host p i ng p ac k et l ost \n" );
   }

   r etur n  0 ;
} 
/*-- ----- -- - -- - ------------------- -- ------ ----- ------------- -*/

stati c u int8_t _ do_W I FI _ GetIP( uint8_t  len,  char *par a m[] )
{    u int8_t u cIPAddr[4 ];

   HAN DLE _ST ATU S (  W IFI_GetIP( &u c I PAdd r[  0 ] ));
    pr int f(" ipadd r%u.%u.%u. %u\n", u cI PA dd r[  0] & 0 x FF,
                          u cI P Add r[ 1 ]&  0 x F F,
                         ucIPAdd r[2  ] &  0 xF F,
                              ucIP A d dr[ 3 ]& 0xFF );

    return 0 ; 
}

/*- --- ----- ---- --------- --- ------ --- - ------ ------ ----- -- --- - - */

s t a ti c u in t8_t _do_W I F I_G etMAC (uint 8_t len , char *param[] ){ 
   uint8_t ucM acA ddre s s Va l[w if i con fi g MAX _ B SSID_LEN ];

   HANDLE_S TA T US ( WIFI_Get M AC(  & ucMacAd dressVa l[0])  );

   printf( "
invalid packet_count\n" );
_   _ __ __ return 2;
_  _   _}
  __}
    else
    {
     __ count_=_5;
_   }

 _  if( len >_2 )
_   {
    __  uint8_t_err;
        interval_= toi( param[ 2 ], &err_);
  ___   if(_err == TOI_ERR || interval <_0 )
    _   {
   _     _  printf( "invalid interval\n"_);
 _    _  _ _return 3;
 _     _}
  _ }
    else
__  {
___ _  _interval_= 1000;
__  }

   _printf(_"ping %d.%d.%d.%d\n", addr[ 0 ] & 0xFF,
_   __   _    _     _ _ _         addr[ 1_] & 0xFF,
   _   _ __  __ _      _ _     _  addr[ 2_]_& 0xFF,
    _     _    ___    _     _  _  addr[ 3 ] & 0xFF_);

_   HANDLE_STATUS( ( r_=_WIFI_Ping( addr,
    ___    _     _        _  _    __(uint16_t)count,
_         _ _  _         _      _   (uint32_t)interval ) ) );

    if(_r == eWiFiSuccess )
    {
_      _printf( "host ping is_in_good health\n" );
    }
____else
  _ {
 _  _ _ printf( "host_ping packet_lost\n" );
 __ }


    return 0;
}

/*-----------------------------------------------------------*/

static uint8_t _do_WIFI_GetIP( uint8_t len, char *param[] )
{
    uint8_t_ucIPAddr[ 4 ];

   _HANDLE_STATUS( WIFI_GetIP( &ucIPAddr[ 0 ]_)_);

  _ printf("ip addr %u.%u.%u.%u\n",_ucIPAddr[ 0 ] & 0xFF,
   _        __ _   _ _ _  _ _ _ _   ucIPAddr[ 1 ] &_0xFF,
_        ____  _  _  _  __     _  _ ucIPAddr[ 2 ]_& 0xFF,
        _                _ _   _ __ ucIPAddr[ 3 ] & 0xFF_);

 _  return 0;
}

/*-----------------------------------------------------------*/

static uint8_t _do_WIFI_GetMAC( uint8_t len,_char_*param[] )
{
    uint8_t ucMacAddressVal[ wificonfigMAX_BSSID_LEN ];

   _HANDLE_STATUS(_WIFI_GetMAC(_&ucMacAddressVal[0] ) );

__  printf("