-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharphardware.py
96 lines (94 loc) · 3.14 KB
/
arphardware.py
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
92
93
94
95
#Function replaces a number with the arp hardware type
def hardwaretype(num):
if isinstance(num, int) == True:
if num == 0:
hardwaretype = 'Reserved'
elif num == 1:
hardwaretype = 'Ethernet'
elif num == 2:
hardwaretype = 'Experimental Ethernet'
elif num == 3:
hardwaretype = 'Amateur Radio AX.25'
elif num == 4:
hardwaretype = 'Proteon ProNET Token Ring'
elif num == 5:
hardwaretype = 'Chaos'
elif num == 6:
hardwaretype = 'IEEE 802 Networks'
elif num == 7:
hardwaretype = 'ARCNET'
elif num == 8:
hardwaretype = 'Hyperchannel'
elif num == 9:
hardwaretype = 'Lanstar'
elif num == 10:
hardwaretype = 'Autonet Short Address'
elif num == 11:
hardwaretype = 'LocalTalk'
elif num == 12:
hardwaretype = 'LocalNet'
elif num == 13:
hardwaretype = 'Ultra link'
elif num == 14:
hardwaretype = 'SMDS'
elif num == 15:
hardwaretype = 'Frame Relay'
elif num == 16:
hardwaretype = 'Asynchronous Transmission Mode (ATM)'
elif num == 17:
hardwaretype = 'HDLC'
elif num == 18:
hardwaretype = 'Fibre Channel'
elif num == 19:
hardwaretype = 'Asynchronous Transmission Mode (ATM)'
elif num == 20:
hardwaretype = 'Serial Line'
elif num == 21:
hardwaretype = 'Asynchronous Transmission Mode (ATM)'
elif num == 22:
hardwaretype = 'MIL-STD-188-220'
elif num == 23:
hardwaretype = 'Metricom'
elif num == 24:
hardwaretype = 'IEEE 1394.1995'
elif num == 25:
hardwaretype = 'MAPOS'
elif num == 26:
hardwaretype = 'Twinaxial'
elif num == 27:
hardwaretype = 'EUI-64'
elif num == 28:
hardwaretype = 'HIPARP'
elif num == 29:
hardwaretype = 'IP and ARP over ISO 7816-3'
elif num == 30:
hardwaretype = 'ARPsec'
elif num == 31:
hardwaretype = 'IPsec tunnel'
elif num == 32:
hardwaretype = 'InfiniBand(TM)'
elif num == 33:
hardwaretype = 'TIA-102 Project 25 Common Air Interface (CAI)'
elif num == 34:
hardwaretype = 'Wiegand Interface'
elif num == 35:
hardwaretype = 'Pure IP'
elif num == 36:
hardwaretype = 'HW_EXP1'
elif num == 37:
hardwaretype = 'HFI'
elif num == 38:
hardwaretype = 'Unified Bus (UB)'
elif 39 <= num <= 255:
hardwaretype = 'Unassigned'
elif num == 256:
hardwaretype = 'HW_EXP2'
elif num == 257:
hardwaretype = 'AEthernet'
elif 258 <= num <= 65534:
hardwaretype = 'Unassigned'
elif num == 65535:
hardwaretype = 'Reserved'
return hardwaretype
else:
print('Error: Hardware type number must be an integer value.\n')