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

consomme: ICMP support for things like ping #102

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sunilmut
Copy link
Member

Add the ICMP backend handler for consomme

@sunilmut sunilmut requested a review from a team as a code owner October 17, 2024 01:36
Copy link
Member

@benhillis benhillis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good minus one thing clippy is complaining about.

Copy link
Contributor

@daprilik daprilik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't merge this PR until you've removed allow(unsafe_code, undocumented_unsafe_blocks)

}
}

fn recv_from(socket: &mut Socket, buffer: *mut [u8]) -> std::io::Result<(usize, SockAddr)> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this take a &mut [u8] instead of a *mut [u8]?

// with the 'net.ip.ping_group_range' configuration, which is more
// permissive.
let socket_type = if cfg!(windows) {
Type::RAW
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What perms are required for this on Windows?

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

Successfully merging this pull request may close these issues.

4 participants