pcaprub 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/ext/pcaprub/extconf.rb +3 -3
- data/ext/pcaprub/pcaprub.c +4 -4
- data/pcaprub.gemspec +28 -36
- metadata +26 -37
- data/.gitignore +0 -23
data/Rakefile
CHANGED
@@ -25,7 +25,7 @@ begin
|
|
25
25
|
jeweler_tasks = Jeweler::Tasks.new do |gem|
|
26
26
|
gem.name = "pcaprub"
|
27
27
|
gem.summary = "libpcap bindings for ruby"
|
28
|
-
gem.description = "libpcap bindings for ruby"
|
28
|
+
gem.description = "libpcap bindings for ruby compat with JRUBY Ruby1.8 Ruby1.9"
|
29
29
|
gem.email = "shadowbq@gmail.com"
|
30
30
|
gem.homepage = "http://github.com/shadowbq/pcaprub"
|
31
31
|
gem.authors = ["shadowbq"]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.10.0
|
data/ext/pcaprub/extconf.rb
CHANGED
@@ -2,7 +2,7 @@ require 'mkmf'
|
|
2
2
|
extension_name = 'pcaprub'
|
3
3
|
|
4
4
|
if /i386-mswin32/ =~ RUBY_PLATFORM
|
5
|
-
pcap_dir = with_config("pcap-dir", "C
|
5
|
+
pcap_dir = with_config("pcap-dir", "C:\\WpdPack")
|
6
6
|
pcap_includedir = with_config("pcap-includedir", pcap_dir + "\\include")
|
7
7
|
pcap_libdir = with_config("pcap-libdir", pcap_dir + "\\lib")
|
8
8
|
|
@@ -15,8 +15,8 @@ else
|
|
15
15
|
have_library("pcap", "pcap_setnonblock")
|
16
16
|
end
|
17
17
|
|
18
|
-
if ( RUBY_VERSION =~ /^1\.
|
19
|
-
$CFLAGS += " -
|
18
|
+
if ( RUBY_VERSION =~ /^1\.8/ && !defined?(JRUBY_VERSION) )
|
19
|
+
$CFLAGS += " -DMAKE_TRAP"
|
20
20
|
end
|
21
21
|
|
22
22
|
|
data/ext/pcaprub/pcaprub.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#include "ruby.h"
|
2
2
|
|
3
|
-
#
|
3
|
+
#ifdef MAKE_TRAP
|
4
4
|
#include "rubysig.h"
|
5
5
|
#endif
|
6
6
|
|
@@ -100,7 +100,7 @@ rbpcap_s_lookupnet(VALUE self, VALUE dev)
|
|
100
100
|
VALUE list;
|
101
101
|
|
102
102
|
Check_Type(dev, T_STRING);
|
103
|
-
if (pcap_lookupnet(
|
103
|
+
if (pcap_lookupnet(StringValuePtr(dev), &net, &mask, eb) == -1) {
|
104
104
|
rb_raise(rb_eRuntimeError, "%s", eb);
|
105
105
|
}
|
106
106
|
|
@@ -472,11 +472,11 @@ rbpcap_next(VALUE self)
|
|
472
472
|
if(! rbpcap_ready(rbp)) return self;
|
473
473
|
pcap_setnonblock(rbp->pd, 1, eb);
|
474
474
|
|
475
|
-
#
|
475
|
+
#ifdef MAKE_TRAP
|
476
476
|
TRAP_BEG;
|
477
477
|
#endif
|
478
478
|
ret = pcap_dispatch(rbp->pd, 1, (pcap_handler) rbpcap_handler, (u_char *)&job);
|
479
|
-
#
|
479
|
+
#ifdef MAKE_TRAP
|
480
480
|
TRAP_END;
|
481
481
|
#endif
|
482
482
|
|
data/pcaprub.gemspec
CHANGED
@@ -1,59 +1,51 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.
|
7
|
+
s.name = "pcaprub"
|
8
|
+
s.version = "0.10.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 =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
12
|
+
s.date = "2011-10-17"
|
13
|
+
s.description = "libpcap bindings for ruby compat with JRUBY Ruby1.8 Ruby1.9"
|
14
|
+
s.email = "shadowbq@gmail.com"
|
15
15
|
s.extensions = ["ext/pcaprub/extconf.rb"]
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"FAQ.rdoc",
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
"LICENSE",
|
19
|
+
"README.rdoc",
|
20
|
+
"USAGE.rdoc",
|
21
|
+
"ext/pcaprub/pcaprub.c"
|
22
22
|
]
|
23
23
|
s.files = [
|
24
24
|
".document",
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
"pcaprub.gemspec",
|
36
|
-
"test/helper.rb",
|
37
|
-
"test/test_pcaprub.rb",
|
38
|
-
"test/test_pcaprub_unit.rb"
|
39
|
-
]
|
40
|
-
s.homepage = %q{http://github.com/shadowbq/pcaprub}
|
41
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
42
|
-
s.require_paths = ["lib"]
|
43
|
-
s.rubyforge_project = %q{pcaprub}
|
44
|
-
s.rubygems_version = %q{1.3.5}
|
45
|
-
s.summary = %q{libpcap bindings for ruby}
|
46
|
-
s.test_files = [
|
25
|
+
"FAQ.rdoc",
|
26
|
+
"LICENSE",
|
27
|
+
"README.rdoc",
|
28
|
+
"Rakefile",
|
29
|
+
"USAGE.rdoc",
|
30
|
+
"VERSION",
|
31
|
+
"ext/pcaprub/extconf.rb",
|
32
|
+
"ext/pcaprub/pcaprub.c",
|
33
|
+
"lib/pcaprub.rb",
|
34
|
+
"pcaprub.gemspec",
|
47
35
|
"test/helper.rb",
|
48
|
-
|
49
|
-
|
36
|
+
"test/test_pcaprub.rb",
|
37
|
+
"test/test_pcaprub_unit.rb"
|
50
38
|
]
|
39
|
+
s.homepage = "http://github.com/shadowbq/pcaprub"
|
40
|
+
s.require_paths = ["lib"]
|
41
|
+
s.rubyforge_project = "pcaprub"
|
42
|
+
s.rubygems_version = "1.8.11"
|
43
|
+
s.summary = "libpcap bindings for ruby"
|
51
44
|
|
52
45
|
if s.respond_to? :specification_version then
|
53
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
54
46
|
s.specification_version = 3
|
55
47
|
|
56
|
-
if Gem::Version.new(Gem::
|
48
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
57
49
|
else
|
58
50
|
end
|
59
51
|
else
|
metadata
CHANGED
@@ -1,33 +1,29 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: pcaprub
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.10.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
|
-
authors:
|
7
|
+
authors:
|
7
8
|
- shadowbq
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
|
12
|
-
date: 2010-02-10 00:00:00 -05:00
|
13
|
-
default_executable:
|
12
|
+
date: 2011-10-17 00:00:00.000000000Z
|
14
13
|
dependencies: []
|
15
|
-
|
16
|
-
description: libpcap bindings for ruby
|
14
|
+
description: libpcap bindings for ruby compat with JRUBY Ruby1.8 Ruby1.9
|
17
15
|
email: shadowbq@gmail.com
|
18
16
|
executables: []
|
19
|
-
|
20
|
-
extensions:
|
17
|
+
extensions:
|
21
18
|
- ext/pcaprub/extconf.rb
|
22
|
-
extra_rdoc_files:
|
19
|
+
extra_rdoc_files:
|
23
20
|
- FAQ.rdoc
|
24
21
|
- LICENSE
|
25
22
|
- README.rdoc
|
26
23
|
- USAGE.rdoc
|
27
24
|
- ext/pcaprub/pcaprub.c
|
28
|
-
files:
|
25
|
+
files:
|
29
26
|
- .document
|
30
|
-
- .gitignore
|
31
27
|
- FAQ.rdoc
|
32
28
|
- LICENSE
|
33
29
|
- README.rdoc
|
@@ -41,35 +37,28 @@ files:
|
|
41
37
|
- test/helper.rb
|
42
38
|
- test/test_pcaprub.rb
|
43
39
|
- test/test_pcaprub_unit.rb
|
44
|
-
has_rdoc: true
|
45
40
|
homepage: http://github.com/shadowbq/pcaprub
|
46
41
|
licenses: []
|
47
|
-
|
48
42
|
post_install_message:
|
49
|
-
rdoc_options:
|
50
|
-
|
51
|
-
require_paths:
|
43
|
+
rdoc_options: []
|
44
|
+
require_paths:
|
52
45
|
- lib
|
53
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
46
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
47
|
+
none: false
|
48
|
+
requirements:
|
49
|
+
- - ! '>='
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ! '>='
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0'
|
65
58
|
requirements: []
|
66
|
-
|
67
59
|
rubyforge_project: pcaprub
|
68
|
-
rubygems_version: 1.
|
60
|
+
rubygems_version: 1.8.11
|
69
61
|
signing_key:
|
70
62
|
specification_version: 3
|
71
63
|
summary: libpcap bindings for ruby
|
72
|
-
test_files:
|
73
|
-
- test/helper.rb
|
74
|
-
- test/test_pcaprub.rb
|
75
|
-
- test/test_pcaprub_unit.rb
|
64
|
+
test_files: []
|
data/.gitignore
DELETED