feat: Add support for passing arbitrary ping options (config & command line)#29
Open
kazubu wants to merge 2 commits into
Open
feat: Add support for passing arbitrary ping options (config & command line)#29kazubu wants to merge 2 commits into
kazubu wants to merge 2 commits into
Conversation
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.
Adds a mechanism to pass arbitrary
pingoptions through two paths:pingopt=-o/--ping-options-v4/--ping-options-v6This makes it possible to flexibly pass
pingoptions such as packet size (-s)or any other options depending on the target or IP version.
Usage
Config file (per-target)
Since the config splits tokens by whitespace, options are given as
comma-separated tokens:
Command line
Because the value starts with
-, use the=form on the command line.Order of application
Options are concatenated onto the
pingcommand in this order:Changes
pingoptargument toPing/PingTarget, and inject the options whenbuilding the
pingcommand inPing.async_send()(dispatching v4/v6 viaPing.ipversion)pingopt=key to the config parser (gettargetlist), splitting thecomma-separated value into tokens
-o/--ping-options,--ping-options-v4, and--ping-options-v6command-line arguments
deadman.confNotes
The
tcp/snmp/routeros_apipaths do not use thepingcommand, sothey are out of scope.