Re: sending MAC packets --- again, and again

From: Charles Swiger (cswiger_at_mac.com)
Date: 05/21/05

  • Next message: Charles Swiger: "Re: sending MAC packets --- again, and again"
    Date: Sat, 21 May 2005 12:36:33 -0400
    To: Daniel Valencia <fetrovsky@yahoo.com>
    
    

    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
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
    

  • Next message: Charles Swiger: "Re: sending MAC packets --- again, and again"

    Relevant Pages

    • RE: 4.9-STABLE heavily dropping packets? libpcap issue?
      ... Subject: 4.9-STABLE heavily dropping packets? ... out that there are sometimes issues with the libpcap. ... This message was sent using IMP, the Internet Messaging Program. ... To unsubscribe, ...
      (freebsd-net)
    • Help wanted on port scanner
      ... I've got a port scanner that I built with my own two little hands. ... It is built on top of libpcap and also libnet. ... libpcap just to listen for SYN+ACK response packets. ... Obviously if sendto() is known to never block when called for a RAW ...
      (freebsd-net)
    • WHQL NDIS 2c_CheckConnections.wsf says that our card fails to receive packets but...
      ... We set a breakpoint and watch our driver call NdisMIndicateReceivePacket() ... we give it an ever increasing count of received packets. ...
      (microsoft.public.development.device.drivers)
    • Re: linux socket filter
      ... In the documentation of "libpcap" I' ve read that the used filter is "BSD", ... I' ve tested that "libpcap" records "received packets" too. ...
      (comp.os.linux.networking)
    • POSIX Threads locks failed
      ... Sorry for my english. ... I use libpcap and libc_r under FreeBSD 5.2.1-p9, ... I'm getting packets from bpf with pcap_next function in one ...
      (freebsd-current)