Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Trying to make the pcap gem work with more Ruby VMs
C Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
doc
examples
ext
lib
COPYING
ChangeLog
MANIFEST
README.rdoc
Rakefile
VERSION

README.rdoc

Introduction

ruby-pcap is a ruby extension to LBL libpcap (Packet Capture library). This library also includes classes to access TCP/IP header.

Installation

Requirements

This version assumes an architecture with at least a 32bit pointer type! Trying to use this gem on architectures with a smaller pointer size will result in undefined behaviour!

Compile

If you have rubygems/rake/jeweler available, use the easy way.

Easy Way

Use Jeweler and Rubygems to build a gem:

rake gemspec                     # creates pcap.gemspec
gem build pcap.gemspec           # creates pcap-<version>.gem
gem install pcap-<version>.gem   # may need superuser privileges

Manual build

If ruby supports dynamic link of extension module on your OS, following commands will install ruby-pcap:

ruby extconf.rb [options]
make
make install

You can specify options when you run 'ruby extconf.rb':

–with-pcap-dir=PREFIX'

Directory where libpcap is installed. Default is /usr/local.

If dynamic link isn't available, you can link ruby-pcap statically with ruby. Extract ruby-pcap under the directory 'ext' in ruby source tree, then build ruby.

Usage

See the documentation under the directory 'doc'. Directory 'examples' contains some simple scripts.

Author

Masaki Fukushima <fukusima@goto.info.waseda.ac.jp>

ruby-pcap is copyrighted free software by Masaki Fukushima.

You can redistribute it and/or modify it under the terms of the GPL (GNU GENERAL PUBLIC LICENSE). See COPYING file about GPL.

THIS SOFTWARE IS PROVIDED “AS IS” AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. See the GPL for more details.

Something went wrong with that request. Please try again.