summaryrefslogtreecommitdiffhomepage
path: root/iana/hwtypes.go
blob: e6fb38b23d5538179b8fd8f4d18fce766874ea61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package iana

// HWType is a hardware type as per RFC 2132 and defined by the IANA.
type HWType uint16

// See IANA for values.
const (
	_ HWType = iota // skip 0
	HWTypeEthernet
	HWTypeExperimentalEthernet
	HWTypeAmateurRadioAX25
	HWTypeProteonTokenRing
	HWTypeChaos
	HWTypeIEEE802
	HWTypeARCNET
	HWTypeHyperchannel
	HWTypeLanstar
	HWTypeAutonet
	HWTypeLocalTalk
	HWTypeLocalNet
	HWTypeUltraLink
	HWTypeSMDS
	HWTypeFrameRelay
	HWTypeATM
	HWTypeHDLC
	HWTypeFibreChannel
	HWTypeATM2
	HWTypeSerialLine
	HWTypeATM3
	HWTypeMILSTD188220
	HWTypeMetricom
	HWTypeIEEE1394
	HWTypeMAPOS
	HWTypeTwinaxial
	HWTypeEUI64
	HWTypeHIPARP
	HWTypeISO7816
	HWTypeARPSec
	HWTypeIPsec
	HWTypeInfiniband
	HWTypeCAI
	HWTypeWiegandInterface
	HWTypePureIP
)

var hwTypeToString = map[HWType]string{
	HWTypeEthernet:             "Ethernet",
	HWTypeExperimentalEthernet: "Experimental Ethernet",
	HWTypeAmateurRadioAX25:     "Amateur Radio AX.25",
	HWTypeProteonTokenRing:     "Proteon ProNET Token Ring",
	HWTypeChaos:                "Chaos",
	HWTypeIEEE802:              "IEEE 802",
	HWTypeARCNET:               "ARCNET",
	HWTypeHyperchannel:         "Hyperchannel",
	HWTypeLanstar:              "Lanstar",
	HWTypeAutonet:              "Autonet Short Address",
	HWTypeLocalTalk:            "LocalTalk",
	HWTypeLocalNet:             "LocalNet",
	HWTypeUltraLink:            "Ultra link",
	HWTypeSMDS:                 "SMDS",
	HWTypeFrameRelay:           "Frame Relay",
	HWTypeATM:                  "ATM",
	HWTypeHDLC:                 "HDLC",
	HWTypeFibreChannel:         "Fibre Channel",
	HWTypeATM2:                 "ATM 2",
	HWTypeSerialLine:           "Serial Line",
	HWTypeATM3:                 "ATM 3",
	HWTypeMILSTD188220:         "MIL-STD-188-220",
	HWTypeMetricom:             "Metricom",
	HWTypeIEEE1394:             "IEEE 1394.1995",
	HWTypeMAPOS:                "MAPOS",
	HWTypeTwinaxial:            "Twinaxial",
	HWTypeEUI64:                "EUI-64",
	HWTypeHIPARP:               "HIPARP",
	HWTypeISO7816:              "IP and ARP over ISO 7816-3",
	HWTypeARPSec:               "ARPSec",
	HWTypeIPsec:                "IPsec tunnel",
	HWTypeInfiniband:           "Infiniband",
	HWTypeCAI:                  "CAI, TIA-102 Project 125 Common Air Interface",
	HWTypeWiegandInterface:     "Wiegand Interface",
	HWTypePureIP:               "Pure IP",
}

// String implements fmt.Stringer.
func (h HWType) String() string {
	hwtype := hwTypeToString[h]
	if hwtype == "" {
		hwtype = "unknown"
	}
	return hwtype
}