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.
@@ -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