lmac

package module
v0.1.2506 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2025 License: MIT Imports: 2 Imported by: 0

README

NAME

	lmac - find organization as defined by http://standards-oui.ieee.org/

DESCRIPTION

	Lookup one or more MAC addresses to organizations.
	Values are matched against ma-l, ma-m and ma-s lists.

SYNOPSIS
	
	import "github.com/gregoryv/lmac"
	
	org := lmac.Lookup("00:aa:bb")


SEE ALSO

	A similar implementation, is found at
	https://github.com/google/gopacket/tree/master/macs
	
AUTHOR

	Gregory Vinčić

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lookup

func Lookup(mac string) string

Lookup registered organization for the given MAC Allowed formats are

00:00:00:00:00:aa
00-00-00-00-00-aa
0000000000aa

The values are case insensitive.

Example
// ma-l           ........
fmt.Println(Lookup("00:03:08:00:00:00"))
fmt.Println(Lookup("00177a000000"))
fmt.Println()
// ma-m           ..........
fmt.Println(Lookup("00:55:da:f0:01:00"))
fmt.Println(Lookup("04:58:5D:89:99:99"))
fmt.Println()
// ma-s           .............
fmt.Println(Lookup("00:1b:c5:04:b1:11"))
fmt.Println()
// unrecognized
fmt.Println(Lookup("jibberish"))
fmt.Println(Lookup("ff:ff:ff:ff:ff"))
Output:
AM Communications, Inc.
ASSA ABLOY AB

Private
JRK VISION

Silicon Controls

Types

This section is empty.

Directories

Path Synopsis
cmd
lmac command
Command lmac looks up MAC addresses against registered organizations.
Command lmac looks up MAC addresses against registered organizations.
GENERATED by update.sh, DO NOT EDIT!
GENERATED by update.sh, DO NOT EDIT!

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL