forked from osmocom/wireshark
dumpcap: improve some secondary error emssages.
For "PacketReceivePacket error: The device has been removed. (1617)",
report the error in that fashion, indicate that the interface is no
longer attached, *and* suggest that this may be an Npcap bug and that
the user should report it as such; give the URL for the Npcap issue
list.
For "The other host terminated the connection", report the error in that
fashion, and suggest that it might be a problem with the host on which
the capture is being done.
Hopefully this will mean fewer bugs filed as *Wireshark* bugs for those
issues.
(And, with any new capture API in libpcap, these should all turn into
specific PCAP_ERROR_ codes, to make it easier to detect them in callers
of libpcap.)
(cherry picked from commit 152fd1fdab
)
This commit is contained in:
parent
653071f630
commit
ebba9d3f45
10
dumpcap.c
10
dumpcap.c
|
@ -4042,6 +4042,16 @@ capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct
|
|||
report_capture_error("The network adapter on which the capture was being done "
|
||||
"is no longer attached; the capture has stopped.",
|
||||
"");
|
||||
} else if (strcmp(cap_err_str, "PacketReceivePacket error: The device has been removed. (1617)") == 0) {
|
||||
report_capture_error(cap_err_str,
|
||||
"The network adapter on which the capture was being done "
|
||||
"is no longer attached; the capture has stopped.\n\n"
|
||||
"This may be a bug in Npcap: please report it "
|
||||
"as an issue at https://github.com/nmap/npcap/issues");
|
||||
} else if (strcmp(cap_err_str, "The other host terminated the connection") == 0) {
|
||||
report_capture_error(cap_err_str,
|
||||
"This may be a problem with the remote host "
|
||||
"on which you are capturing packets.");
|
||||
} else {
|
||||
g_snprintf(errmsg, sizeof(errmsg), "Error while capturing packets: %s",
|
||||
cap_err_str);
|
||||
|
|
Loading…
Reference in New Issue