Method: Macker#lookup
- Defined in:
- lib/macker.rb
#lookup(mac, opts = {}) ⇒ Address
Lookup for a vendor with given MAC address.
68 69 70 71 72 73 74 75 |
# File 'lib/macker.rb', line 68 def lookup(mac, opts = {}) lapsed! data = prefix_table[Address.new(mac).prefix] if data.nil? opts[:raising] ? raise(NotFoundOuiVendor, "OUI not found for MAC: #{mac}") : (return nil) end Address.new(mac, data) end |