Skip to content

Netmod raw rebased

Christopher Grant requested to merge cagrant/irdest:netmod-raw-rebased into develop

Issue Fix

Fixes: #45 (closed)

Description

  • Adds an ethernet endpoint based on the UDP endpoint. (Only tested on Linux. Requires permissions. Hopefully ports easily to BSDs)
  • Refactors duplicated code from the UDP and ethernet endpoints.
  • Adds device auto-configuration through NetworkManager.
  • Does not add VIF auto-configuration through Nl80211.

Several network topologies can be supported in NetworkManager and Nl80211. IBSS (ad-hoc) is probably the most flexible for Irdest's purposes.

Alternative(s) considered

As far as interfacing directly with the layer 2 stack goes, pnet has better portability than nix or socket2. Additionally, it was already used somewhat so it should not create too much mess.

When it comes to interfacing with NetworkManager, zbus is the freedesktop supported dbus interface from Rust. I think it might also be the only one with proper async support. There doesn't seem to be an existing, mature crate for NetworkManager for Rust using zbus. As such, I seem to be stuck hand-rolling it for now. I am trying to implement a similar interface to libnm.

It is not readily apparent that it is possible to manage virtual interfaces through NetworkManager. Rust's Netlink libraries, particularly for nl80211, need a lot of work. Ideally I would add the functions I need to neli-wifi, but I can neither contact the author of the crate nor send an MR because I try to avoid using Github.

Type

Feature

Screenshots (if applicable)

Known Issues

  • VIF configuration is not complete. This means that RATMAN will interfere with higher level protocols if this is running.
  • No SSID conflict resolution.
  • Automatic proxy generation for the zbus-nm crate is not fully automated. (See README.md)
  • There are certainly some non-idiomatic expressions that can be expressed more cleanly.
Edited by Christopher Grant

Merge request reports