lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] [lwip][ppp][netconn_addr()]


From: Gustlik
Subject: [lwip-users] [lwip][ppp][netconn_addr()]
Date: Fri, 21 Jul 2006 05:52:20 -0700 (PDT)

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.





reply via email to

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