Add BSD and macOS link speed implementation#159
Merged
Conversation
1428497 to
678ec07
Compare
Owner
|
Thanks! I also saw the latest update fixing the non-BSD compile issues - looks like all CI checks are passing except for rustfmt right now. I'll take a closer look at the implementation soon and review everything in detail. |
This commit adds code to get the freebsd, openbsd, netbsd and macOS transmit and receive speed using `ioctl`. Furthermore, it also add the Wi-Fi transmit rate on macOS. Additionally, the auto_negotiate field of `Interface` shows if the interface link speed has been auto-negotiated. If `false`, the interface link speed is either configured manually or not available. Unfortunately, this is a rather large commit because every BSD variant uses different constants for their if_media sub types. I didn't find a better way to include all different values while still reusing the ones that are equal across the various operating systems. Implements shellrow#158
678ec07 to
37b4d74
Compare
Contributor
Author
|
I forgot to run fustfmt again after some changes. Should now be fixed! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds code to get the freebsd, openbsd, netbsd and macOS transmit and receive speed using
ioctl. Furthermore, it also add the Wi-Fi transmit rate on macOS.Additionally, the auto_negotiate field of
Interfaceshows if the interface link speed has been auto-negotiated. Iffalse, the interface link speed is either configured manually or not available.Unfortunately, this is a rather large commit because every BSD variant uses different constants for their if_media sub types. I didn't find a better way to include all different values while still reusing the ones that are equal across the various operating systems.
Implements #158
(edit: latest changes resolve compile issues on Windows, Linux and Android)