Re: tcpdump based packet generator

From: kamal kc (kamal_ckk_at_yahoo.com)
Date: 09/30/05

  • Next message: Andrey Smagin: "Re: How connect 2 PC with ath in hostap mode ?"
    Date: Thu, 29 Sep 2005 21:17:48 -0700 (PDT)
    To: det_re <det_re@yahoo.com>
    
    

    --- det_re <det_re@yahoo.com> wrote:
    > has anyone seen or implemented packet generator
    > capable of reading tcpdump trace file and resend the
    > packets back into the wire through bpf in freebsd
    > box?

    if you are talking about capturing packets by
    writing a program then you could use libpcap.a
    that provides an abstraction for the underlying
    bpf.

    man pcap would be a good help.

    sending custom packets can be done using raw sockets
    (SOCK_RAW).

    you can use IP_HDRINCL for including your custom
    ip header

    >
    >
    >
    >
    >
    > __________________________________
    > Yahoo! Mail - PC Magazine Editors' Choice 2005
    > http://mail.yahoo.com
    > _______________________________________________
    > 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"
    >

                    
    __________________________________
    Yahoo! Mail - PC Magazine Editors' Choice 2005
    http://mail.yahoo.com
    _______________________________________________
    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: Andrey Smagin: "Re: How connect 2 PC with ath in hostap mode ?"

    Relevant Pages

    • Re: bge dropping packets issue
      ... listening in this instance is using BPF. ... to understand how much can BPF take before dumping packets due to lack ... bpf is turned on on the receiver. ... packets at a send rate of about 400 kpps. ...
      (freebsd-net)
    • [ANN]: Microolap Packet Sniffer SDK 4.0
      ... The major release 4.0 of Packet Sniffer SDK is out: Ethernet emulation mode for Loopback traffic, Adjustable packets pool, support of x64systems in BPF JIT compiler, packets marking in BPF filter, the queue for packets sending..... ... Ethernet emulation mode for HNLBAdapter object is added. ... All objects, properties, methods, and events available for HNAdapter object now are available for Loopback adapter too. ...
      (borland.public.delphi.thirdpartytools.general)
    • Re: POSIX Threads locks failed
      ... > I'm getting packets from bpf with pcap_next function in one thread and ... about the way we should run it while trying to reproduce the problem ... To unsubscribe, ...
      (freebsd-current)
    • Re: bpf/pcap are weird
      ... BIOCIMMEDIATE mode means "make incoming packets readable immediately; ... might want to try to get as many packets as possible per read on the BPF ... BIOCIMMEDIATE mode would probably still want to block, rather than spin, ... store buffer fills *OR* the timeout expires - then it does need to be ...
      (freebsd-arch)
    • Re: memory mapped packet capturing - bpf replacement ?
      ... > the point at which packets started to be dropped. ... A bit offtopic - what traffic generator you use? ... > still got the same number of copies as vanilla BPF. ... I am copying whole mbuf chain the same way BPF does. ...
      (freebsd-hackers)