Skip to content
No description, website, or topics provided.
C Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
src
test
.gitignore
.travis.yml
.travis_build_config.rb
LICENSE
README.md
Rakefile
mrbgem.rake
mruby-network-analyzer.gem

README.md

mruby-network-analyzer Build Status

NetworkAnalyzer class

code base is iftop

install by mrbgems

  • add conf.gem line to build_config.rb
  • install libpcap-dev
MRuby::Build.new do |conf|

    # ... (snip) ...

    conf.gem :github => 'pyama86/mruby-network-analyzer'
end

example

# NetworkAnalyzer.collect(interface, collect_sec, collect_packet)
NetworkAnalyzer.collect("eth0", 3)
#=> [{"src_host"=>"10.0.2.15", "dst_host"=>"10.0.2.2", "src_port"=>":22", "dst_port"=>":58377", "total_sent"=>152, "total_recv"=>80, "sent_history"=>[152], "recv_history"=>[80]}]

License

under the GPL License:

  • see LICENSE file
You can’t perform that action at this time.