Hi

i have a little question. 

 conn = netconn_new(NETCONN_TCP);
 netconn_bind(conn, NULL,7);
 netconn_listen(conn);

struct ip_addr adres;
unsigned short port;
netconn_addr(conn,&adres,&port);
printf("\nPort=%d\n",port);
printf("\nAdres=%d.%d.%d.%d\n",(adres.addr)& 0xff,(adres.addr>>8)&
0xff,(adres.addr>>16)& 0xff,(adres.addr>>24)& 0xff);

then i got strange addres: 246.1.32.0
port is OK
you know why?
-----
PS.
I added network interface.To check this i add in netif_add(...)
    printf("\nAdres=%d.%d.%d.%d\n",(ipaddr->addr)& 0xff,(ipaddr->addr>>8)&
0xff,(ipaddr->addr>>16)& 0xff,(ipaddr->addr>>24)& 0xff);
and addres is correct(This addres was negotiate by IPCP )







-- 
View this message in context: 
http://www.nabble.com/-lwip--ppp--netconn_addr%28%29--tf1980090.html#a5433151
Sent from the lwip-users forum at Nabble.com.



_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to