From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by bilbo.ozlabs.org (Postfix) with ESMTP id F1813B7B69 for ; Thu, 16 Jul 2009 14:07:55 +1000 (EST) Received: by fg-out-1718.google.com with SMTP id l27so1368424fgb.8 for ; Wed, 15 Jul 2009 21:07:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <579B119545DAEF4689C8FBEEFEC5793F01D4FF0A202C@ATLMBX.verint.corp.verintsystems.com> References: <4312c3250907150136y4c98c78ak1b4fe50534248442@mail.gmail.com> <579B119545DAEF4689C8FBEEFEC5793F01D4FF0A202C@ATLMBX.verint.corp.verintsystems.com> Date: Thu, 16 Jul 2009 09:37:51 +0530 Message-ID: <4312c3250907152107o1362fd0aicd95c521f5b42608@mail.gmail.com> Subject: Re: ethernet driver - problem capturing own packet in promiscous mode From: sudheer a To: "Cote, Sylvain" Content-Type: multipart/alternative; boundary=001485f7d7febced0e046ecad0ea Cc: "linuxppc-dev@lists.ozlabs.org" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --001485f7d7febced0e046ecad0ea Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Wed, Jul 15, 2009 at 5:52 PM, Cote, Sylvain wrote: > > Hi all > > > > > In ethernet driver i need to enable promiscous mode and have to capture > the packet that is sent by the same ethernet. > > > > > The board is connected to a packet generator and could send/receive > packets whenever i need . > > > > > In the board ethernet driver , I made sure that am sending only > broadcast packets and promisc mode is enabled but the packets are not > captured. If i am sending a packet to the board from packetgenerator it is > receiving. > > > > > Could any one please suggest me any clues. > > > > > Having the promisc enabled: > > > Packet sent by packetgenerator is received by board. > > > Packet sent by board is received by packetgenerator, The same packet > should be captured by board as promiscuous is enabled. but not happening. > > > > > > The Ethernet interface that sent the packet will never receive the packet > it sent even if you are in promiscuous mode. To be able to do that you > should put your interface in loopback mode. > > In promiscuous mode, you will be able to receive any packets sent by other > interfaces (broadcast, multicast and also unicast that is not directed to > you interface MAC address). But not > > from your interface. > Thanks for your inputs Sylvain. I tried with loopback, it is working. But during the time the hardware is in lopback mode, it may miss some rx packets coming from outside or packet generator unfortunately and i dont want it to happen. Please let me know your views and suggestions. Thanks Sudheer --001485f7d7febced0e046ecad0ea Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Wed, Jul 15, 2009 at 5:52 PM, Cote, Sylvain <= span dir=3D"ltr"><Sylvain.Cot= e@verint.com> wrote:

> Hi all

<= /div>

> In ethernet driver =A0i ne= ed to enable promiscous mode and have to capture the packet that is sent by= the same ethernet.

> The board is connected to = a packet generator and could send/receive packets =A0whenever i need .

<= /div>

> In the board ethernet driv= er , I made sure that am sending only broadcast packets and promisc mode is= enabled but the packets are not captured. If i am sending a packet to the= =A0board from=A0packetgenerator it is receiving.

> Could any one please sugge= st me any clues.

> Having the promisc enabled= :

> Packet sent by packetgener= ator is received by board.

> Packet sent by board is re= ceived by packetgenerator, The same packet should be captured by board as p= romiscuous is enabled. but not happening.

=A0

=A0

The Ethernet interface that sent the packet w= ill never receive the packet it sent even if you are in promiscuous mode.= =A0 To be able to do that you should put your interface in loopback mode.= =A0

In promiscuous mode, you will be able to rece= ive any packets sent by other interfaces (broadcast, multicast and also uni= cast that is not directed to you interface MAC address). =A0But not<= /font>

from your interface.<= /p>

Thanks for your inputs Sylvain.
I=A0tried with loopback, it is working.
But=A0during=A0the time=A0the hardware is in lopback mode, it may miss= some rx packets coming from outside or packet generator unfortunately and = i dont want it to happen.
Please=A0let me know=A0your=A0views and suggestions.
=A0
Thanks
Sudheer
=A0
=A0
=A0
=A0

=A0
--001485f7d7febced0e046ecad0ea--