pcaprub 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +33 -6
- data/Rakefile +7 -6
- data/USAGE.rdoc +57 -3
- data/VERSION +1 -1
- data/examples/dead_cap.rb +12 -0
- data/examples/file_cap.rb +31 -0
- data/examples/simple_cap.rb +31 -0
- data/examples/telnet-raw.pcap +0 -0
- data/ext/pcaprub/extconf.rb +22 -1
- data/ext/pcaprub/pcaprub.c +668 -299
- data/lib/pcaprub.rb +9 -1
- data/lib/pcaprub/common.rb +17 -0
- data/lib/pcaprub/ext.rb +1 -0
- data/lib/pcaprub/version.rb +18 -0
- data/pcaprub.gemspec +9 -2
- metadata +9 -2
data/lib/pcaprub.rb
CHANGED
@@ -1 +1,9 @@
|
|
1
|
-
|
1
|
+
module PCAPRUB
|
2
|
+
$:.unshift(File.dirname(__FILE__))
|
3
|
+
require 'pcaprub/common'
|
4
|
+
require 'pcaprub/version'
|
5
|
+
require 'pcaprub/ext'
|
6
|
+
end
|
7
|
+
|
8
|
+
#Force Include to allow backwards compatibility to ::PCAP.new
|
9
|
+
include PCAPRUB
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
module PCAPRUB
|
3
|
+
# The base exception for JSON errors.
|
4
|
+
class PCAPRUBError < StandardError; end
|
5
|
+
|
6
|
+
# This exception is raised, if a Device Binding error occurs.
|
7
|
+
class BindingError < PCAPRUBError; end
|
8
|
+
|
9
|
+
# This exception is raised, if the BPF Filter raises a fault
|
10
|
+
class BPFError < PCAPRUBError; end
|
11
|
+
|
12
|
+
# This exception is raised, if the libpcap Dumper raises a fault
|
13
|
+
# deep.
|
14
|
+
class DumperError < PCAPRUBError; end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
data/lib/pcaprub/ext.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "pcaprub.so"
|
data/pcaprub.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "pcaprub"
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.11.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["shadowbq"]
|
12
|
-
s.date = "2011-10-
|
12
|
+
s.date = "2011-10-21"
|
13
13
|
s.description = "libpcap bindings for ruby compat with JRUBY Ruby1.8 Ruby1.9"
|
14
14
|
s.email = "shadowbq@gmail.com"
|
15
15
|
s.extensions = ["ext/pcaprub/extconf.rb"]
|
@@ -28,9 +28,16 @@ Gem::Specification.new do |s|
|
|
28
28
|
"Rakefile",
|
29
29
|
"USAGE.rdoc",
|
30
30
|
"VERSION",
|
31
|
+
"examples/dead_cap.rb",
|
32
|
+
"examples/file_cap.rb",
|
33
|
+
"examples/simple_cap.rb",
|
34
|
+
"examples/telnet-raw.pcap",
|
31
35
|
"ext/pcaprub/extconf.rb",
|
32
36
|
"ext/pcaprub/pcaprub.c",
|
33
37
|
"lib/pcaprub.rb",
|
38
|
+
"lib/pcaprub/common.rb",
|
39
|
+
"lib/pcaprub/ext.rb",
|
40
|
+
"lib/pcaprub/version.rb",
|
34
41
|
"pcaprub.gemspec",
|
35
42
|
"test/helper.rb",
|
36
43
|
"test/test_pcaprub.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pcaprub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-21 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: libpcap bindings for ruby compat with JRUBY Ruby1.8 Ruby1.9
|
15
15
|
email: shadowbq@gmail.com
|
@@ -30,9 +30,16 @@ files:
|
|
30
30
|
- Rakefile
|
31
31
|
- USAGE.rdoc
|
32
32
|
- VERSION
|
33
|
+
- examples/dead_cap.rb
|
34
|
+
- examples/file_cap.rb
|
35
|
+
- examples/simple_cap.rb
|
36
|
+
- examples/telnet-raw.pcap
|
33
37
|
- ext/pcaprub/extconf.rb
|
34
38
|
- ext/pcaprub/pcaprub.c
|
35
39
|
- lib/pcaprub.rb
|
40
|
+
- lib/pcaprub/common.rb
|
41
|
+
- lib/pcaprub/ext.rb
|
42
|
+
- lib/pcaprub/version.rb
|
36
43
|
- pcaprub.gemspec
|
37
44
|
- test/helper.rb
|
38
45
|
- test/test_pcaprub.rb
|