package
module
Version:
v0.0.0-...-03199db
Opens a new window with list of versions in this module.
Published: Jan 16, 2017
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Golang tools to work with Mac addresses and oui. Includes oui database to resolve to vendor.
Sample
package main
import (
"fmt"
"os"
"github.com/davidbb/ouidb"
)
var (
db *ouidb.OuiDB
)
func main() {
db = ouidb.New("oui.txt")
if db == nil {
fmt.Println("database not initialized")
os.Exit(1)
}
mac := "00:16:e0:3d:f4:4c"
v, err := db.Lookup(mac)
if err != nil {
fmt.Println(err.Error())
os.Exit(1)
}
fmt.Printf("%s => %s\n", mac, v)
}
Testing
go test
References
Contributors
- Remco Verhoef (Dutchcoders) @remco_verhoef
- Claudio Matsuoka
- David Barrera
Documentation
¶
Package go-oui provides functions to work with MAC and OUI's
New returns a new OUI database loaded from the specified file.
Lookup obtains the vendor organization name from the MAC address s.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.