Skip to content

dfkdream/ouiparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ouiparser

IEEE OUI data parser

You can download oui.txt here: http://standards-oui.ieee.org/oui/oui.txt

Install

go get github.com/dfkdream/ouiparser

Example Code

package main

import (
    "log"
    "fmt"
    "net"
    "github.com/dfkdream/ouiparser"
)

func main(){
    oui,err:=ouiparser.ParseOUI("oui.txt")
    if err!=nil{
        log.Fatal(err)
    }

    mac,err:=net.ParseMAC("d4:38:9c:00:00:00")
    if err!=nil{
        log.Fatal(err)
    }

    result:=ouiparser.SearchOUI(oui,mac)
    fmt.Println(result.Organization)
}

Output

Sony Mobile Communications Inc

About

IEEE OUI Parser for golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages