How to get a list of local network computers to explore and access remote files?

Hi guys,

Is there a way to get a list of the local network's computers using Rust standard library? If not, which networking crate do you recommend?

We are using Windows OS and would like to parse all computers found on the network in order to list, explore and access each computer's drives, folder trees and files.

Please recommend the best (most standard way) to achieve this.

Optionally, we would like to be able to fetch the MAC address of the local computer on which the Rust program is running. Should we use the "interfaces" crate, or are there other/better options? -- since the latter crate seems too limited.

Thanks

Maybe this helps you:

https://github.com/vertexclique/smbclient-sys

(I did just a quick search for SMB / CIFS on crates.io)

Otherwise you could try to use the Windows built-in command line tool netsh:

Use the process module to call the command line tool and parse the result:

For the MAC address you probably mean this crate:

https://github.com/andrew-d/interfaces-rs

I haven't used it so I can't say how limited it is. But you can try to use the command line again:

1 Like

Thanks a lot! I will check them up.