Skip to content
/ oui Public
forked from karagenc/oui

Go package to work with MAC addresses and OUI. Includes an OUI database.

License

Notifications You must be signed in to change notification settings

thomasf/oui

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OUI

This is a fork of the fork of the fork the fork of go-ouitools package to work with MAC addresses and OUI. This package includes an OUI database.

Example

package main

import (
	"fmt"
	"os"

	"github.com/tomruk/oui"
)

func main() {
	// You may also use NewDB and NewDBFromReader functions.
	db, err := oui.NewDBFromFile("oui.txt")
	if err != nil {
		fmt.Printf("Error: %v\n", err)
		os.Exit(1)
	}
  
	mac := "00:16:e0:3d:f4:4c"
	vendor, err := db.Lookup(mac)
	if err != nil {
		fmt.Printf("Error: %v\n", err)
		os.Exit(1)
	}
	
	fmt.Printf("%s => %s\n", mac, vendor)
}

Testing

go test

References

  • Wireshark OUI database

Contributors

See here

About

Go package to work with MAC addresses and OUI. Includes an OUI database.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%