Holger Hans Peter Freyther | bea9a12 | 2012-05-18 10:46:03 +0200 | [diff] [blame] | 1 | print("Ni hao") |
| 2 | |
| 3 | |
| 4 | do |
| 5 | local tap = Listener.new("ip", "rtp") |
| 6 | local rtp_ssrc = Field.new("rtp.ssrc") |
| 7 | local frame_time = Field.new("frame.time_relative") |
| 8 | local rtp = Field.new("rtp") |
| 9 | |
| 10 | function tap.packet(pinfo, tvb, ip) |
| 11 | local ip_src, ip_dst = tostring(ip.ip_src), tostring(ip.ip_dst) |
| 12 | local rtp_data = rtp() |
| 13 | local filename = "rtp_ssrc" .. rtp_ssrc() "_src_" .. ip_src .. "_to_" .. ip_dst .. ".state" |
| 14 | local f = io.open(filename, "a") |
| 15 | |
| 16 | f:write(tostring(frame_time()) .. " ") |
| 17 | f:write(tostring(rtp_data.value)) |
| 18 | f:write("\n") |
| 19 | f:close() |
| 20 | end |
| 21 | |
| 22 | function tap.draw() |
| 23 | print("DRAW") |
| 24 | end |
| 25 | function tap.reset() |
| 26 | print("RESET") |
| 27 | end |
| 28 | end |