Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 May 2005 12:36:33 -0400
From:      Charles Swiger <cswiger@mac.com>
To:        Daniel Valencia <fetrovsky@yahoo.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: sending MAC packets --- again, and again
Message-ID:  <fe55838ea51f8b9cb8c79dc1b2d0b7dc@mac.com>
In-Reply-To: <20050521031625.77340.qmail@web53907.mail.yahoo.com>
References:  <20050521031625.77340.qmail@web53907.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On May 20, 2005, at 11:16 PM, Daniel Valencia wrote:
> I know this may sound funny, but I'm still wrestling
> with libpcap because I send packets and I cannot read
> them.  I tried also some example code of a toy sniffer
> from a tutorial to pcap, and it behaves just like my
> code.  As my code is pretty compact, I'm posting it
> here.

What you need to do is run "tcpdump -envvvX" and take a careful look at 
the packets being sent.

In particular, watch out for packets containing something like this: 
"[bad tcp cksum 9f96 (->e867)!]", this generally means you have 
misconstructed the packet-- watch out for required padding to align the 
start of each protocol block.

However, you really need to run this command from another machine in 
order to see what is really going out on the wire, running tcpdump 
locally means it intercepts the traffic while it is still being 
processed by the stack, and TXCSUM hardware or the like might change 
things...

-- 
-Chuck



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fe55838ea51f8b9cb8c79dc1b2d0b7dc>