Skip to content

Internal error when pinging with dgram socket #15

Description

@PlanetTeamSpeakk

As the title suggests, I am getting an internal error when calling ping::dgramsock::ping. I am not getting this error when running the raw socket version, but as the crate already suggests, that requires me to run the program with sudo.
I have been able to figure out where the error is coming from exactly, namely the last part of the ping function, that being the decoding of the response packet. The error in the decoding happens when checking whether the version is 4, this is because it is actually 0.

I do not know what this means, but that is what I managed to extrapolate. The data returned when using a dgram socket is the following:

00 00 A2 EF 00 07 00 01 2E DD 45 29 13 D0 DC 21
AA 78 A4 7D 84 B4 0D 0E 7D 66 2D C4 56 90 16 9C

I cannot provide the data returned when using a raw socket as getting CodeLLDB to run the program with sudo is a pain.

I am running the program on a Raspberry Pi 4B running Raspberry Pi OS Bookworm (Debian 12) 64 bit.

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