2 * wifidump is an extcap tool used to capture Wi-Fi frames using a remote ssh host
4 * Adapted from sshdump.
6 * Copyright 2022, Adrian Granados <adrian@intuitibits.com>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * SPDX-License-Identifier: GPL-2.0-or-later
16 #define WS_LOG_DOMAIN "wifidump"
18 #include <extcap/extcap-base.h>
19 #include <extcap/ssh-base.h>
20 #include <wsutil/interface.h>
21 #include <wsutil/file_util.h>
22 #include <wsutil/strtoi.h>
23 #include <wsutil/filesystem.h>
24 #include <wsutil/privileges.h>
25 #include <wsutil/please_report_bug.h>
26 #include <wsutil/wslog.h>
34 static char* wifidump_extcap_interface
;
36 #define DEFAULT_WIFIDUMP_EXTCAP_INTERFACE "wifidump.exe"
38 #define DEFAULT_WIFIDUMP_EXTCAP_INTERFACE "wifidump"
41 #define WIFIDUMP_VERSION_MAJOR "1"
42 #define WIFIDUMP_VERSION_MINOR "0"
43 #define WIFIDUMP_VERSION_RELEASE "0"
45 #define SSH_READ_BLOCK_SIZE 256
48 EXTCAP_BASE_OPTIONS_ENUM
,
56 OPT_REMOTE_CHANNEL_FREQUENCY
,
57 OPT_REMOTE_CHANNEL_WIDTH
,
60 OPT_SSHKEY_PASSPHRASE
,
66 static const struct ws_option longopts
[] = {
68 { "help", ws_no_argument
, NULL
, OPT_HELP
},
69 { "version", ws_no_argument
, NULL
, OPT_VERSION
},
71 { "remote-channel-frequency", ws_required_argument
, NULL
, OPT_REMOTE_CHANNEL_FREQUENCY
},
72 { "remote-channel-width", ws_required_argument
, NULL
, OPT_REMOTE_CHANNEL_WIDTH
},
76 static const char * remote_capture_functions
=
78 "function iface_down {\n"
80 " sudo ip link set $iface down > /dev/null 2>&1\n"
83 "function iface_up {\n"
85 " sudo ip link set $iface up > /dev/null 2>&1\n"
88 "function iface_monitor {\n"
90 " sudo iw dev $iface set monitor control otherbss > /dev/null 2>&1 ||\n"
91 " sudo iw dev $iface set type monitor control otherbss > /dev/null 2>&1\n"
94 "function iface_scan {\n"
96 " iface_down $iface &&\n"
97 " sudo iw dev $iface set type managed > /dev/null 2>&1 &&\n"
98 " iface_up $iface &&\n"
99 " sudo iw dev $iface scan > /dev/null 2>&1\n"
102 "function iface_config {\n"
105 " local ch_width=$3\n"
106 " local center_freq=$4\n"
107 " if [ $freq -eq $center_freq ]; then\n"
108 " sudo iw dev $1 set freq $freq $ch_width 2>&1\n"
110 " sudo iw dev $1 set freq $freq $ch_width $center_freq 2>&1\n"
114 "function iface_start {\n"
117 " local filter=\"${@:3}\"\n"
118 " if [ $count -gt 0 ]; then\n"
119 " sudo tcpdump -i $iface -U -w - -c $count $filter\n"
121 " sudo tcpdump -i $iface -U -w - $filter\n"
125 "function capture_generic {\n"
128 " local ch_width=$3\n"
129 " local center_freq=$4\n"
131 " local filter=\"${@:6}\"\n"
132 " if ! { iwconfig $iface | grep Monitor > /dev/null 2>&1; }; then\n"
133 " iface_down $iface &&\n"
134 " iface_monitor $iface &&\n"
137 " iface_monitor $iface\n"
139 " iface_config $iface $freq $ch_width $center_freq &&\n"
140 " iface_start $iface $count $filter\n"
143 "function capture_iwlwifi {\n"
146 " local ch_width=$3\n"
147 " local center_freq=$4\n"
149 " local filter=\"${@:6}\"\n"
150 " INDEX=`sudo iw dev $iface info | grep wiphy | grep -Eo '[0-9]+'`\n"
151 " sudo iw phy phy${INDEX} channels | grep $freq | grep -i disabled > /dev/null 2>&1 &&\n"
152 " iface_scan $iface\n"
154 " sudo iw $iface interface add $MON type monitor flags none > /dev/null 2>&1\n"
155 " iface_up $MON &&\n"
156 " iface_down $iface &&\n"
157 " iface_config $MON $freq $ch_width $center_freq &&\n"
158 " iface_start $MON $count $filter\n"
161 "function capture {\n"
164 " local ch_width=$3\n"
165 " local center_freq=$4\n"
167 " local filter=\"${@:6}\"\n"
168 " if [ \"$iface\" == \"auto\" ]; then\n"
169 " iface=`sudo iw dev | grep -i interface | awk '{ print $2 }' | sort | head -n 1`\n"
171 " local driver=`/usr/sbin/ethtool -i $iface | grep driver | awk '{ print $2 }'`\n"
172 " if [ $driver = \"iwlwifi\" ]; then\n"
173 " capture_iwlwifi $iface $freq $ch_width $center_freq $count $filter\n"
175 " capture_generic $iface $freq $ch_width $center_freq $count $filter\n"
180 static unsigned int wifi_freqs_2dot4_5ghz
[] = {
181 2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462,
183 5180, 5200, 5220, 5240, 5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580,
184 5600, 5620, 5640, 5660, 5680, 5700, 5720, 5745, 5765, 5785, 5805, 5825,
188 static unsigned int freq_to_channel(unsigned int freq_mhz
) {
189 if (freq_mhz
== 2484)
191 else if (freq_mhz
>= 2412 && freq_mhz
<= 2484)
192 return ((freq_mhz
- 2412) / 5) + 1;
193 else if (freq_mhz
>= 5160 && freq_mhz
<= 5885)
194 return ((freq_mhz
- 5180) / 5) + 36;
195 else if (freq_mhz
>= 5955 && freq_mhz
<= 7115)
196 return ((freq_mhz
- 5955) / 5) + 1;
201 static const char *freq_to_band(unsigned int freq_mhz
)
203 if (freq_mhz
>= 2412 && freq_mhz
<= 2484)
205 else if (freq_mhz
>= 5160 && freq_mhz
<= 5885)
207 else if (freq_mhz
>= 5955 && freq_mhz
<= 7115)
213 static unsigned int center_freq(unsigned int freq_mhz
, unsigned int ch_width_mhz
) {
215 unsigned int start_freq
;
217 if (ch_width_mhz
== 20) {
220 else if (ch_width_mhz
== 40) {
221 if (freq_mhz
>= 5180 && freq_mhz
<= 5720) {
222 for (start_freq
= 5180; start_freq
<= 5700; start_freq
+= ch_width_mhz
) {
223 if (freq_mhz
>= start_freq
&& freq_mhz
<= (start_freq
+ 20))
224 return ((start_freq
* 2) + 20) / 2;
227 else if (freq_mhz
>= 5745 && freq_mhz
<= 5765)
229 else if (freq_mhz
>= 5785 && freq_mhz
<= 5805)
231 else if (freq_mhz
>= 5955 && freq_mhz
<= 7095) {
232 for (start_freq
= 5955; start_freq
<= 7075; start_freq
+= ch_width_mhz
) {
233 if (freq_mhz
>= start_freq
&& freq_mhz
<= (start_freq
+ 20))
234 return ((start_freq
* 2) + 20) / 2;
238 else if (ch_width_mhz
== 80) {
239 if (freq_mhz
>= 5180 && freq_mhz
<= 5660) {
240 for (start_freq
= 5180; start_freq
<= 5660; start_freq
+= ch_width_mhz
) {
241 if (freq_mhz
>= start_freq
&& freq_mhz
<= (start_freq
+ 60))
242 return ((start_freq
* 2) + 60) / 2;
245 else if (freq_mhz
>= 5745 && freq_mhz
<= 5805)
247 else if (freq_mhz
>= 5955 && freq_mhz
<= 7055) {
248 for (start_freq
= 5955; start_freq
<= 6995; start_freq
+= ch_width_mhz
) {
249 if (freq_mhz
>= start_freq
&& freq_mhz
<= (start_freq
+ 60))
250 return ((start_freq
* 2) + 60) / 2;
254 else if (ch_width_mhz
== 160) {
255 if (freq_mhz
>= 5180 && freq_mhz
<= 5640) {
256 for (start_freq
= 5180; start_freq
<= 5500; start_freq
+= ch_width_mhz
) {
257 if (freq_mhz
>= start_freq
&& freq_mhz
<= (start_freq
+ 140))
258 return ((start_freq
* 2) + 140) / 2;
261 else if (freq_mhz
>= 5955 && freq_mhz
<= 7055) {
262 for (start_freq
= 5955; start_freq
<= 6915; start_freq
+= ch_width_mhz
) {
263 if (freq_mhz
>= start_freq
&& freq_mhz
<= (start_freq
+ 140))
264 return ((start_freq
* 2) + 140) / 2;
272 static int ssh_loop_read(ssh_channel channel
, FILE* fp
)
275 int ret
= EXIT_SUCCESS
;
276 char buffer
[SSH_READ_BLOCK_SIZE
];
278 /* read from stdin until data are available */
279 while (ssh_channel_is_open(channel
) && !ssh_channel_is_eof(channel
)) {
280 nbytes
= ssh_channel_read(channel
, buffer
, SSH_READ_BLOCK_SIZE
, 0);
282 ws_warning("Error reading from channel");
288 if (fwrite(buffer
, 1, nbytes
, fp
) != (unsigned)nbytes
) {
289 ws_warning("Error writing to fifo");
296 /* read loop finished... maybe something wrong happened. Read from stderr */
297 while (ssh_channel_is_open(channel
) && !ssh_channel_is_eof(channel
)) {
298 nbytes
= ssh_channel_read(channel
, buffer
, SSH_READ_BLOCK_SIZE
, 1);
300 ws_warning("Error reading from channel");
303 if (fwrite(buffer
, 1, nbytes
, stderr
) != (unsigned)nbytes
) {
304 ws_warning("Error writing to stderr");
310 if (ssh_channel_send_eof(channel
) != SSH_OK
) {
311 ws_warning("Error sending EOF in ssh channel");
317 static ssh_channel
run_ssh_command(ssh_session sshs
, const char* capture_functions
,
318 const char* iface
, const uint16_t channel_frequency
, const uint16_t channel_width
,
319 const uint16_t center_frequency
, const char* cfilter
, const uint32_t count
)
323 char* quoted_iface
= NULL
;
324 char* quoted_filter
= NULL
;
325 char* count_str
= NULL
;
326 unsigned int remote_port
= 22;
328 channel
= ssh_channel_new(sshs
);
330 ws_warning("Can't create channel");
334 if (ssh_channel_open_session(channel
) != SSH_OK
) {
335 ws_warning("Can't open session");
336 ssh_channel_free(channel
);
340 ssh_options_get_port(sshs
, &remote_port
);
342 quoted_iface
= iface
? g_shell_quote(iface
) : NULL
;
343 quoted_filter
= g_shell_quote(cfilter
? cfilter
: "");
344 cmdline
= ws_strdup_printf("%s capture %s %u %u %u %u %s",
346 quoted_iface
? quoted_iface
: "auto",
353 ws_debug("Running: %s", cmdline
);
354 if (ssh_channel_request_exec(channel
, cmdline
) != SSH_OK
) {
355 ws_warning("Can't request exec");
356 ssh_channel_close(channel
);
357 ssh_channel_free(channel
);
361 g_free(quoted_iface
);
362 g_free(quoted_filter
);
369 static int ssh_open_remote_connection(const ssh_params_t
* params
, const char* capture_functions
,
370 const char* iface
, const uint16_t channel_frequency
, const uint16_t channel_width
,
371 const uint16_t center_frequency
, const char* cfilter
, const uint32_t count
, const char* fifo
)
373 ssh_session sshs
= NULL
;
374 ssh_channel channel
= NULL
;
376 int ret
= EXIT_FAILURE
;
377 char* err_info
= NULL
;
379 if (g_strcmp0(fifo
, "-")) {
380 /* Open or create the output file */
381 fp
= fopen(fifo
, "wb");
383 ws_warning("Error creating output file: %s (%s)", fifo
, g_strerror(errno
));
388 sshs
= create_ssh_connection(params
, &err_info
);
391 ws_warning("Error creating connection.");
395 channel
= run_ssh_command(sshs
, capture_functions
, iface
, channel_frequency
,
396 channel_width
, center_frequency
, cfilter
, count
);
399 ws_warning("Can't run ssh command.");
403 /* read from channel and write into fp */
404 if (ssh_loop_read(channel
, fp
) != EXIT_SUCCESS
) {
405 ws_warning("Error in read loop.");
413 ws_warning("%s", err_info
);
416 /* clean up and exit */
417 ssh_cleanup(&sshs
, &channel
);
419 if (g_strcmp0(fifo
, "-"))
424 static int list_config(char *interface
)
430 ws_warning("ERROR: No interface specified.");
434 if (g_strcmp0(interface
, wifidump_extcap_interface
)) {
435 ws_warning("ERROR: interface must be %s", wifidump_extcap_interface
);
440 printf("arg {number=%u}{call=--remote-host}{display=Remote SSH server address}"
441 "{type=string}{tooltip=The remote SSH host. It can be both "
442 "an IP address or a hostname}{required=true}{group=Server}\n", inc
++);
443 printf("arg {number=%u}{call=--remote-port}{display=Remote SSH server port}"
444 "{type=unsigned}{tooltip=The remote SSH host port (1-65535)}"
445 "{range=1,65535}{group=Server}\n", inc
++);
447 // Authentication tab
448 printf("arg {number=%u}{call=--remote-username}{display=Remote SSH server username}"
449 "{type=string}{tooltip=The remote SSH username. If not provided, "
450 "the current user will be used}{group=Authentication}\n", inc
++);
451 printf("arg {number=%u}{call=--remote-password}{display=Remote SSH server password}"
452 "{type=password}{tooltip=The SSH password, used when other methods (SSH agent "
453 "or key files) are unavailable.}{group=Authentication}\n", inc
++);
454 printf("arg {number=%u}{call=--sshkey}{display=Path to SSH private key}"
455 "{type=fileselect}{tooltip=The path on the local filesystem of the private ssh key}"
456 "{mustexist=true}{group=Authentication}\n", inc
++);
457 printf("arg {number=%u}{call=--sshkey-passphrase}{display=SSH key passphrase}"
458 "{type=password}{tooltip=Passphrase to unlock the SSH private key}{group=Authentication}\n",
460 printf("arg {number=%u}{call=--ssh-sha1}{display=Support SHA-1 keys (deprecated)}"
461 "{type=boolflag}{tooltip=Support keys and key exchange algorithms using SHA-1 (deprecated)}{group=Authentication}"
466 printf("arg {number=%u}{call=--remote-interface}{display=Remote interface}"
467 "{type=string}{tooltip=The remote network interface used to capture"
468 "}{default=auto}{group=Capture}\n", inc
++);
469 printf("arg {number=%u}{call=--remote-channel-frequency}{display=Remote channel}"
470 "{type=selector}{tooltip=The remote channel used to capture}{group=Capture}\n", inc
);
472 unsigned int freq
= 0;
473 for (i
= 0; (freq
= wifi_freqs_2dot4_5ghz
[i
]); i
++) {
474 printf("value {arg=%u}{value=%u}{display=%s, Channel %u}\n", inc
, freq
, freq_to_band(freq
), freq_to_channel(freq
));
477 for (freq
= 5955, psc
= 3; freq
<= 7115; freq
+= 20, psc
++) {
478 printf("value {arg=%u}{value=%u}{display=%s, Channel %u%s}\n", inc
, freq
,
479 freq_to_band(freq
), freq_to_channel(freq
), (psc
% 4 == 0) ? " (PSC)" : "");
483 printf("arg {number=%u}{call=--remote-channel-width}{display=Remote channel width}"
484 "{type=selector}{tooltip=The remote channel width used to capture}"
485 "{group=Capture}\n", inc
);
486 printf("value {arg=%u}{value=20}{display=20 MHz}\n", inc
);
487 printf("value {arg=%u}{value=40}{display=40 MHz}\n", inc
);
488 printf("value {arg=%u}{value=80}{display=80 MHz}\n", inc
);
489 printf("value {arg=%u}{value=160}{display=160 MHz}\n", inc
);
492 printf("arg {number=%u}{call=--remote-filter}{display=Remote capture filter}{type=string}"
493 "{tooltip=The remote capture filter}{group=Capture}\n", inc
++);
494 printf("arg {number=%u}{call=--remote-count}{display=Frames to capture}"
495 "{type=unsigned}{tooltip=The number of remote frames to capture.}"
496 "{group=Capture}\n", inc
++);
498 extcap_config_debug(&inc
);
503 static char* concat_filters(const char* extcap_filter
, const char* remote_filter
)
505 if (!extcap_filter
&& remote_filter
)
506 return g_strdup(remote_filter
);
508 if (!remote_filter
&& extcap_filter
)
509 return g_strdup(extcap_filter
);
511 if (!remote_filter
&& !extcap_filter
)
514 return ws_strdup_printf("(%s) and (%s)", extcap_filter
, remote_filter
);
517 int main(int argc
, char *argv
[])
522 ssh_params_t
* ssh_params
= ssh_params_new();
523 char* remote_interface
= NULL
;
524 uint16_t remote_channel_frequency
= 0;
525 uint16_t remote_channel_width
= 0;
526 uint16_t remote_center_frequency
= 0;
527 char* remote_filter
= NULL
;
529 int ret
= EXIT_FAILURE
;
530 extcap_parameters
* extcap_conf
= g_new0(extcap_parameters
, 1);
532 char* help_header
= NULL
;
533 char* interface_description
= g_strdup("Wi-Fi remote capture");
535 /* Initialize log handler early so we can have proper logging during startup. */
536 extcap_log_init("wifidump");
538 wifidump_extcap_interface
= g_path_get_basename(argv
[0]);
541 * Get credential information for later use.
543 init_process_policies();
546 * Attempt to get the pathname of the directory containing the
549 err_msg
= configuration_init(argv
[0], NULL
);
550 if (err_msg
!= NULL
) {
551 ws_warning("Can't get pathname of directory containing the extcap program: %s.",
556 help_url
= data_file_url("wifidump.html");
557 extcap_base_set_util_info(extcap_conf
, argv
[0], WIFIDUMP_VERSION_MAJOR
, WIFIDUMP_VERSION_MINOR
,
558 WIFIDUMP_VERSION_RELEASE
, help_url
);
560 add_libssh_info(extcap_conf
);
561 if (g_strcmp0(wifidump_extcap_interface
, DEFAULT_WIFIDUMP_EXTCAP_INTERFACE
)) {
562 char* temp
= interface_description
;
563 interface_description
= ws_strdup_printf("%s, custom version", interface_description
);
566 extcap_base_register_interface(extcap_conf
, wifidump_extcap_interface
, interface_description
, 147, "Remote capture dependent DLT");
567 g_free(interface_description
);
569 help_header
= ws_strdup_printf(
570 " %s --extcap-interfaces\n"
571 " %s --extcap-interface=%s --extcap-dlts\n"
572 " %s --extcap-interface=%s --extcap-config\n"
573 " %s --extcap-interface=%s --remote-host myhost --remote-port 22222 "
574 "--remote-username myuser --remote-interface wlan0 --remote-channel-frequency 5180 "
575 "--remote-channel-width 40 --fifo=FILENAME --capture\n", argv
[0], argv
[0], wifidump_extcap_interface
, argv
[0],
576 wifidump_extcap_interface
, argv
[0], wifidump_extcap_interface
);
577 extcap_help_add_header(extcap_conf
, help_header
);
579 extcap_help_add_option(extcap_conf
, "--help", "print this help");
580 extcap_help_add_option(extcap_conf
, "--version", "print the version");
581 extcap_help_add_option(extcap_conf
, "--remote-host <host>", "the remote SSH host");
582 extcap_help_add_option(extcap_conf
, "--remote-port <port>", "the remote SSH port");
583 extcap_help_add_option(extcap_conf
, "--remote-username <username>", "the remote SSH username");
584 extcap_help_add_option(extcap_conf
, "--remote-password <password>", "the remote SSH password. If not specified, ssh-agent and ssh-key are used");
585 extcap_help_add_option(extcap_conf
, "--sshkey <public key path>", "the path of the ssh key");
586 extcap_help_add_option(extcap_conf
, "--sshkey-passphrase <public key passphrase>", "the passphrase to unlock public ssh");
587 extcap_help_add_option(extcap_conf
, "--ssh-sha1", "support keys and key exchange using SHA-1 (deprecated)");
588 extcap_help_add_option(extcap_conf
, "--remote-interface <iface>", "the remote capture interface");
589 extcap_help_add_option(extcap_conf
, "--remote-channel-frequency <channel_frequency>", "the remote channel frequency in MHz");
590 extcap_help_add_option(extcap_conf
, "--remote-channel-width <channel_width>", "the remote channel width in MHz");
591 extcap_help_add_option(extcap_conf
, "--remote-filter <filter>", "a filter for remote capture");
592 extcap_help_add_option(extcap_conf
, "--remote-count <count>", "the number of frames to capture");
598 extcap_help_print(extcap_conf
);
602 while ((result
= ws_getopt_long(argc
, argv
, ":", longopts
, &option_idx
)) != -1) {
607 extcap_help_print(extcap_conf
);
612 extcap_version_print(extcap_conf
);
616 case OPT_REMOTE_HOST
:
617 g_free(ssh_params
->host
);
618 ssh_params
->host
= g_strdup(ws_optarg
);
621 case OPT_REMOTE_PORT
:
622 if (!ws_strtou16(ws_optarg
, NULL
, &ssh_params
->port
) || ssh_params
->port
== 0) {
623 ws_warning("Invalid port: %s", ws_optarg
);
628 case OPT_REMOTE_USERNAME
:
629 g_free(ssh_params
->username
);
630 ssh_params
->username
= g_strdup(ws_optarg
);
633 case OPT_REMOTE_PASSWORD
:
634 g_free(ssh_params
->password
);
635 ssh_params
->password
= g_strdup(ws_optarg
);
636 memset(ws_optarg
, 'X', strlen(ws_optarg
));
640 g_free(ssh_params
->sshkey_path
);
641 ssh_params
->sshkey_path
= g_strdup(ws_optarg
);
644 case OPT_SSHKEY_PASSPHRASE
:
645 g_free(ssh_params
->sshkey_passphrase
);
646 ssh_params
->sshkey_passphrase
= g_strdup(ws_optarg
);
647 memset(ws_optarg
, 'X', strlen(ws_optarg
));
651 ssh_params
->ssh_sha1
= true;
654 case OPT_REMOTE_INTERFACE
:
655 g_free(remote_interface
);
656 remote_interface
= g_strdup(ws_optarg
);
659 case OPT_REMOTE_CHANNEL_FREQUENCY
:
660 if (!ws_strtou16(ws_optarg
, NULL
, &remote_channel_frequency
)) {
661 ws_warning("Invalid channel frequency: %s", ws_optarg
);
666 case OPT_REMOTE_CHANNEL_WIDTH
:
667 if (!ws_strtou16(ws_optarg
, NULL
, &remote_channel_width
)) {
668 ws_warning("Invalid channel width: %s", ws_optarg
);
673 case OPT_REMOTE_FILTER
:
674 g_free(remote_filter
);
675 remote_filter
= g_strdup(ws_optarg
);
678 case OPT_REMOTE_COUNT
:
679 if (!ws_strtou32(ws_optarg
, NULL
, &count
)) {
680 ws_warning("Invalid value for count: %s", ws_optarg
);
686 /* missing option argument */
687 ws_warning("Option '%s' requires an argument", argv
[ws_optind
- 1]);
691 if (!extcap_base_parse_options(extcap_conf
, result
- EXTCAP_OPT_LIST_INTERFACES
, ws_optarg
)) {
692 ws_warning("Invalid option: %s", argv
[ws_optind
- 1]);
698 extcap_cmdline_debug(argv
, argc
);
700 if (extcap_base_handle_interface(extcap_conf
)) {
705 if (extcap_conf
->show_config
) {
706 ret
= list_config(extcap_conf
->interface
);
710 err_msg
= ws_init_sockets();
711 if (err_msg
!= NULL
) {
712 ws_warning("ERROR: %s", err_msg
);
714 ws_warning("%s", please_report_bug());
718 if (extcap_conf
->capture
) {
721 if (!ssh_params
->host
) {
722 ws_warning("Missing parameter: --remote-host");
725 remote_center_frequency
= center_freq(remote_channel_frequency
, remote_channel_width
);
726 filter
= concat_filters(extcap_conf
->capture_filter
, remote_filter
);
727 ssh_params_set_log_level(ssh_params
, extcap_conf
->debug
);
728 ret
= ssh_open_remote_connection(ssh_params
, remote_capture_functions
,
729 remote_interface
, remote_channel_frequency
, remote_channel_width
, remote_center_frequency
,
730 filter
, count
, extcap_conf
->fifo
);
733 ws_debug("You should not come here... maybe some parameter missing?");
739 ssh_params_free(ssh_params
);
740 g_free(remote_interface
);
741 g_free(remote_filter
);
742 extcap_base_cleanup(&extcap_conf
);
747 * Editor modelines - https://www.wireshark.org/tools/modelines.html
752 * indent-tabs-mode: t
755 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
756 * :indentSize=8:tabSize=8:noTabs=false: