Skip to content
/ ouidb Public
forked from cmatsuoka/ouidb

Golang tools to work with MAC addresses and oui. Includes OUI database to resolve to vendor.

License

Notifications You must be signed in to change notification settings

davidbb/ouidb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-ouitools

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

  • wireshark oui database

Contributors

  • Remco Verhoef (Dutchcoders) @remco_verhoef
  • Claudio Matsuoka
  • David Barrera

About

Golang tools to work with MAC addresses and oui. Includes OUI database to resolve to vendor.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%