sippy_cup 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.travis.yml +2 -0
- data/CHANGELOG.md +10 -2
- data/README.markdown +19 -5
- data/lib/sippy_cup/media.rb +4 -2
- data/lib/sippy_cup/runner.rb +43 -36
- data/lib/sippy_cup/scenario.rb +146 -41
- data/lib/sippy_cup/version.rb +1 -1
- data/sippy_cup.gemspec +1 -1
- data/spec/sippy_cup/media_spec.rb +9 -0
- data/spec/sippy_cup/runner_spec.rb +81 -20
- data/spec/sippy_cup/scenario_spec.rb +124 -45
- metadata +29 -30
- data/lib/sippy_cup/rtp_generator.rb +0 -19
@@ -1,19 +0,0 @@
|
|
1
|
-
require 'pcap'
|
2
|
-
|
3
|
-
module SippyCup
|
4
|
-
class RTPGenerator
|
5
|
-
DEFAULT_DATALINK = 1 # Corresponds to DLT_EN10MB, Ethernet (10Mb) from pcap/bpf.h
|
6
|
-
|
7
|
-
def initialize
|
8
|
-
@output = Pcap::Capture.open_dead DEFAULT_DATALINK, 65535
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
def save!(file)
|
13
|
-
pcap_file = Pcap::Dumper.open @output, file
|
14
|
-
@output.loop(-1) do |packet|
|
15
|
-
pcap_file.dump packet
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|