Thanks to visit codestin.com
Credit goes to github.com

Skip to content

besoin d'aide  #1

@rimeh-bennjima

Description

@rimeh-bennjima

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions