customized SNICInterface

Dependents:   MurataTypeYD_Ping

Fork of NySNICInterface by Ryo Iizuka

Revision:
31:15c22824cc46
Parent:
29:6a0ba999597d
Child:
32:ae95309643aa
--- a/Socket/Socket.cpp	Tue May 27 01:33:04 2014 +0000
+++ b/Socket/Socket.cpp	Thu May 29 03:23:21 2014 +0000
@@ -170,47 +170,6 @@
     return 0;
 }
 
-int Socket::addrToInteger( const char *addr_p )
-{
-    if( addr_p == NULL )
-    {
-        printf("addrToInteger parameter error\r\n");
-        return 0;
-    }
-    
-    unsigned char ipadr[4];
-    unsigned char temp= 0;
-    int i,j,k;
-    
-    /* convert to char[4] */
-    k=0;
-    for(i=0; i<4; i ++)
-    {
-        for(j=0; j<4; j ++)
-        {
-            if((addr_p[k] > 0x2F)&&(addr_p[k] < 0x3A))
-            {
-                temp = (temp * 10) + addr_p[k]-0x30;
-            }
-            else if((addr_p[k] == 0x20)&&(temp == 0))
-            {
-            }
-            else
-            {
-                ipadr[i]=temp;
-                temp = 0;
-                k++;
-                break;
-            }
-            k++;
-        }
-    }
-
-    int   addr  = ( (ipadr[0]<<24) | (ipadr[1]<<16) | (ipadr[2]<<8) | ipadr[3] );
-
-    return addr;
-}
-
 int Socket::resolveHostName( const char *host_p )
 {
     C_SNIC_Core               *snic_core_p  = C_SNIC_Core::getInstance();