Sha256: e9b79205fdf493729b476b8c6e57e1a35c5a2aeed0a4939484ab7890f40d672a
Contents?: true
Size: 389 Bytes
Versions: 7
Compression:
Stored size: 389 Bytes
Contents
require 'pcap' module SippyCup class RTPGenerator DEFAULT_DATALINK = 1 # Corresponds to DLT_EN10MB, Ethernet (10Mb) from pcap/bpf.h def initialize @output = Pcap::Capture.open_dead DEFAULT_DATALINK, 65535 def save!(file) pcap_file = Pcap::Dumper.open @output, file @output.loop(-1) do |packet| pcap_file.dump packet end end end end
Version data entries
7 entries across 7 versions & 1 rubygems