26 lines
802 B
Go
26 lines
802 B
Go
package iana
|
|
|
|
// EnterpriseID represents the Enterprise IDs as set by IANA
|
|
type EnterpriseID int
|
|
|
|
// See https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers for values
|
|
const (
|
|
EnterpriseIDCiscoSystems EnterpriseID = 9
|
|
EnterpriseIDCienaCorporation EnterpriseID = 1271
|
|
EnterpriseIDMellanoxTechnologiesLTD EnterpriseID = 33049
|
|
)
|
|
|
|
var enterpriseIDToStringMap = map[EnterpriseID]string{
|
|
EnterpriseIDCiscoSystems: "Cisco Systems",
|
|
EnterpriseIDCienaCorporation: "Ciena Corporation",
|
|
EnterpriseIDMellanoxTechnologiesLTD: "Mellanox Technologies LTD",
|
|
}
|
|
|
|
// String returns the vendor name for a given Enterprise ID
|
|
func (e EnterpriseID) String() string {
|
|
if vendor := enterpriseIDToStringMap[e]; vendor != "" {
|
|
return vendor
|
|
}
|
|
return "Unknown"
|
|
}
|