Skip to content
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

Add CLI argument --adapter [<NAME>] to allow immediately starting the capture from a given network interface #643

Merged
merged 5 commits into from
Nov 24, 2024

Conversation

GyulyVGC
Copy link
Owner

@GyulyVGC GyulyVGC commented Nov 24, 2024

This PR adds a new CLI argument --adapter [<NAME>] to allow immediately starting the capture from a network interface given its name.

If a name isn't passed to the --adapter flag, the capture will be started from the latest sniffed adapter, or the default adapter in case it's the very first launch of the app.
The same is done even in case the passed adapter name is invalid or not existing.

Since Sniffnet's CLI arguments are getting more complex, I decided to start using clap to parse them.

Fixes #636.

@GyulyVGC GyulyVGC added the enhancement New feature, request, or improvement label Nov 24, 2024
@GyulyVGC GyulyVGC added this to the v1.3.2 milestone Nov 24, 2024
@GyulyVGC GyulyVGC self-assigned this Nov 24, 2024
Copy link
Owner Author

@GyulyVGC GyulyVGC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@GyulyVGC GyulyVGC merged commit dd46f32 into main Nov 24, 2024
6 checks passed
@GyulyVGC GyulyVGC deleted the cli-adapter branch November 24, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, request, or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Start the monitoring given adapter name from CLI
1 participant