-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace netifaces by scapy #1489
Merged
Merged
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4f4147f
replace netifaces by psutil
zhengfeihe e39de2b
Update ci/run_tests/requirements.txt
tigercosmos 2241be8
format code
zhengfeihe 535816c
disable tests for debuging windows problem on psutil
zhengfeihe c96cdca
use wmi to translate windows nic guid to nic name
zhengfeihe ef01798
revert changes in ci/cd files
zhengfeihe 56e56e5
Merge branch 'dev' into fix/remove-netifaces
zhengfeihe e6474c0
use scapy to as the new option
zhengfeihe 3050bd1
add logs for debug
zhengfeihe 6798d96
fix bugs on windows
zhengfeihe 72d6a25
change based on comments
zhengfeihe 6d1dfc2
Merge branch 'seladb:master' into fix/remove-netifaces
zhengfeihe e6de219
Merge branch 'dev' into fix/remove-netifaces
tigercosmos 4ef3b8f
properly handle checking ipv4 addresses
zhengfeihe d377f74
improve comments
zhengfeihe b06c3fa
Merge branch 'dev' into fix/remove-netifaces
zhengfeihe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
netifaces==0.11.0 | ||
scapy==2.5.0 |
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we always return the second address?
If we want to return the first IPv4 address, maybe we can do this instead:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because in the returned
iface["ips"]
list, the first element will be IPv6 address, and then the second element is the ipv4 address. One example is'ips': ['fe80::ff8e:5110:73f1:e14d', '169.254.226.73']}
.I agree using check function do make more sense then just assign a fixed random number. I will change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhengfeihe It will be better to leave some comments in the code as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tigercosmos added