forked from osmocom/wireshark
Clean up indentation.
Make "reset()" static (it's not used outside "sctp_stat.c"), and fix its prototype to match what's expected for a reset routine passed to "register_tap_listener()". Similarly, fix the prototypes of other routines passed to "register_tap_listener()", and get rid of the casts of pointers to those functions to "void *". Fix some declarations in "sctp_stat.h" to have function prototypes. svn path=/trunk/; revision=13319
This commit is contained in:
parent
c3440553eb
commit
a6694a746f
|
@ -94,6 +94,7 @@ sctp_error_on_unselect(GtkButton *button _U_, gpointer user_data _U_)
|
|||
void sctp_error_dlg_update(GList *list)
|
||||
{
|
||||
GList *ilist=NULL;
|
||||
|
||||
printf("dlg_update\n");
|
||||
if (sctp_error_dlg != NULL) {
|
||||
gtk_clist_clear(GTK_CLIST(clist));
|
||||
|
@ -250,8 +251,6 @@ gtk_sctperror_dlg(void)
|
|||
SIGNAL_CONNECT(bt_close, "clicked", sctp_error_on_close, NULL);
|
||||
|
||||
sctp_error_dlg = sctp_error_dlg_w;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -259,7 +258,6 @@ void sctp_error_dlg_show(sctp_assoc_info_t* assoc)
|
|||
{
|
||||
GList *list;
|
||||
|
||||
|
||||
/* selected_assoc=(sctp_assoc_info_t*)get_selected_assoc(); */
|
||||
list =assoc->error_info_list;
|
||||
if (list != NULL)
|
||||
|
|
|
@ -159,6 +159,7 @@ void free_first(gpointer data, gpointer user_data _U_)
|
|||
void tsn_free(gpointer data, gpointer user_data _U_)
|
||||
{
|
||||
tsn_t *tsn;
|
||||
|
||||
tsn = (tsn_t *) data;
|
||||
if (tsn->tsns!=NULL)
|
||||
{
|
||||
|
@ -168,9 +169,10 @@ tsn_t *tsn;
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
reset(sctp_allassocs_info_t *tapdata )
|
||||
static void
|
||||
reset(void *arg)
|
||||
{
|
||||
sctp_allassocs_info_t *tapdata = arg;
|
||||
GList* list;
|
||||
sctp_assoc_info_t * info;
|
||||
|
||||
|
@ -736,6 +738,7 @@ GList *list;
|
|||
struct v4addr *v4=NULL, *v4add=NULL;
|
||||
struct v6addr *v6=NULL, *v6add=NULL;
|
||||
address *v=NULL;
|
||||
|
||||
if (direction == 1)
|
||||
list = g_list_first(info->addr1);
|
||||
else
|
||||
|
@ -790,7 +793,7 @@ address *v=NULL;
|
|||
}
|
||||
|
||||
static int
|
||||
packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , void *data _U_)
|
||||
packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const void *data _U_)
|
||||
{
|
||||
struct _sctp_info *sctp_info;
|
||||
guint32 chunk_number=0, ip, tsnumber;
|
||||
|
@ -810,7 +813,6 @@ gboolean datachunk=FALSE;
|
|||
guint32 max;
|
||||
struct tsn_sort tsn_s;
|
||||
|
||||
|
||||
sctp_allassocs_info_t *assoc_info=NULL;
|
||||
assoc_info = &sctp_tapinfo_struct;
|
||||
|
||||
|
@ -1379,7 +1381,7 @@ gtk_sctpstat_init(char *dummy _U_)
|
|||
|
||||
}
|
||||
|
||||
static void sctp_update(void)
|
||||
static void sctp_update(void *dummy _U_)
|
||||
{
|
||||
if (get_stat_dlg()!=NULL)
|
||||
sctp_stat_dlg_update();
|
||||
|
@ -1393,13 +1395,11 @@ GString *error_string;
|
|||
if (!sctp_tapinfo_struct.is_registered)
|
||||
{
|
||||
register_ethereal_tap("sctp",gtk_sctpstat_init);
|
||||
if ((error_string = register_tap_listener("sctp", &sctp_tapinfo_struct, NULL, (void *)reset, packet, (void *)sctp_update))) {
|
||||
if ((error_string = register_tap_listener("sctp", &sctp_tapinfo_struct, NULL, reset, packet, sctp_update))) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return;
|
||||
}
|
||||
sctp_tapinfo_struct.is_registered=TRUE;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -286,9 +286,6 @@ void sctp_stat_scan(void);
|
|||
|
||||
void remove_tap_listener_sctp_stat(void);
|
||||
|
||||
void reset(sctp_allassocs_info_t *tapdata _U_);
|
||||
|
||||
|
||||
void assoc_analyse(sctp_assoc_info_t* assoc);
|
||||
|
||||
const sctp_assoc_info_t* get_selected_assoc(void);
|
||||
|
@ -297,7 +294,7 @@ void create_graph(guint16 dir, struct sctp_analyse* u_data);
|
|||
|
||||
void create_byte_graph(guint16 dir, struct sctp_analyse* u_data);
|
||||
|
||||
void sctp_error_dlg_show();
|
||||
void sctp_error_dlg_show(sctp_assoc_info_t* assoc);
|
||||
|
||||
void sctp_stat_dlg_update(void);
|
||||
|
||||
|
@ -315,11 +312,10 @@ void set_child(struct sctp_udata *child, struct sctp_analyse *parent);
|
|||
|
||||
void remove_child(struct sctp_udata *child, struct sctp_analyse *parent);
|
||||
|
||||
void decrease_analyse_childcount();
|
||||
void decrease_analyse_childcount(void);
|
||||
|
||||
void increase_analyse_childcount();
|
||||
void increase_analyse_childcount(void);
|
||||
|
||||
void set_analyse_child(struct sctp_analyse *child);
|
||||
|
||||
void remove_analyse_child(struct sctp_analyse *child);
|
||||
|
||||
|
|
Loading…
Reference in New Issue