El miércoles, 19 de octubre de 2016, 12:46:45 (UTC+2), Vadim Kochan 
escribió:
>
> On Wed, Oct 19, 2016 at 1:38 PM,  <emacsu...@gmail.com <javascript:>> 
> wrote: 
> > Hello. 
> > 
> > I'm having a problem when trying to send packets with trafgen to the 
> loopback interface. 
> > 
> > Packets sent this way do not reach their destination. 
> > 
> > However, if packets are sent from an external machine, then I have no 
> problem at all to receive these packets at the destination application. 
> > 
> > I use "-o lo" option on the command line when executing trafgen. 
> > 
> > I suspect the problem is that I'm building an incorrect packet, and the 
> kernel is discarding it. 
> > 
> > The ethernet header on my cfg file looks like the following: 
> > 
> > -------------------------------------- 
> > #include <stddef.h> 
> > 
> > { 
> >   fill(0x00, ETH_ALEN), 
> >   fill(0x00, ETH_ALEN), 
> >   c16(ETH_P_LOOP), 
> >   c32(0x00), 
> > 
> > ...... 
> > 
> > (Both source and destination IP addresses are set to 127.0.0.1) 
> > -------------------------------------- 
> > 
> > I have tried other combinations, like removing the ethernet header 
> completely, for instance. 
> > 
> > None of them worked. 
> > 
> > How does the ethernet header have to to look like, when you want trafgen 
> to generate a valid packet to be sent thru the loopback interface? 
> > 
> > Thanks a lot. 
> > -Bob 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "netsniff-ng" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to netsniff-ng...@googlegroups.com <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>
> Hi Bob, 
>
> Does it work if to increase packet length to 64 bytes length ? 
>
> Sorry, I have no time to check it right now, will do it later if the 
> above's approach did not help. 
>
> Regards, 
> Vadim Kochan 
>


Hi Vadim.

Thanks for the prompt response.

So far, I have been using the ETH_P_LOOP value (96), to indicate that the 
packet corresponds to a loopback packet.
Given that that field is used for both type and length, if I'm 
understanding you correctly, you want me to change it to a value indicating 
the length of my entire packet, and not the value of ETH_P_LOOP.
I suppose you said 64 as an example, and the value there should in fact 
correspond to my actual packet length.

I have followed this approach, but the packet does not reach my 
application, still.

In fact, on second thoughts, I cannot see the point on using ETH_P_LOOP 
value at all in the ethernet header, since its value is 96, which means 
that we have to interpret that value as a length, but the packet length can 
be anything.

Not sure if I'm missing something here ....

Any idea?

Thanks.
-Bob



 

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to