This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Usage: tshark -X lua_script:statsd_dissector.lua -r capture.pcap | |
-- Usage: tshark -X lua_script:statsd_dissector.lua -T fields -e statsd.metric_name -e statsd.value -e statsd.metric_type -r capture.pcap | |
local statsd = Proto("statsd","Statsd Protocol") | |
local pf_metric_name = ProtoField.new("Metric Name", "statsd.metric_name", ftypes.STRING) | |
local pf_value = ProtoField.new("Value", "statsd.value", ftypes.STRING) | |
local pf_metric_type = ProtoField.new("Metric Type", "statsd.metric_type", ftypes.STRING) | |
statsd.fields = { pf_metric_name, pf_value, pf_metric_type } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Strophe.addConnectionPlugin("xdomainrequest", { | |
init: function () { | |
if (window.XDomainRequest) { | |
Strophe.debug("using XdomainRequest for IE"); | |
// override the send method to fire readystate 2 | |
if (typeof XDomainRequest.prototype.oldsend == 'undefined') { | |
XDomainRequest.prototype.oldsend = XDomainRequest.prototype.send; | |
XDomainRequest.prototype.send = function() { | |
XDomainRequest.prototype.oldsend.apply(this, arguments); |