Process PCAP Data from Socket

Discussion in 'Ruby' started by Bryan Richardson, Feb 16, 2009.

  1. Hello all,

    I'm wondering if it's possible at all to process PCAP data using Ruby's
    pcap library when the data's being piped through a socket. The pcap
    library has capture methods for live capture from a device or offline
    via a file. I'm piping PCAP data from a remote machine to my machine
    using netcat, and I want to be able to process it in real-time on my
    machine.

    Does anyone know if I can pass an IO handle to the offline method in the
    Ruby pcap library?

    --
    Thanks!
    Bryan
    --
    Posted via http://www.ruby-forum.com/.
     
    Bryan Richardson, Feb 16, 2009
    #1
    1. Advertising

  2. On 16 Feb 2009, at 16:16, Bryan Richardson wrote:
    > I'm wondering if it's possible at all to process PCAP data using
    > Ruby's
    > pcap library when the data's being piped through a socket. The pcap
    > library has capture methods for live capture from a device or offline
    > via a file. I'm piping PCAP data from a remote machine to my machine
    > using netcat, and I want to be able to process it in real-time on my
    > machine.
    >
    > Does anyone know if I can pass an IO handle to the offline method in
    > the
    > Ruby pcap library?


    I can't comment on your particular case, but assuming your box is much
    faster than the network link reading data in realtime and doing
    something with it is certainly possible. If you follow the link in my
    sig and grab a copy of the Camping presentation there are some
    examples of using Ruby PCAP that may help.


    Ellie

    Eleanor McHugh
    Games With Brains
    http://slides.games-with-brains.net
    ----
    raise ArgumentError unless @reality.responds_to? :reason
     
    Eleanor McHugh, Feb 17, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony Gahlinger

    What is the data-type of pcap?

    Tony Gahlinger, Jan 20, 2004, in forum: C Programming
    Replies:
    5
    Views:
    922
  2. Laszlo Nagy
    Replies:
    1
    Views:
    4,917
    Mark Wooding
    Jan 27, 2009
  3. Jean-Paul Calderone
    Replies:
    0
    Views:
    991
    Jean-Paul Calderone
    Jan 27, 2009
  4. Laszlo Nagy
    Replies:
    0
    Views:
    565
    Laszlo Nagy
    Feb 1, 2009
  5. Steve Holden
    Replies:
    0
    Views:
    683
    Steve Holden
    Feb 1, 2009
Loading...

Share This Page