Project

arp

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Retrieve the content of the ARP cache
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.5
>= 0
 Project Readme

Arp

Retrieve the content of the ARP cache

Installation

Add this line to your application's Gemfile:

gem 'arp'

And then execute:

$ bundle

Or install it yourself as:

$ gem install arp

Usage

  cache = Arp::Cache.new
  cache.each do |entry|
    puts entry.ip             # => "192.168.124.2"
    puts entry.hw_type        # => "0x1"
    puts entry.flags          # => "0x2" 
    puts entry.hw_address     # => "00:50:56:e9:27:c7" 
    puts entry.mask           # => "*"
    puts entry.device         # => "eth0" 
  end

Limitation

Currently works only on Linux. Tested on Ubuntu 12.04.

Contributing

  1. Fork it ( http://github.com//arp/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request