sshdump/ciscodump: use groups in config.
authorDario Lombardo <lomato@gmail.com>
Fri, 4 May 2018 20:36:14 +0000 (22:36 +0200)
committerDario Lombardo <lomato@gmail.com>
Tue, 8 May 2018 14:06:22 +0000 (14:06 +0000)
Change-Id: I3d6689738aee32bf720e6ebca1d4462429fdc1eb
Reviewed-on: https://code.wireshark.org/review/27397
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
extcap/ciscodump.c
extcap/extcap-base.c
extcap/sshdump.c

index c0ff6bea80c4ec77d74f8c0d82f9d5d48dbba1ec..59807047becb7c9e3068517be2dd0c89be11a3bd 100644 (file)
@@ -471,33 +471,33 @@ static int list_config(char *interface, unsigned int remote_port)
 
        printf("arg {number=%u}{call=--remote-host}{display=Remote SSH server address}"
                "{type=string}{tooltip=The remote SSH host. It can be both "
-               "an IP address or a hostname}{required=true}\n", inc++);
+               "an IP address or a hostname}{required=true}{group=Server}\n", inc++);
        printf("arg {number=%u}{call=--remote-port}{display=Remote SSH server port}"
                "{type=unsigned}{default=22}{tooltip=The remote SSH host port (1-65535)}"
-               "{range=1,65535}\n", inc++);
+               "{range=1,65535}{group=Server}\n", inc++);
        printf("arg {number=%u}{call=--remote-username}{display=Remote SSH server username}"
                "{type=string}{default=%s}{tooltip=The remote SSH username. If not provided, "
-               "the current user will be used}\n", inc++, g_get_user_name());
+               "the current user will be used}{group=Authentication}\n", inc++, g_get_user_name());
        printf("arg {number=%u}{call=--remote-password}{display=Remote SSH server password}"
                "{type=password}{tooltip=The SSH password, used when other methods (SSH agent "
-               "or key files) are unavailable.}\n", inc++);
+               "or key files) are unavailable.}{group=Authentication}\n", inc++);
        printf("arg {number=%u}{call=--sshkey}{display=Path to SSH private key}"
-               "{type=fileselect}{tooltip=The path on the local filesystem of the private ssh key}\n",
-               inc++);
+               "{type=fileselect}{tooltip=The path on the local filesystem of the private ssh key}"
+               "{group=Authentication}\n", inc++);
        printf("arg {number=%u}{call--sshkey-passphrase}{display=SSH key passphrase}"
-               "{type=password}{tooltip=Passphrase to unlock the SSH private key}\n",
-               inc++);
+               "{type=password}{tooltip=Passphrase to unlock the SSH private key}"
+               "{group=Authentication\n", inc++);
        printf("arg {number=%u}{call=--remote-interface}{display=Remote interface}"
                "{type=string}{required=true}{tooltip=The remote network interface used for capture"
-               "}\n", inc++);
+               "}{group=Capture}\n", inc++);
        printf("arg {number=%u}{call=--remote-filter}{display=Remote capture filter}"
                "{type=string}{tooltip=The remote capture filter}", inc++);
        if (ipfilter)
                printf("{default=%s}", ipfilter);
-       printf("\n");
+       printf("{group=Capture}\n");
        printf("arg {number=%u}{call=--remote-count}{display=Packets to capture}"
-               "{type=unsigned}{required=true}{tooltip=The number of remote packets to capture.}\n",
-               inc++);
+               "{type=unsigned}{required=true}{tooltip=The number of remote packets to capture.}"
+               "{group=Capture}\n", inc++);
 
        extcap_config_debug(&inc);
 
index 40b87a557d287971543f12a775815017bd8099ad..7d47aa41e5a46086a51c067ccf5911941dfa4b38 100644 (file)
@@ -355,11 +355,11 @@ void extcap_init_custom_log(const char* filename)
 void extcap_config_debug(unsigned* count)
 {
     printf("arg {number=%u}{call=--debug}{display=Run in debug mode}"
-    "{type=boolean}{default=false}{tooltip=Print debug messages}{required=false}\n",
-    (*count)++);
+    "{type=boolean}{default=false}{tooltip=Print debug messages}{required=false}"
+    "{group=Debug}\n", (*count)++);
     printf("arg {number=%u}{call=--debug-file}{display=Use a file for debug}"
-    "{type=string}{tooltip=Set a file where the debug messages are written}{required=false}\n",
-    (*count)++);
+    "{type=string}{tooltip=Set a file where the debug messages are written}{required=false}"
+    "{group=Debug}\n", (*count)++);
 }
 
 void extcap_cmdline_debug(char** ar, const unsigned n)
index 4ec866ee283076aaa2d10f6cf63118ae0c3cc3f6..6a09057a5325f12fe16a5e7950431301a5e0c742 100644 (file)
@@ -267,39 +267,41 @@ static int list_config(char *interface, unsigned int remote_port)
 
        printf("arg {number=%u}{call=--remote-host}{display=Remote SSH server address}"
                "{type=string}{tooltip=The remote SSH host. It can be both "
-               "an IP address or a hostname}{required=true}\n", inc++);
+               "an IP address or a hostname}{required=true}{group=Server}\n", inc++);
        printf("arg {number=%u}{call=--remote-port}{display=Remote SSH server port}"
                "{type=unsigned}{default=22}{tooltip=The remote SSH host port (1-65535)}"
-               "{range=1,65535}\n", inc++);
+               "{range=1,65535}{group=Server}\n", inc++);
        printf("arg {number=%u}{call=--remote-username}{display=Remote SSH server username}"
                "{type=string}{default=%s}{tooltip=The remote SSH username. If not provided, "
-               "the current user will be used}\n", inc++, g_get_user_name());
+               "the current user will be used}{group=Authentication}\n", inc++, g_get_user_name());
        printf("arg {number=%u}{call=--remote-password}{display=Remote SSH server password}"
                "{type=password}{tooltip=The SSH password, used when other methods (SSH agent "
-               "or key files) are unavailable.}\n", inc++);
+               "or key files) are unavailable.}{group=Authentication}\n", inc++);
        printf("arg {number=%u}{call=--sshkey}{display=Path to SSH private key}"
-               "{type=fileselect}{tooltip=The path on the local filesystem of the private ssh key}\n",
-               inc++);
+               "{type=fileselect}{tooltip=The path on the local filesystem of the private ssh key}"
+               "{group=Authentication}\n",inc++);
        printf("arg {number=%u}{call=--sshkey-passphrase}{display=SSH key passphrase}"
-               "{type=password}{tooltip=Passphrase to unlock the SSH private key}\n",
+               "{type=password}{tooltip=Passphrase to unlock the SSH private key}{group=Authentication}\n",
                inc++);
        printf("arg {number=%u}{call=--remote-interface}{display=Remote interface}"
                "{type=string}{default=eth0}{tooltip=The remote network interface used for capture"
-               "}\n", inc++);
+               "}{group=Capture}\n", inc++);
        printf("arg {number=%u}{call=--remote-capture-command}{display=Remote capture command}"
-               "{type=string}{tooltip=The remote command used to capture}\n", inc++);
+               "{type=string}{tooltip=The remote command used to capture}{group=Capture}\n", inc++);
        printf("arg {number=%u}{call=--remote-sudo}{display=Use sudo on the remote machine}"
-               "{type=boolean}{tooltip=Prepend the capture command with sudo on the remote machine}\n", inc++);
+               "{type=boolean}{tooltip=Prepend the capture command with sudo on the remote machine}"
+               "{group=Capture}\n", inc++);
        printf("arg {number=%u}{call=--remote-noprom}{display=No promiscuous mode}"
-               "{type=boolflag}{tooltip=Don't use promiscuous mode on the remote machine}\n", inc++);
-       printf("arg {number=%u}{call=--remote-filter}{display=Remote capture filter}"
-               "{type=string}{tooltip=The remote capture filter}", inc++);
+               "{type=boolflag}{tooltip=Don't use promiscuous mode on the remote machine}{group=Capture}"
+               "\n", inc++);
+       printf("arg {number=%u}{call=--remote-filter}{display=Remote capture filter}{type=string}"
+               "{tooltip=The remote capture filter}", inc++);
        if (ipfilter)
                printf("{default=%s}", ipfilter);
-       printf("\n");
+       printf("{group=Capture}\n");
        printf("arg {number=%u}{call=--remote-count}{display=Packets to capture}"
-               "{type=unsigned}{default=0}{tooltip=The number of remote packets to capture. (Default: inf)}\n",
-               inc++);
+               "{type=unsigned}{default=0}{tooltip=The number of remote packets to capture. (Default: inf)}"
+               "{group=Capture}\n", inc++);
 
        extcap_config_debug(&inc);