[Top][All Lists]

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

Re: [lwip-devel] bridgeif.c questions

From: address@hidden
Subject: Re: [lwip-devel] bridgeif.c questions
Date: Tue, 4 Apr 2017 20:53:34 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

Gisle Vanem wrote:
I've been playing a bit with the new bridgeif.c functions
in my Windows test-app. But it seems to be a real memory hog.

It's not for me. But that could be lack of documentation... I'll add some example code soon.

But I'm not sure how this bridge should work with pcapif.c.
Do I need 2 WPcap ifaces and somehow join those with bridge_add_port()?

Yes. WPcap has the problem that the lwip netif has to filter out transmitted packets as it gets back all self-sent packets but you don't want to filter out all TX packets as you then cannot talk to the lwip netif from the same PC any more... I've added code to PCAPIF_RECEIVE_PROMISCUOUS==1 to handle that (but it's rather slow as it uses memcmp to find the transmitted packets).

Since there's no example for it AFAICS, I'm now sure how to initialise it.
Which 'struct netif *' should I use in bridgeif_init()?
1 struct netif per port just as if you had no bridge and 1 netif per bridge that gets 'bridgeif_init' as init function and a pointer to a 'bridgeif_initdata_t' as 'void *state' where the bridge is configured.

I'll try to add something to the bridgeif docs.


reply via email to

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