Documentation ¶
Index ¶
Constants ¶
const ( RemoteIeeeMACLarge string = "http://standards-oui.ieee.org/oui/oui.csv" RemoteIeeeMACMedium string = "http://standards-oui.ieee.org/oui28/mam.csv" RemoteIeeeMACSmall string = "http://standards-oui.ieee.org/oui36/oui36.csv" )
https://regauth.standards.ieee.org/standards-ra-web/pub/view.html#registries
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MacPack ¶
type MacPack map[string]Organization
MacPack is used to store relations between the vendor part of a physical hardware address and the organization behind it.
func New ¶
New returns a new MacPack which can be modified with options. If an error occurs, it will be returned.
func (MacPack) Get ¶
func (m MacPack) Get(addr string) *Organization
Get returns the organization that belongs to the given address. If there is no entry for the address nil will be returned. Upper and lower case are accepted as well as the following notations: - FF:FF:FF:FF:FF:FF or ffffffffffff
type Option ¶
An Option configures a MacPack at creation time.
func WithLocalSource ¶
WithLocalSource adds entries from a local location to the macpack register. e.g. path: /opt/list.csv The csv source should be formatted represent the following layout: - Registry,Assignment,Organization Name,Organization Address - MA-L, MA-S,AAAAAAAAA, orga1, A street Moscow RU 1234
func WithReaderSource ¶
WithReaderSource adds entries from a reader to the macpack register. The underlying csv source should be formatted and represent the following layout: - Registry,Assignment,Organization Name,Organization Address - MA-L, MA-S,AAAAAAAAA, orga1, A street Moscow RU 1234
func WithRemoteSource ¶
WithRemoteSource adds entries from a remote location to the macpack register. e.g. path: http://example.com/list.csv The csv source should be formatted represent the following layout: - Registry,Assignment,Organization Name,Organization Address - MA-L, MA-S,AAAAAAAAA, orga1, A street Moscow RU 1234
type Organization ¶
Organization contains name and address of organization