Sylvain Rochet | 30 Jan 11:43 2015

Re: Virtual machines in the same host (bridge).


On Fri, Jan 30, 2015 at 08:28:20AM -0200, Norberto R. de Goes Jr. wrote:
> Hello Sylvain.
> Below the information asked by you. Thanks in advance!
> Norberto
> >>>>>>>>>> VM#1 (with lwip app):
> [root <at> vmGoes-fedora norberto]# brctl show
> bridge name bridge id STP enabled interfaces
> br0 8000.080027c07dab no p2p1
> tap0

Looks good.

> [root <at> vmGoes-fedora norberto]#
> [root <at> vmGoes-fedora norberto]# ip a s
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>     inet scope host lo
>     inet6 ::1/128 scope host
>        valid_lft forever preferred_lft forever
> pfifo_fast master br0 state UP qlen 1000
>     link/ether 08:00:27:c0:7d:ab brd ff:ff:ff:ff:ff:ff
>     inet6 fe80::a00:27ff:fec0:7dab/64 scope link
>        valid_lft forever preferred_lft forever

(Continue reading)

Norberto R. de Goes Jr. | 29 Jan 19:42 2015

Virtual machines in the same host (bridge).

Hi All.

I have the following environment:

- host Windows-7 Professional, 64 bits, with two virtual machines (Virtual Box), both  with Fedora-17 Distro, 32 bits; 
- the VM´s network configured as "Internal Network"

I wrote a small "lwip application" based on unix port (community). It runs in VM #1 and a "tap0" device is created with success. In the VM#2 no application is running.

When I "ping" the tap0 IP from the VM#1 the reply is received, no problem. I can see the traces reported by lwip like arp received and arp reply. But when I "ping" the tap0 from VM#2 I have no answer.

Faced with the situation, I followed the steps suggested by another solved threads from this list, for instance:
Basically, the threads show how to configure a linux bridge (br0) and your attached devices.

But I did not get success still. The pings from VM#2 go from the ethernet to the "br0"(VM#1) device and after to the "tap0" device. There the lwIP generates an answer and sends it to the asking host. But then the packages disappear. They do not go back to the "br0" device (seen with dcpdump).

Please, are there any restriction in use the lwip library in virtual machines hosted on the same server? More specifically with linux bridge use?


Norberto R. de Goes Jr.
Tel.: +55 19 3705-4241 / Fax: +55 19 3705-6125

lwip-users mailing list
Karl Karpfen | 29 Jan 07:26 2015

SNTP client does not work


I'm trying to implement an SNTP client based on the example that comes with lwIP 1.4.x but with no success. That's what I have done:

- I have rewritten the example a bit to get rid of the sys_xxx() functions which are not available for me

- I do a ntohl() on all IP's that are retruned by ipaddr_aton(), this seems to be necessary on my platform (at least for configuring the IP of my Ethernet interface it has to be done to apply the correct address for it, so I assume this is necessary for all IPs)

- based on this I do a ntohs() for the SNTP-port too

- I have set IP, gateway and netmask for my Ethernet interface correctly

- NTP-server-IP is correct too

- receive-callback for UDP-responses is available and valid

- udp_sendto() that transmits the SNTP UDP request returns with ERR_OK

- firewall is open for NTP-responses, this works fine for all other systems in same network

Nevertheless my receive-callback is never called, I do not get back a response from the NTP-server.

So...any ideas what could be wrong/where I could look what is going on?


lwip-users mailing list
Stefan P. Galanos | 27 Jan 21:35 2015

multicast group membership not working for tap device

I am running lwip version 1.41 on a Linux server(red hat release 6.4).  I am using the socket API and attempting to listen to multicast packets that a test client running on the same linux server is sending.  I have successfully send unicast packets using this setup on the tap0 device.   However, when my listener tries to join a multicast group, I see the IGMP v2 report packets going out and the igmp_joingroup call returns without an error code but I don’t join the multicast group(I have confirmed this with a netstat –g).  It appears that I have done all the setup successfully so I am stumped.  Any ideas as to what I might be doing wrong? 


As a side question, I was wondering why the system command ifconfig(in file tapif.c) used to configure the tap0 device uses the gateway instead of the IP:


netif: IP address of interface  set to

netif: netmask of interface  set to

netif: GW address of interface  set to

tapif_init: system("/sbin/ifconfig tap0 inet")


tap0      Link encap:Ethernet  HWaddr 12:48:BE:27:92:1E 

          inet addr:  Bcast:  Mask:


          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:500

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


Thanks in advance for any help,


lwip-users mailing list
Ivan Delamer | 26 Jan 18:05 2015

Re: Pinging for link-local IP6 address not working

Not sure about that particular error, but, if you're trying to ping 
using LL addresses, then you may need to specify the interface together 
with the address.

In windows it looks something like ping fe80::1%10 for interface 10. 
You can get the interface number if you run ipconfig.


> Date: Sun, 25 Jan 2015 10:13:23 -0700 (MST)
> From: Mohsin <mohsin_kesarani@...>
> To: lwip-users@...
> Subject: Re: [lwip-users] Pinging for link-local IP6 address not
> 	working
> Message-ID: <>
> Content-Type: text/plain; charset=us-ascii
> Hi everyone,
> Can anyone please tell me why I get "General Failure" reply when I 
> ping IP6
> address configured usin LWIP in my device though I can see packets 
> Tx/Rx jn
> wireshark.
> Please I'm stucked here since many days as I haven't found any 
> solution for
> successful ping.
> Also when I tried pinging IPv6 between two PCs for link-local address, 
> even
> then it gives General Failure.
> Does it mean pinging IPv6 will always give "General Failure" only?????
> Really I'm unable to judge whether IPv6 is properly implemented in my 
> device
> or not?
> Any help would be highly appreciated.
> Thanks & Regards,
> Mohsin Kesarani
Thomas Ubensee | 26 Jan 14:30 2015

PPPOE Server


In lwIP code I saw a preprocessor variable PPPOE_SERVER. Currently enabling this variable leads to an error: "PPPOE_SERVER is currently not supported under lwIP".
However it seems there are already a lot of pieces of code just for PPPOE as Server.
Does anybody know about what is still missing in order to make PPPOE as Server run properly under lwIP?

Thanks in advance,

lwip-users mailing list
Jan Menzel | 19 Jan 14:24 2015

Understanding retransmission

Hi All!
	May I ask for your comments on the attached Wireshark capture? is LwIPs Git master on a LPC1768. is some
Linux based server. The LPC is just flushing some larger buffer (a few
mb) to the server. In line 21 the shark records a duplicated ACK, which
I've seen a few times already (there is one in line 7 for example.). As
result LwIP sends a packet, that the Shark flagged as "new fragment
overlaps old data". Looking into the details, this seems to me just a
retransmission of the data that follows the ones that have been just
acknowledged again. As you can see from the following lines, LwIp
retransmits the retransmission a few times but the server does not
respond anymore. The next reaction of the server is in line 29 a
"Encryption Alert" which to my understanding is the request to terminate
the SSL layer on top of the TCP connection.
	Comparing the duplicated acknowledge from line 21 with the one in line
7 one can see, that in line 8 the server has immediately send an other
acknowledge, which keeps the data flowing: LwIp is sending the next
bunch of data in line 9.
	From my limited understanding the flow in line 21 and onwards is ok
from LwIps point of view... However its not ok that the server refuses
to continue after the retransmission.
	Is there anything I can do in LwIp to fix this?

Attachment (DB_150119_1.pcapng): application/octet-stream, 29 KiB
lwip-users mailing list
TJO | 16 Jan 15:29 2015

netconn_bind - How to "unbind"?


Im using lwip 1.4.1.
I use TCP and is the listen server using netconn API.
Only one connection allowed.

I create a NetConn
I do a netconn_bind
Then a netconn_listen
Finally I call netconn_accept

But, how do I handle a client reconnect in the case the client don't
disconnect the correct way, but just connects again?
Then I cant do a network_bind for 2 minutes. All in sync with the
documentation. (In use error).

Is there any way I can do this faster in case a client doen't behave??


View this message in context:
Sent from the lwip-users mailing list archive at
madonna | 16 Jan 07:30 2015

HTTP server unable to receive file from client using socket connection.

Hi Guys,

I am using lwIP socket connection with RTOS doing a HTTP server with the
intention to receive a binary file from a client.

In general, a webpage shall be served by the HTTP server when the client
entered the IP address of the server. And from the webpage the client can
browse for a binary file to be upload to the server.

And the issue that I am facing is that I only able to receive the first
packet of the file. From the wireshark it is showing [TCP window full] [TCP
zero window].

So what should I do to overcome this issue or is there an example code for
file downloading using socket connection with HTTP?

View this message in context:
Sent from the lwip-users mailing list archive at
Robert Deschambault | 14 Jan 22:46 2015

Compiler Warnings for LWIP_PLATFORM_DIAG


I am trying to use the latest sources from master branch in one of my projects.  I had previously been using the v1.4.1 code.

I am getting many compiler warnings that seem to be tied to: LWIP_PLATFORM_DIAG.  Here is a sample:

compiling api_lib.c...
C:\work\exp_lm_g2_cmsis-rtos\Libraries\OpenSource\lwip-master-6ca8bc4\src\api\api_lib.c(474): warning:  #223-D: function "LWIP_PLATFORM_DIAG" declared implicitly
    LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len));
C:\work\exp_lm_g2_cmsis-rtos\Libraries\OpenSource\lwip-master-6ca8bc4\src\api\api_lib.c(474): warning:  #174-D: expression has no effect
    LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len));
C:\work\exp_lm_g2_cmsis-rtos\Libraries\OpenSource\lwip-master-6ca8bc4\src\api\api_lib.c(474): warning:  #174-D: expression has no effect
    LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len));
C:\work\exp_lm_g2_cmsis-rtos\Libraries\OpenSource\lwip-master-6ca8bc4\src\api\api_lib.c(629): warning:  #223-D: function "LWIP_PLATFORM_DIAG" declared implicitly
    LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_send: sending %"U16_F" bytes\n", buf->p->tot_len));
C:\work\exp_lm_g2_cmsis-rtos\Libraries\OpenSource\lwip-master-6ca8bc4\src\api\api_lib.c(629): warning:  #174-D: expression has no effect
    LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_send: sending %"U16_F" bytes\n", buf->p->tot_len));
..\Libraries\OpenSource\lwip-master-6ca8bc4\src\api\api_lib.c: 5 warnings, 0 errors

Am I missing a header or missed a define somewhere?


Bob Deschambault
6614 Astro Court, Mississauga
Ontario, Canada L5N 7J2
home: 905 824 7159
cell: 416 457 7163
twitter: <at> rdeschambault
lwip-users mailing list
Sylvain Rochet | 14 Jan 12:10 2015

Re: Fwd: question about using master/head instead of 1.4.1

Hi Thomas,

On Wed, Jan 14, 2015 at 09:05:19AM -0200, Thomas Ubensee wrote:
> Hy Sylvain,
> thank you for the very quick response. So when we choose to merge the new
> PPP code into version 1.4.1 which branch would you recommend?

Erm, the PPP new code is in, and now only in, the master branch.

lwip-users mailing list