Add Copyright and modelines (Fix also indent to use 4 spaces)

svn path=/trunk/; revision=54038
This commit is contained in:
Alexis La Goutte 2013-12-13 11:29:11 +00:00
parent 894bc27bd7
commit 4f32d662fa
12 changed files with 464 additions and 32 deletions

View File

@ -1,3 +1,26 @@
/* sctp_all_assocs_dialog.cpp
*
* $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "sctp_all_assocs_dialog.h"
#include "ui_sctp_all_assocs_dialog.h"
#include "sctp_assoc_analyse_dialog.h"
@ -37,34 +60,34 @@ void SCTPAllAssocsDialog::fillTable()
sctp_assoc_info_t* assinfo;
int numAssocs;
ui->assocList->setColumnHidden(0, true);
ui->assocList->setColumnHidden(0, true);
ui->assocList->setColumnWidth(1, 85);
ui->assocList->setColumnWidth(2, 85);
ui->assocList->setColumnWidth(3, 150);
ui->assocList->setColumnWidth(4, 150);
sctp_assocs = (sctp_allassocs_info_t*)sctp_stat_get_info();
if (sctp_stat_get_info()->is_registered == FALSE) {
register_tap_listener_sctp_stat();
}
/* (redissect all packets) */
cf_retap_packets(cap_file_);
numAssocs = 0;
ui->assocList->setRowCount(g_list_length(sctp_assocs->assoc_info_list));
list = g_list_first(sctp_assocs->assoc_info_list);
sctp_assocs = (sctp_allassocs_info_t*)sctp_stat_get_info();
if (sctp_stat_get_info()->is_registered == FALSE) {
register_tap_listener_sctp_stat();
}
/* (redissect all packets) */
cf_retap_packets(cap_file_);
numAssocs = 0;
ui->assocList->setRowCount(g_list_length(sctp_assocs->assoc_info_list));
while (list) {
assinfo = (sctp_assoc_info_t*)(list->data);
ui->assocList->setItem(numAssocs, 0, new QTableWidgetItem(QString("%1").arg(assinfo->assoc_id)));
ui->assocList->setItem(numAssocs, 1, new QTableWidgetItem(QString("%1").arg(assinfo->port1)));
ui->assocList->setItem(numAssocs, 2, new QTableWidgetItem(QString("%1").arg(assinfo->port2)));
ui->assocList->setItem(numAssocs, 3, new QTableWidgetItem(QString("%1").arg(assinfo->n_packets)));
ui->assocList->setItem(numAssocs, 4, new QTableWidgetItem(QString("%1").arg(assinfo->n_data_chunks)));
ui->assocList->setItem(numAssocs, 5, new QTableWidgetItem(QString("%1").arg(assinfo->n_data_bytes)));
list = g_list_next(list);
numAssocs++;
}
list = g_list_first(sctp_assocs->assoc_info_list);
while (list) {
assinfo = (sctp_assoc_info_t*)(list->data);
ui->assocList->setItem(numAssocs, 0, new QTableWidgetItem(QString("%1").arg(assinfo->assoc_id)));
ui->assocList->setItem(numAssocs, 1, new QTableWidgetItem(QString("%1").arg(assinfo->port1)));
ui->assocList->setItem(numAssocs, 2, new QTableWidgetItem(QString("%1").arg(assinfo->port2)));
ui->assocList->setItem(numAssocs, 3, new QTableWidgetItem(QString("%1").arg(assinfo->n_packets)));
ui->assocList->setItem(numAssocs, 4, new QTableWidgetItem(QString("%1").arg(assinfo->n_data_chunks)));
ui->assocList->setItem(numAssocs, 5, new QTableWidgetItem(QString("%1").arg(assinfo->n_data_bytes)));
list = g_list_next(list);
numAssocs++;
}
ui->analyseButton->setEnabled(false);
ui->setFilterButton->setEnabled(false);
connect(ui->assocList, SIGNAL(itemSelectionChanged()), this, SLOT(getSelectedItem()));
@ -83,13 +106,13 @@ sctp_assoc_info_t* SCTPAllAssocsDialog::findSelectedAssoc()
id = (selection->data(0)).toInt();
list = g_list_first(sctp_assocs->assoc_info_list);
while (list) {
assinfo = (sctp_assoc_info_t*)(list->data);
if (assinfo->assoc_id == id) {
while (list) {
assinfo = (sctp_assoc_info_t*)(list->data);
if (assinfo->assoc_id == id) {
return assinfo;
}
list = g_list_next(list);
}
}
list = g_list_next(list);
}
return NULL;
}
@ -105,7 +128,7 @@ void SCTPAllAssocsDialog::getSelectedItem()
void SCTPAllAssocsDialog::on_analyseButton_clicked()
{
if (!selected_assoc) {
selected_assoc = findSelectedAssoc();
printf("on_analyseButton_clicked found assoc %p with id %d\n",
@ -142,3 +165,16 @@ void SCTPAllAssocsDialog::on_setFilterButton_clicked()
selected_assoc = NULL;
emit filterPackets(newFilter, false);
}
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -1,3 +1,26 @@
/* sctp_all_assocs_dialog.h
*
* $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef SCTP_ALL_ASSOCS_DIALOG_H
#define SCTP_ALL_ASSOCS_DIALOG_H
@ -50,3 +73,16 @@ signals:
};
#endif // SCTP_ALL_ASSOCS_DIALOG_H
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -1,3 +1,26 @@
/* sctp_assoc_analyse_dialog.cpp
*
* $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "sctp_assoc_analyse_dialog.h"
#include "ui_sctp_assoc_analyse_dialog.h"
#include "sctp_graph_dialog.h"
@ -35,7 +58,7 @@ SCTPAssocAnalyseDialog::~SCTPAssocAnalyseDialog()
void SCTPAssocAnalyseDialog::findAssocForPacket()
{
frame_data *fdata;
GList *list, *framelist;
GList *list, *framelist;
sctp_assoc_info_t *assoc;
bool frame_found = false;
printf("findAssocForPacket\n");
@ -47,7 +70,7 @@ void SCTPAssocAnalyseDialog::findAssocForPacket()
framelist = g_list_first(assoc->frame_numbers);
while (framelist) {
guint32 *fn;
guint32 *fn;
fn = (guint32 *)framelist->data;
if (*fn == fdata->num) {
frame_found = TRUE;
@ -149,7 +172,7 @@ void SCTPAssocAnalyseDialog::fillTabs()
list = g_list_first(selected_assoc->addr2);
while (list) {
address *store;
address *store;
store = (address *)(list->data);
if (store->type != AT_NONE) {
@ -290,3 +313,16 @@ void SCTPAssocAnalyseDialog::on_GraphArwnd_2_clicked()
{
openGraphArwndDialog(2);
}
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -1,3 +1,26 @@
/* sctp_assoc_analyse_dialog.h
*
* $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef SCTP_ASSOC_ANALYSE_DIALOG_H
#define SCTP_ASSOC_ANALYSE_DIALOG_H
@ -64,3 +87,16 @@ signals:
};
#endif // SCTP_ASSOC_ANALYSE_DIALOG_H
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -1,3 +1,26 @@
/* sctp_chunck_statistics_dialog.cpp
*
* $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "sctp_chunk_statistics_dialog.h"
#include "ui_sctp_chunk_statistics_dialog.h"
#include "uat_dialog.h"
@ -294,3 +317,16 @@ void SCTPChunkStatisticsDialog::on_actionShowAllChunkTypes_triggered()
initializeChunkMap();
fillTable(true);
}
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -1,3 +1,26 @@
/* sctp_chunck_statistics_dialog.h
*
* $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef SCTP_CHUNK_STATISTICS_DIALOG_H
#define SCTP_CHUNK_STATISTICS_DIALOG_H
@ -73,3 +96,16 @@ private:
};
#endif // SCTP_CHUNK_STATISTICS_DIALOG_H
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -1,3 +1,26 @@
/* sctp_graph_arwnd_dialog.cpp
*
* $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "sctp_graph_arwnd_dialog.h"
#include "ui_sctp_graph_arwnd_dialog.h"
@ -139,3 +162,16 @@ void SCTPGraphArwndDialog::on_saveButton_clicked()
{
SCTPGraphDialog::save_graph(this, ui->sctpPlot);
}
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -1,3 +1,26 @@
/* sctp_graph_arwn_dialog.h
*
* $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef SCTP_GRAPH_ARWND_DIALOG_H
#define SCTP_GRAPH_ARWND_DIALOG_H
@ -55,3 +78,16 @@ private:
};
#endif // SCTP_GRAPH_DIALOG_H
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -1,3 +1,26 @@
/* sctp_graph_byte_dialog.cpp
*
* $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "sctp_graph_byte_dialog.h"
#include "ui_sctp_graph_byte_dialog.h"
@ -144,3 +167,16 @@ void SCTPGraphByteDialog::on_saveButton_clicked()
{
SCTPGraphDialog::save_graph(this, ui->sctpPlot);
}
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -1,3 +1,26 @@
/* sctp_graph_byte_dialog.h
*
* $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef SCTP_GRAPH_BYTE_DIALOG_H
#define SCTP_GRAPH_BYTE_DIALOG_H
@ -53,3 +76,16 @@ private:
};
#endif // SCTP_GRAPH_DIALOG_H
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -1,3 +1,26 @@
/* sctp_graph_dialog.cpp
*
* $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "sctp_graph_dialog.h"
#include "ui_sctp_graph_dialog.h"
@ -397,3 +420,16 @@ void SCTPGraphDialog::on_saveButton_clicked()
{
save_graph(this, ui->sctpPlot);
}
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -1,3 +1,26 @@
/* sctp_graph_dialog.h
*
* $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef SCTP_GRAPH_DIALOG_H
#define SCTP_GRAPH_DIALOG_H
@ -112,3 +135,16 @@ private:
};
#endif // SCTP_GRAPH_DIALOG_H
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/