GithubHelp home page GithubHelp logo

ouidata's Introduction

Ouidata

Ouidata. A lookup tool for the Wireshark OUI database in Elixir.

Heavily inspired by the Tzdata library.

As of version 0.1.0 the current shipped database version is 20190416.

When a new release is out, it will be automatically downloaded at runtime.

The release version in use can be verified with the following function:

iex> Ouidata.ouidata_version
"20190416"

Getting started

To use the Ouidata library with Elixir 1.8, add it to the dependencies in your mix file:

defp deps do
  [  {:ouidata, "~> 0.1.0"},  ]
end

That's it!

Now you're able to search for OUI vendors and comments:

iex> Ouidata.get_vendor("00:00:69:AB:AB:AB")
"ConcordC"
iex> Ouidata.get_comment("00:00:69:AB:AB:AB")
"Concord Communications Inc"

Data directory and releases

The library uses a file directory to store data. By default this directory is priv. In some cases you might want to use a different directory. For instance when using releases this is recommended. If so, create the directory and make sure Elixir can read and write to it. Then use elixir config files like this to tell Ouidata to use that directory:

config :ouidata, :data_dir, "/etc/elixir_ouidata_data"

Add the release_ets directory from priv to that directory containing the 2019-xx-xx.ets file that ships with this library.

For instance with this config: config :ouidata, :data_dir, "/etc/elixir_ouidata_data" an .ets file such as /etc/elixir_ouidata_data/release_ets/2019-04-15.ets should be present.

Automatic data updates

By default Ouidata will poll for OUI database updates every day. In case new data is available, Ouidata will download it and use it.

This feature can be disabled with the following configuration:

config :ouidata, :autoupdate, :disabled

If the autoupdate setting is set to disabled, one has to manually put updated .ets files in the release_ets sub-dir of the "data_dir" (see the "Data directory and releases" section above). When Wireshark releases new versions of the time zone data, this Ouidata library can be used to generate a new .ets file containing the new data.

Documentation

Documentation can be found at http://hexdocs.pm/ouidata/

When new OUI data is released

Wireshark releases new versions of the OUI database frequently.

The new database will automatically be downloaded, parsed, saved and used in place of the old data.

License

The ouidata Elixir library is released under the MIT license. See the LICENSE file.

The OUI database file is released by Wireshark.

ouidata's People

Contributors

shamanime avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.