lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #6765] Supporting new line characters in inet_aton()


From: Frédéric Bernon
Subject: [lwip-devel] [patch #6765] Supporting new line characters in inet_aton()
Date: Thu, 23 Apr 2009 19:37:20 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.0.9) Gecko/2009040821 Firefox/3.0.9 (.NET CLR 3.5.30729)

Follow-up Comment #8, patch #6765 (project lwip):

With the change I propose, this code :

  char* dnsname[]={
   "127.0.0.1",
   "127.0.0.1 ",
   "127.0.0.1n",
   "127.0.0.1r",
   "abc.de",
   "3com.com",
   "3com.com ",
   "3com.com n",
   "3com.comn",
   "3com.comr",
   "3com.comrn",
   "3com.comrn",
   "3com.comnr"};
  int i;
  for( i=0; i<(sizeof(dnsname)/sizeof(dnsname[0])); i++) {
    printf("[%i]n%sn0x%08lXn", i, dnsname[i], inet_addr(dnsname[i]));
  }

give this output :

[0]
127.0.0.1
0x0100007F
[1]
127.0.0.1
0x0100007F
[2]
127.0.0.1

0x0100007F
[3]
127.0.0.1
0x0100007F
[4]
abc.de
0xFFFFFFFF
[5]
3com.com
0xFFFFFFFF
[6]
3com.com
0xFFFFFFFF
[7]
3com.com

0xFFFFFFFF
[8]
3com.com

0xFFFFFFFF
[9]
3com.com
0xFFFFFFFF
[10]
3com.com

0xFFFFFFFF
[11]
3com.com

0xFFFFFFFF
[12]
3com.com

0xFFFFFFFF

With your last change, the output is :

[0]
127.0.0.1
0x0100007F
[1]
127.0.0.1
0x0100007F
[2]
127.0.0.1

0x0100007F
[3]
127.0.0.1
0x0100007F
[4]
abc.de
0xFFFFFFFF
[5]
3com.com
0x03000000
[6]
3com.com
0x03000000
[7]
3com.com

0x03000000
[8]
3com.com

0x03000000
[9]
3com.com
0x03000000
[10]
3com.com

0x03000000
[11]
3com.com

0x03000000
[12]
3com.com

0x03000000


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6765>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]