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

Lacks Mac OS Apple Silicon support? #663

Open
Kofituo opened this issue Dec 9, 2023 · 3 comments
Open

Lacks Mac OS Apple Silicon support? #663

Kofituo opened this issue Dec 9, 2023 · 3 comments

Comments

@Kofituo
Copy link

Kofituo commented Dec 9, 2023

Hi there,
I'm trying to get ipaddress and MAC address in a LAN. But for now, I'm just trying out the crate. The examples in the example folder don't work on my M1 Mac. Here's the error

arp_packet.rs

thread 'main' panicked at src/main.rs:29:19:
Error happened No such file or directory (os error 2)

Following the error, I see it may point to

#[cfg(any(target_os = "openbsd", target_os = "macos", target_os = "ios"))]
    fn get_fd(attempts: usize) -> libc::c_int {
        for i in 0..attempts {
            let fd = unsafe {
                let file_name = format!("/dev/bpf{}", i); // this line
@mat2cc
Copy link

mat2cc commented Dec 21, 2023

Have the same issue!

@simon-fu
Copy link

simon-fu commented Dec 24, 2023

I have the same issue, and run command with sudo should solve it.

@617a7aa
Copy link

617a7aa commented Apr 9, 2024

Yes, this is resolved by using sudo. macOS won't let you access all packets on a network interface without having sufficient permissions. This should probably be closed.

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

4 participants