diff options
Diffstat (limited to 'iana')
-rw-r--r-- | iana/entid.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/iana/entid.go b/iana/entid.go new file mode 100644 index 0000000..df2ca13 --- /dev/null +++ b/iana/entid.go @@ -0,0 +1,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" +} |