oui

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: MIT Imports: 5 Imported by: 0

README

OUI - Hardware Vendor Prefix For MAC Address

Usage

package main

import (
	"fmt"
	"net"

	"github.com/shadowy-pycoder/mshark/oui"
)

func main() {
    addr := net.HardwareAddr{0x00, 0x00, 0x0c, 0x01, 0x02, 0x03}
	fmt.Println(oui.VendorWithMAC(addr)) // Cisco_01:02:03
}

Update OUI Data

go install github.com/magefile/mage@latest
mage build

Documentation

Overview

Package oui provides functions to generate hardware vendor names from hardware addresses

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Vendor

func Vendor(s string, full bool) string

func VendorFromMAC

func VendorFromMAC(hw net.HardwareAddr) string

VendorFromMAC returns the hardware vendor (full name) of a net.HardwareAddr.

func VendorWithMAC

func VendorWithMAC(hw net.HardwareAddr) string

VendorWithMAC concatenates vendor with MAC address (e.g. Next_01:02:03).

If vendor is not found returns MAC address

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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