Commit graph

11 commits

Author SHA1 Message Date
Conrad Kramer
8007e88b53 Enable IPv4 configuration on macOS
This enables getting and setting the IPv4 address on tun interfaces
on macOS
2023-05-13 13:15:41 -04:00
Conrad Kramer
cf95ac819c Share *RawFd trait implementations on Unix
They were previously only present on Apple platforms.
2023-05-09 23:01:36 -04:00
Cara Salter
5e265632a3 tun/test: Add #[throws] to netmask test
Enables tests to avoid using `.unwrap()`.

Co-authored-by: Conrad Kramer <conrad@conradkramer.com>
2023-04-29 20:14:18 -04:00
Cara Salter
4a0d53bdd3 tun: Fix implementation tests for netmask
Note that there needs to be an address set on the interface prior to
assigning a netmask.
2023-04-29 20:14:18 -04:00
Cara Salter
6ea4b596c2 tun: Initial work on getting/setting netmask
Seems to run into an issue with setting netmasks like 255.0.0.0 with an
"AddressNotAvailable" error
2023-04-29 20:14:18 -04:00
Cara Salter
c444bf293e tun: Create integration tests for MTU
Tests are good, y'all :)
2023-04-29 19:07:29 -04:00
Cara Salter
a13b2243e6 tun: Enable setting/getting of MTU
Works similarly to getting and setting IP addresses, can pretty much be
copy-pasted for the rest of the settings.
2023-04-29 19:07:29 -04:00
Conrad Kramer
1378eb7eb3 Implement IPv4 address configuration on Linux
This involved refactoring the crate structure to share code between
macOS and Linux. The new methods have not yet been implemented on
macOS, but they have todo!() placeholders.
2023-04-22 14:28:42 -04:00
Conrad Kramer
b37086e8f6 Add debugging task for VS Code
This allows you to launch the command line program into a debugger. This
commit also tweaks the CI and fixes a small error in the build script.
2023-04-16 21:19:46 -04:00
dav
02efa85a19 Fix types and fix build + clippy lints for linux
This commit changes `copy_if_name` to take a c_char.
2023-04-16 16:44:18 -04:00
Conrad Kramer
c1e7415871 Initial commit 2023-04-10 16:49:23 -04:00