lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] How to build a simple TCP [...]


From: Simon Goldschmidt
Subject: Re: [lwip-users] How to build a simple TCP [...]
Date: Thu, 10 Jul 2008 10:41:07 +0200

This issue is win32-port-related: the win32 port in contrib uses the same API 
as wireshark to receive and send  ethernet packets. It can see all traffic seen 
by the windows-internal ethernet adapter, even traffic that is originated by 
the PC it runs in. However, to distinguish each lwIP process from the normal 
windows PC ethernet traffic, each lwIP instance needs its own MAC that has to 
be different from the PC's MAC.

This issue is completely handled in pktif.c: the netif's MAC is assigned there 
by simply adding 1 + lwIP's netif index to that last octet of the mac (which is 
done in line 131).

If your PC's MAC address is 01:02:03:04:05:06, lwIP will take 01:02:03:04:05:07 
for its first pktif driver running on that ethernet card (or :08 if you also 
use the loopif). However, the other instances of lwIP (running in their own 
process) do the same, so all instances of lwIP use the same MAC address. What 
you would have to do is to make the first instance of lwIP use a different MAC 
than the second. But since this is difficult to do, this has not been done in 
CVS (yet?). For example, you could take the process ID and add it as an 
offset...

Simon


-------- Original-Nachricht --------
> Datum: Thu, 10 Jul 2008 09:57:34 +0200
> Von: "Antonio de Angelis" <address@hidden>
> An: "\'Mailing list for lwIP users\'" <address@hidden>
> Betreff: Re: [lwip-users] How to build a simple TCP [...]

> Yes, you are right! If I put the two instances on the same machine, they
> run
> with the same MAC address because I have only one Ethernet adapter... can
> you explain what should I change in pktif.c exactly? I'm a beginner in
> lwip,
> I understand that now the problem is that both instances have the same MAC
> address but I don't know how to fix this issue... thank you and thanks to
> Kieran and Bill, all of your mails help me very much understanding the
> problem!!! :-)
> 
> Antonio de Angelis
> 
> -----Messaggio originale-----
> Da: address@hidden
> [mailto:address@hidden Per conto
> di address@hidden
> Inviato: mercoledì 9 luglio 2008 21.00
> A: Mailing list for lwIP users
> Oggetto: Re: [lwip-users] How to build a simple TCP [...]
> 
> After making the same mistake, I think you don't need a bridge: could it 
> be that your 2 instances of lwIP are running with the same MAC address? 
> This is not covered by the netif used with the win32 port: you have to 
> change the MAC address for pktif.c at line 131 to prevent using the same 
> MAC address.
> 
> Simon
> 
> Antonio de Angelis wrote:
> > UPDATE: I've tried to put the server process on a different machine on 
> > my home network, and it seems to work. But I want to make it work on the
> > same machine... I attach the wireshark dump of the communication... is 
> > it working in the exact way?
> >
> > Antonio de Angelis
> >
> > address@hidden ha scritto:
> >   
> >> Antonio de Angelis wrote:
> >>     
> >>> [lengthy post...]
> >>>   
> >>>       
> >> First of all, your mail is very difficult to read if you mix such long 
> >> code passages with the actual questions you want to ask. Chances you 
> >> get a response are higher if the problem is expalined shortly and code 
> >> is put at the end of the mail.
> >>
> >> As to your problem: I don't really know why this doesn't work, I 
> >> already did such a setup on my PC. Did you try your client application 
> >> to connect to some other (non lwIP) server? Maybe even outside your 
> >> PC? If you still have problems, you can try to use wireshark to 
> >> monitor the ethernet packets sent on the network. Maybe that helps to 
> >> find the problem.
> >>
> >> Simon
> >>
> >>
> >> _______________________________________________
> >> lwip-users mailing list
> >> address@hidden
> >> http://lists.nongnu.org/mailman/listinfo/lwip-users
> >>
> >>     
> >
> >   
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > lwip-users mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/lwip-users
> 
> 
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
> 
> 
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users

-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser




reply via email to

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