summaryrefslogtreecommitdiffhomepage
path: root/iana/entid.go
blob: df2ca13a22c941ff0fda26e33dd92df081e826fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package iana

// EntID represents the Enterprise IDs as set by IANA
type EntID int

// See https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers for values
const (
	EntIDCiscoSystems EntID = 9
)

var entIDToStringMap = map[EntID]string{
	EntIDCiscoSystems: "Cisco Systems",
}

// String returns the vendor name for a given Enterprise ID
func (e EntID) String() string {
	if vendor := entIDToStringMap[e]; vendor != "" {
		return vendor
	}
	return "Unknown"
}