CodeGnome/oui_lookup

View on GitHub
README.rdoc

Summary

Maintainability
Test Coverage
= OUI_Lookup

== Code Status

{<img src="https://travis-ci.org/CodeGnome/oui_lookup.png" alt="Travis
CI Build Status" />}[https://travis-ci.org/CodeGnome/oui_lookup]
{<img src="https://codeclimate.com/github/CodeGnome/oui_lookup.png"
alt="CodeClimate Status"
/>}[https://codeclimate.com/github/CodeGnome/oui_lookup]

== Copyright and Licensing

=== Copyright Notice

    Copyright 2011, 2013 Todd A. Jacobs
    All rights reserved.

=== Software License

http://www.gnu.org/graphics/gplv3-88x31.png

The software is licensed under the
GPLv3[http://www.gnu.org/copyleft/gpl.html].
The LICENSE is also included in the source tree.

=== README License

http://i.creativecommons.org/l/by-nc-sa/3.0/us/88x31.png

{Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States
License}[http://creativecommons.org/licenses/by-nc-sa/3.0/us/]

== Purpose

The IEEE hands out Organizationally Unique Identifiers to companies for
use in such things as manufacturing NIC cards. The first three octets of
a MAC address should be the manufacturer's prefix, so this gem may be
useful in identifyng NIC cards or constructing valid MAC addresses.

== Installation and Usage

The install instructons assume RVM with Ruby 1.9.2, but the code is also
tested with Ruby 2.0.0. The dependencies aren't heavy, and it would
probably take less time to backport the tests and syntax to
1.8.7 than it did to write this sentence, but life is like that
sometimes. Don't file a bug about it; just make sure you are using the
correct Ruby within RVM.

=== Installing the OUI_Lookup Gem

    gem install oui_lookup

=== Running the CLI

    oui_lookup <mac_address_or_prefix>

=== Using the Library

    require 'oui_lookup'

== Sample Output

No screenshots here, just samples of what you can expect from running
this thing.

[NOTE]
    The input format is pretty flexible. It will take both a three-octet
    prefix, as well as a full MAC address with six octets. It's also
    pretty agnostic about separators (or the lack thereof).

=== Looking up a valid prefix

    $ oui_lookup 000000
    Searching...

    00-00-00   (hex)        XEROX CORPORATION
    000000     (base 16)        XEROX CORPORATION
                    M/S 105-50C
                    800 PHILLIPS ROAD
                    WEBSTER NY 14580
                    UNITED STATES

=== Looking up a MAC address with an unregistered prefix

    $ oui_lookup FF:FF:FF:FF:FF:FF
    Searching...

    OUI not found: FF-FF-FF

== Further Reading

1. {Ruby Version Manager (RVM)}[http://beginrescueend.com/]
2. RubyGems[http://rubygems.org/]
3. {IEEE OUIs}[http://standards.ieee.org/develop/regauth/oui/index.html]