Skip to content

Commit e1491e9

Browse files
committed
updated header
1 parent f0be28d commit e1491e9

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

hex2int.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1+
#!/usr/bin/python
2+
3+
#Author: Suraj Patil
4+
#Version: 1.0
5+
#Date: 26th March 2014
6+
17
'''
28
this file won't execute, you will have to type this all into the python prompt, which is the appropriate way of
39
doing programming, as it allows the programmer to have an interactive output
410
5-
http://standards.ieee.org/develop/regauth/ethertype/eth.txt
6-
this is the etherType text file we are going to use
7-
there are 43 lines, each one has a hex number, I have to convert
8-
all those hex numbers into decimal, and then print them back to the text file
9-
10-
NO way I am going to do that by hand. simple, use python!
11-
12-
we have to convert the EtherType file to this
11+
output:
1312
0x0800 2048 Internet Protocol version 4 (IPv4)
1413
0x0806 2054 Address Resolution Protocol (ARP)
1514
0x0842 2114 Wake-on-LAN[3]
15+
... any number of entries
16+
17+
input:
18+
0x0800 Internet Protocol version 4 (IPv4)
19+
0x0806 Address Resolution Protocol (ARP)
20+
0x0842 Wake-on-LAN[3]
21+
...any number of entries
1622
23+
0x0800 = hexadecimal of 2048
1724
'''
1825

1926

0 commit comments

Comments
 (0)