Commit graph

13 commits

Author SHA1 Message Date
dav
84f1d91d5c Implement TunInterfaceOptions 2023-06-28 16:13:08 -04:00
Sam Poder
da065b503f Log "Set" Actions in Tun (Linux)
I've used the log library and its info method.

I've also added but not used env-logger.
2023-06-27 15:42:36 -04:00
Sam Poder
f2af721deb Update tun/src/unix/linux/mod.rs
This fixes an accidental change I made, sorry!
2023-06-06 18:16:08 -04:00
Sam Poder
d65b9a4c68 Begin CLI Work
Uses the Parser module + it sets up a help & version.
2023-06-06 18:16:08 -04:00
JettChenT
82c4d218d7 Add read and write functions for TunInterface
This adds read and write functionality for TunInterface.
2023-06-05 01:15:36 -07:00
Conrad Kramer
cc30fcd34c Create set_ipv6_addr
This adds a new method for setting an ipv6 address on an interface
2023-06-03 13:14:47 -04:00
JettChenT
5baf86d975 add cfg test
this adds cfg-test for
test modules
2023-05-26 14:02:10 -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