-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
please can explain to me why the lines of code: version_ihl = iph[0]
version = version_ihl >> 4
ihl = version_ihl & 0xF
iph_length = ihl * 4
ttl = iph[5]
protocol = iph[6]
s_addr = socket.inet_ntoa(iph[8]);
d_addr = socket.inet_ntoa(iph[9]);
Especially why the lag of 4 bit right and why we do version_ihl & 0xF and the multiplication by four and the rest iph [i] on how many byte gold , iph a byte array or bit !!!
thank you in advance for your answer.
Metadata
Metadata
Assignees
Labels
No labels