ConversationDialog::ConversationDialog(QWidget &parent, CaptureFile &cf, int cli_proto_id, const char *filter) : TrafficTableDialog(parent, cf, filter, table_name_) { follow_bt_ = buttonBox()->addButton(tr("Follow Stream..."), QDialogButtonBox::ActionRole); follow_bt_->setToolTip(tr("Follow a TCP or UDP stream.")); connect(follow_bt_, SIGNAL(clicked()), this, SLOT(followStream())); graph_bt_ = buttonBox()->addButton(tr("Graph..."), QDialogButtonBox::ActionRole); graph_bt_->setToolTip(tr("Graph a TCP conversation.")); connect(graph_bt_, SIGNAL(clicked()), this, SLOT(graphTcp())); QList<int> conv_protos; for (GList *conv_tab = recent.conversation_tabs; conv_tab; conv_tab = conv_tab->next) { int proto_id = proto_get_id_by_short_name((const char *)conv_tab->data); if (proto_id > -1 && !conv_protos.contains(proto_id)) { conv_protos.append(proto_id); } } if (conv_protos.isEmpty()) { conv_protos = defaultProtos(); } // Bring the command-line specified type to the front. if (get_conversation_by_proto_id(cli_proto_id)) { conv_protos.removeAll(cli_proto_id); conv_protos.prepend(cli_proto_id); } // QTabWidget selects the first item by default. foreach (int conv_proto, conv_protos) { addTrafficTable(get_conversation_by_proto_id(conv_proto)); }
EndpointDialog::EndpointDialog(QWidget &parent, CaptureFile &cf, int cli_proto_id, const char *filter) : TrafficTableDialog(parent, cf, filter, table_name_) { #ifdef HAVE_GEOIP map_bt_ = buttonBox()->addButton(tr("Map"), QDialogButtonBox::ActionRole); map_bt_->setToolTip(tr("Draw IPv4 or IPv6 endpoints on a map.")); connect(map_bt_, SIGNAL(clicked()), this, SLOT(createMap())); connect(trafficTableTabWidget(), SIGNAL(currentChanged(int)), this, SLOT(tabChanged())); #endif QList<int> endp_protos; for (GList *endp_tab = recent.endpoint_tabs; endp_tab; endp_tab = endp_tab->next) { int proto_id = proto_get_id_by_short_name((const char *)endp_tab->data); if (proto_id > -1 && !endp_protos.contains(proto_id)) { endp_protos.append(proto_id); } } if (endp_protos.isEmpty()) { endp_protos = defaultProtos(); } // Bring the command-line specified type to the front. if (get_conversation_by_proto_id(cli_proto_id)) { endp_protos.removeAll(cli_proto_id); endp_protos.prepend(cli_proto_id); } // QTabWidget selects the first item by default. foreach (int endp_proto, endp_protos) { addTrafficTable(get_conversation_by_proto_id(endp_proto)); }
EndpointDialog::EndpointDialog(QWidget *parent, capture_file *cf, int cli_proto_id, const char *filter) : TrafficTableDialog(parent, cf, filter, table_name_) { QList<int> endp_protos; for (GList *endp_tab = recent.endpoint_tabs; endp_tab; endp_tab = endp_tab->next) { int proto_id = proto_get_id_by_short_name((const char *)endp_tab->data); if (proto_id > -1 && !endp_protos.contains(proto_id)) { endp_protos.append(proto_id); } } if (endp_protos.isEmpty()) { endp_protos = defaultProtos(); } // Bring the command-line specified type to the front. if (get_conversation_by_proto_id(cli_proto_id)) { endp_protos.removeAll(cli_proto_id); endp_protos.prepend(cli_proto_id); } // QTabWidget selects the first item by default. foreach (int endp_proto, endp_protos) { addTrafficTable(get_conversation_by_proto_id(endp_proto)); }