aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2018-12-27 11:34:09 -0500
committerAnders Broman <a.broman58@gmail.com>2018-12-29 08:16:01 +0000
commit785621dcca96d3e735c4a6dc2da31c44238e1eb9 (patch)
treedef08e8b30753bf281ce049582bfc4409e3095ed /ui
parentd68a8a36054a26e520647a9402e9e405efd8cf3e (diff)
Add interface name when outputting packets dropped.
Add interface name (colon delimited) to SP_DROPS ('D') message so when dropped packets are outputted, they include the interface name for clarity. Bug: 13498 Change-Id: I68cdde4f20a574580f089dc5096d815cde5d3357 Reviewed-on: https://code.wireshark.org/review/31218 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/capture.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/capture.c b/ui/capture.c
index 2478733b0f..5ad5c42afc 100644
--- a/ui/capture.c
+++ b/ui/capture.c
@@ -527,9 +527,13 @@ capture_input_new_packets(capture_session *cap_session, int to_read)
/* Capture child told us how many dropped packets it counted.
*/
void
-capture_input_drops(capture_session *cap_session, guint32 dropped)
+capture_input_drops(capture_session *cap_session, guint32 dropped, char* interface_name)
{
- g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_INFO, "%u packet%s dropped", dropped, plurality(dropped, "", "s"));
+ if (interface_name != NULL) {
+ g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_INFO, "%u packet%s dropped from %s", dropped, plurality(dropped, "", "s"), interface_name);
+ } else {
+ g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_INFO, "%u packet%s dropped", dropped, plurality(dropped, "", "s"));
+ }
g_assert(cap_session->state == CAPTURE_RUNNING);