Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

besoin d'aide #1

Open
rimeh-bennjima opened this issue Mar 2, 2015 · 0 comments
Open

besoin d'aide #1

rimeh-bennjima opened this issue Mar 2, 2015 · 0 comments

Comments

@rimeh-bennjima
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant