aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2014-10-12 14:56:12 -0400
committerBill Meier <wmeier@newsguy.com>2014-10-12 18:58:32 +0000
commit1b8b2a8aa8b3b21647070c8cb85de7d43cdd480e (patch)
treeae637d5385d32d07db062bd4aaeed94b312b9c15 /ui
parent4e328e47098501c65f751774b8a13493f44b7214 (diff)
Add editor modelines; Adjust whitespace as needed.
Change-Id: I4da7b335d905dbca10bbce03aa88e1cdeeb1f8ad Reviewed-on: https://code.wireshark.org/review/4626 Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/capture.c13
-rw-r--r--ui/capture.h31
-rw-r--r--ui/capture_ui_utils.c13
-rw-r--r--ui/capture_ui_utils.h13
-rw-r--r--ui/decode_as_utils.h13
-rw-r--r--ui/filters.c47
-rw-r--r--ui/filters.h31
-rw-r--r--ui/persfilepath_opt.c13
-rw-r--r--ui/persfilepath_opt.h13
-rw-r--r--ui/preference_utils.h13
-rw-r--r--ui/profile.h29
-rw-r--r--ui/proto_hier_stats.c15
-rw-r--r--ui/proto_hier_stats.h15
-rw-r--r--ui/recent.c429
-rw-r--r--ui/rtp_analysis.h144
-rw-r--r--ui/rtp_stream.h78
-rw-r--r--ui/tap-megaco-common.c22
-rw-r--r--ui/tap-megaco-common.h81
-rw-r--r--ui/tap-rtp-common.h13
-rw-r--r--ui/tap-sctp-analysis.c17
-rw-r--r--ui/tap-sctp-analysis.h374
-rw-r--r--ui/time_shift.h13
22 files changed, 856 insertions, 574 deletions
diff --git a/ui/capture.c b/ui/capture.c
index d2dcdfd953..cfc75b979d 100644
--- a/ui/capture.c
+++ b/ui/capture.c
@@ -797,3 +797,16 @@ capture_stat_stop(if_stat_cache_t *sc) {
}
#endif /* HAVE_LIBPCAP */
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/ui/capture.h b/ui/capture.h
index 6aaa5035be..f29d99f64b 100644
--- a/ui/capture.h
+++ b/ui/capture.h
@@ -37,15 +37,15 @@ extern "C" {
#endif /* __cplusplus */
typedef enum {
- capture_cb_capture_prepared,
- capture_cb_capture_update_started,
- capture_cb_capture_update_continue,
- capture_cb_capture_update_finished,
- capture_cb_capture_fixed_started,
- capture_cb_capture_fixed_continue,
- capture_cb_capture_fixed_finished,
- capture_cb_capture_stopping,
- capture_cb_capture_failed
+ capture_cb_capture_prepared,
+ capture_cb_capture_update_started,
+ capture_cb_capture_update_continue,
+ capture_cb_capture_update_finished,
+ capture_cb_capture_fixed_started,
+ capture_cb_capture_fixed_continue,
+ capture_cb_capture_fixed_finished,
+ capture_cb_capture_stopping,
+ capture_cb_capture_failed
} capture_cbs;
typedef void (*capture_callback_t) (gint event, capture_session *cap_session,
@@ -105,4 +105,17 @@ void capture_stat_stop(if_stat_cache_t *sc);
}
#endif /* __cplusplus */
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
+
#endif /* capture.h */
diff --git a/ui/capture_ui_utils.c b/ui/capture_ui_utils.c
index 6f1fae83fb..69eb547280 100644
--- a/ui/capture_ui_utils.c
+++ b/ui/capture_ui_utils.c
@@ -495,3 +495,16 @@ get_iface_description_for_interface(capture_options *capture_opts, guint i)
}
#endif /* HAVE_LIBPCAP */
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/ui/capture_ui_utils.h b/ui/capture_ui_utils.h
index 5be8fe1579..211f805b03 100644
--- a/ui/capture_ui_utils.h
+++ b/ui/capture_ui_utils.h
@@ -123,4 +123,17 @@ const char *get_iface_description_for_interface(capture_options *capture_opts, g
}
#endif /* __cplusplus */
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
+
#endif /* __CAPTURE_UI_UTILS_H__ */
diff --git a/ui/decode_as_utils.h b/ui/decode_as_utils.h
index 729c20da5b..f6b86b4022 100644
--- a/ui/decode_as_utils.h
+++ b/ui/decode_as_utils.h
@@ -77,4 +77,17 @@ void decode_clear_all(void);
}
#endif /* __cplusplus */
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
+
#endif /* __DECODE_AS_UTILS_H__ */
diff --git a/ui/filters.c b/ui/filters.c
index 3618013ad0..22969348ab 100644
--- a/ui/filters.c
+++ b/ui/filters.c
@@ -600,25 +600,38 @@ save_filter_list(filter_list_type_t list_type, char **pref_path_return,
*/
void copy_filter_list(filter_list_type_t dest_type, filter_list_type_t src_type)
{
- GList **flpp_dest;
- GList **flpp_src;
- GList *flp_src;
- filter_def *filt;
+ GList **flpp_dest;
+ GList **flpp_src;
+ GList *flp_src;
+ filter_def *filt;
- g_assert(dest_type != src_type);
+ g_assert(dest_type != src_type);
- flpp_dest = get_filter_list(dest_type);
- flpp_src = get_filter_list(src_type);
- /* throw away the "old" destination list - a NULL list is ok here */
- while(*flpp_dest) {
- *flpp_dest = remove_filter_entry(*flpp_dest, g_list_first(*flpp_dest));
- }
- g_assert(g_list_length(*flpp_dest) == 0);
+ flpp_dest = get_filter_list(dest_type);
+ flpp_src = get_filter_list(src_type);
+ /* throw away the "old" destination list - a NULL list is ok here */
+ while(*flpp_dest) {
+ *flpp_dest = remove_filter_entry(*flpp_dest, g_list_first(*flpp_dest));
+ }
+ g_assert(g_list_length(*flpp_dest) == 0);
- /* copy the list entries */
- for(flp_src = g_list_first(*flpp_src); flp_src; flp_src = g_list_next(flp_src)) {
- filt = (filter_def *)(flp_src->data);
+ /* copy the list entries */
+ for(flp_src = g_list_first(*flpp_src); flp_src; flp_src = g_list_next(flp_src)) {
+ filt = (filter_def *)(flp_src->data);
- *flpp_dest = add_filter_entry(*flpp_dest, filt->name, filt->strval);
- }
+ *flpp_dest = add_filter_entry(*flpp_dest, filt->name, filt->strval);
+ }
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/ui/filters.h b/ui/filters.h
index bc8e797258..38e361867f 100644
--- a/ui/filters.h
+++ b/ui/filters.h
@@ -31,18 +31,18 @@ extern "C" {
* Filter lists.
*/
typedef enum {
- CFILTER_LIST, /* capture filter list - saved */
- DFILTER_LIST, /* display filter list - saved */
- CFILTER_EDITED_LIST, /* capture filter list - currently edited */
- DFILTER_EDITED_LIST /* display filter list - currently edited */
+ CFILTER_LIST, /* capture filter list - saved */
+ DFILTER_LIST, /* display filter list - saved */
+ CFILTER_EDITED_LIST, /* capture filter list - currently edited */
+ DFILTER_EDITED_LIST /* display filter list - currently edited */
} filter_list_type_t;
/*
* Item in a list of filters.
*/
typedef struct {
- char *name; /* filter name */
- char *strval; /* filter expression */
+ char *name; /* filter name */
+ char *strval; /* filter expression */
} filter_def;
/*
@@ -54,7 +54,7 @@ typedef struct {
* and "*errno_return" is set to the error.
*/
void read_filter_list(filter_list_type_t list_type, char **pref_path_return,
- int *errno_return);
+ int *errno_return);
/*
* Get a pointer to the first entry in a filter list.
@@ -66,7 +66,7 @@ GList *get_filter_list_first(filter_list_type_t list);
* Returns a pointer to the newly-added entry.
*/
GList *add_to_filter_list(filter_list_type_t list, const char *name,
- const char *expression);
+ const char *expression);
/*
* Remove a filter from a list.
@@ -82,7 +82,7 @@ void remove_from_filter_list(filter_list_type_t list, GList *fl_entry);
* and "*errno_return" is set to the error.
*/
void save_filter_list(filter_list_type_t list_type, char **pref_path_return,
- int *errno_return);
+ int *errno_return);
/*
* Clone the filter list so it can be edited.
@@ -93,4 +93,17 @@ void copy_filter_list(filter_list_type_t dest_type, filter_list_type_t src_type)
}
#endif /* __cplusplus */
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
+
#endif /* __UI_FILTERS_H__ */
diff --git a/ui/persfilepath_opt.c b/ui/persfilepath_opt.c
index 2078eb9d28..cbd894e58f 100644
--- a/ui/persfilepath_opt.c
+++ b/ui/persfilepath_opt.c
@@ -90,3 +90,16 @@ persfilepath_opt(int opt _U_, const char *optstr)
*colonp = ':'; /* put the colon back */
return TRUE;
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/ui/persfilepath_opt.h b/ui/persfilepath_opt.h
index faa3b38fd0..03555800a4 100644
--- a/ui/persfilepath_opt.h
+++ b/ui/persfilepath_opt.h
@@ -39,4 +39,17 @@ extern gboolean persfilepath_opt(int opt, const char *optstr);
}
#endif /* __cplusplus */
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
+
#endif /* PERSFILEPATH_OPT_H */
diff --git a/ui/preference_utils.h b/ui/preference_utils.h
index 9fc7a6b66b..098bcbc600 100644
--- a/ui/preference_utils.h
+++ b/ui/preference_utils.h
@@ -108,4 +108,17 @@ void column_prefs_remove_nth(gint col);
}
#endif /* __cplusplus */
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
+
#endif /* __PREFRENCE_UTILS_H__ */
diff --git a/ui/profile.h b/ui/profile.h
index 81b127cba5..f3295306dd 100644
--- a/ui/profile.h
+++ b/ui/profile.h
@@ -40,11 +40,11 @@ extern "C" {
#define PROF_STAT_COPY 5
typedef struct {
- char *name; /* profile name */
- char *reference; /* profile reference */
- int status;
- gboolean is_global;
- gboolean from_global;
+ char *name; /* profile name */
+ char *reference; /* profile reference */
+ int status;
+ gboolean is_global;
+ gboolean from_global;
} profile_def;
/** @file
@@ -66,8 +66,8 @@ void init_profile_list(void);
*
* @return A pointer to the new profile list
*/
-GList * add_to_profile_list(const char *name, const char *parent, int status,
- gboolean is_global, gboolean from_global);
+GList *add_to_profile_list(const char *name, const char *parent, int status,
+ gboolean is_global, gboolean from_global);
/** Refresh the current (non-edited) profile list.
*/
@@ -89,7 +89,7 @@ void remove_from_profile_list(GList *fl_entry);
*
* @return The head of the current profile list
*/
-GList * current_profile_list(void);
+GList *current_profile_list(void);
/** Edited profile list
*
@@ -128,4 +128,17 @@ gboolean delete_current_profile(void);
}
#endif /* __cplusplus */
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
+
#endif /* __PROFILE_H__ */
diff --git a/ui/proto_hier_stats.c b/ui/proto_hier_stats.c
index c083de2fec..3118003570 100644
--- a/ui/proto_hier_stats.c
+++ b/ui/proto_hier_stats.c
@@ -293,7 +293,7 @@ ph_stats_new(void)
}
/* We're done calculating the statistics; destroy the progress bar
- if it was created. */
+ if it was created. */
if (progbar != NULL)
destroy_progress_dlg(progbar);
@@ -337,3 +337,16 @@ ph_stats_free(ph_stats_t *ps)
g_free(ps);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/ui/proto_hier_stats.h b/ui/proto_hier_stats.h
index 36302d0527..dd10903971 100644
--- a/ui/proto_hier_stats.h
+++ b/ui/proto_hier_stats.h
@@ -42,8 +42,21 @@ typedef struct {
} ph_stats_t;
-ph_stats_t* ph_stats_new(void);
+ph_stats_t *ph_stats_new(void);
void ph_stats_free(ph_stats_t *ps);
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
+
#endif /* __UI_PROTO_HIER_STATS_H__ */
diff --git a/ui/recent.c b/ui/recent.c
index a115ee19e6..45193bf95c 100644
--- a/ui/recent.c
+++ b/ui/recent.c
@@ -48,39 +48,39 @@
#include <wsutil/file_util.h>
#include <wsutil/str_util.h>
-#define RECENT_KEY_MAIN_TOOLBAR_SHOW "gui.toolbar_main_show"
-#define RECENT_KEY_FILTER_TOOLBAR_SHOW "gui.filter_toolbar_show"
-#define RECENT_KEY_WIRELESS_TOOLBAR_SHOW "gui.wireless_toolbar_show"
-#define RECENT_KEY_DRIVER_CHECK_SHOW "gui.airpcap_driver_check_show"
-#define RECENT_KEY_PACKET_LIST_SHOW "gui.packet_list_show"
-#define RECENT_KEY_TREE_VIEW_SHOW "gui.tree_view_show"
-#define RECENT_KEY_BYTE_VIEW_SHOW "gui.byte_view_show"
-#define RECENT_KEY_STATUSBAR_SHOW "gui.statusbar_show"
-#define RECENT_KEY_PACKET_LIST_COLORIZE "gui.packet_list_colorize"
-#define RECENT_GUI_TIME_FORMAT "gui.time_format"
-#define RECENT_GUI_TIME_PRECISION "gui.time_precision"
-#define RECENT_GUI_SECONDS_FORMAT "gui.seconds_format"
-#define RECENT_GUI_ZOOM_LEVEL "gui.zoom_level"
-#define RECENT_GUI_BYTES_VIEW "gui.bytes_view"
-#define RECENT_GUI_GEOMETRY_MAIN_X "gui.geometry_main_x"
-#define RECENT_GUI_GEOMETRY_MAIN_Y "gui.geometry_main_y"
-#define RECENT_GUI_GEOMETRY_MAIN_WIDTH "gui.geometry_main_width"
-#define RECENT_GUI_GEOMETRY_MAIN_HEIGHT "gui.geometry_main_height"
-#define RECENT_GUI_GEOMETRY_MAIN_MAXIMIZED "gui.geometry_main_maximized"
-#define RECENT_GUI_GEOMETRY_MAIN_UPPER_PANE "gui.geometry_main_upper_pane"
-#define RECENT_GUI_GEOMETRY_MAIN_LOWER_PANE "gui.geometry_main_lower_pane"
+#define RECENT_KEY_MAIN_TOOLBAR_SHOW "gui.toolbar_main_show"
+#define RECENT_KEY_FILTER_TOOLBAR_SHOW "gui.filter_toolbar_show"
+#define RECENT_KEY_WIRELESS_TOOLBAR_SHOW "gui.wireless_toolbar_show"
+#define RECENT_KEY_DRIVER_CHECK_SHOW "gui.airpcap_driver_check_show"
+#define RECENT_KEY_PACKET_LIST_SHOW "gui.packet_list_show"
+#define RECENT_KEY_TREE_VIEW_SHOW "gui.tree_view_show"
+#define RECENT_KEY_BYTE_VIEW_SHOW "gui.byte_view_show"
+#define RECENT_KEY_STATUSBAR_SHOW "gui.statusbar_show"
+#define RECENT_KEY_PACKET_LIST_COLORIZE "gui.packet_list_colorize"
+#define RECENT_GUI_TIME_FORMAT "gui.time_format"
+#define RECENT_GUI_TIME_PRECISION "gui.time_precision"
+#define RECENT_GUI_SECONDS_FORMAT "gui.seconds_format"
+#define RECENT_GUI_ZOOM_LEVEL "gui.zoom_level"
+#define RECENT_GUI_BYTES_VIEW "gui.bytes_view"
+#define RECENT_GUI_GEOMETRY_MAIN_X "gui.geometry_main_x"
+#define RECENT_GUI_GEOMETRY_MAIN_Y "gui.geometry_main_y"
+#define RECENT_GUI_GEOMETRY_MAIN_WIDTH "gui.geometry_main_width"
+#define RECENT_GUI_GEOMETRY_MAIN_HEIGHT "gui.geometry_main_height"
+#define RECENT_GUI_GEOMETRY_MAIN_MAXIMIZED "gui.geometry_main_maximized"
+#define RECENT_GUI_GEOMETRY_MAIN_UPPER_PANE "gui.geometry_main_upper_pane"
+#define RECENT_GUI_GEOMETRY_MAIN_LOWER_PANE "gui.geometry_main_lower_pane"
#define RECENT_GUI_GEOMETRY_STATUS_PANE_LEFT "gui.geometry_status_pane"
#define RECENT_GUI_GEOMETRY_STATUS_PANE_RIGHT "gui.geometry_status_pane_right"
-#define RECENT_GUI_GEOMETRY_WLAN_STATS_PANE "gui.geometry_status_wlan_stats_pane"
-#define RECENT_LAST_USED_PROFILE "gui.last_used_profile"
-#define RECENT_GUI_FILEOPEN_REMEMBERED_DIR "gui.fileopen_remembered_dir"
-#define RECENT_GUI_CONVERSATION_TABS "gui.conversation_tabs"
-#define RECENT_GUI_ENDPOINT_TABS "gui.endpoint_tabs"
+#define RECENT_GUI_GEOMETRY_WLAN_STATS_PANE "gui.geometry_status_wlan_stats_pane"
+#define RECENT_LAST_USED_PROFILE "gui.last_used_profile"
+#define RECENT_GUI_FILEOPEN_REMEMBERED_DIR "gui.fileopen_remembered_dir"
+#define RECENT_GUI_CONVERSATION_TABS "gui.conversation_tabs"
+#define RECENT_GUI_ENDPOINT_TABS "gui.endpoint_tabs"
-#define RECENT_GUI_GEOMETRY "gui.geom."
+#define RECENT_GUI_GEOMETRY "gui.geom."
-#define RECENT_KEY_PRIVS_WARN_IF_ELEVATED "privs.warn_if_elevated"
-#define RECENT_KEY_PRIVS_WARN_IF_NO_NPF "privs.warn_if_no_npf"
+#define RECENT_KEY_PRIVS_WARN_IF_ELEVATED "privs.warn_if_elevated"
+#define RECENT_KEY_PRIVS_WARN_IF_NO_NPF "privs.warn_if_no_npf"
#define RECENT_FILE_NAME "recent"
#define RECENT_COMMON_FILE_NAME "recent_common"
@@ -91,7 +91,7 @@ static const char *ts_type_text[] =
{ "RELATIVE", "ABSOLUTE", "ABSOLUTE_WITH_DATE", "DELTA", "DELTA_DIS", "EPOCH", "UTC", "UTC_WITH_DATE", NULL };
static const char *ts_precision_text[] =
- { "AUTO", "SEC", "DSEC", "CSEC", "MSEC", "USEC", "NSEC", NULL };
+{ "AUTO", "SEC", "DSEC", "CSEC", "MSEC", "USEC", "NSEC", NULL };
static const char *ts_seconds_text[] =
{ "SECONDS", "HOUR_MIN_SEC", NULL };
@@ -104,15 +104,15 @@ static const char *ts_seconds_text[] =
static int
find_index_from_string_array(const char *needle, const char **haystack, int default_value)
{
- int i = 0;
-
- while (haystack[i] != NULL) {
- if (strcmp(needle, haystack[i]) == 0) {
- return i;
- }
- i++;
- }
- return default_value;
+ int i = 0;
+
+ while (haystack[i] != NULL) {
+ if (strcmp(needle, haystack[i]) == 0) {
+ return i;
+ }
+ i++;
+ }
+ return default_value;
}
static void
@@ -139,21 +139,21 @@ free_col_width_info(recent_settings_t *rs)
static void
write_recent_geom(gpointer key _U_, gpointer value, gpointer rfh)
{
- window_geometry_t *geom = (window_geometry_t *)value;
- FILE *rf = (FILE *)rfh;
-
- fprintf(rf, "\n# Geometry and maximized state of %s window.\n", geom->key);
- fprintf(rf, "# Decimal integers.\n");
- fprintf(rf, RECENT_GUI_GEOMETRY "%s.x: %d\n", geom->key, geom->x);
- fprintf(rf, RECENT_GUI_GEOMETRY "%s.y: %d\n", geom->key, geom->y);
- fprintf(rf, RECENT_GUI_GEOMETRY "%s.width: %d\n", geom->key,
- geom->width);
- fprintf(rf, RECENT_GUI_GEOMETRY "%s.height: %d\n", geom->key,
- geom->height);
-
- fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
- fprintf(rf, RECENT_GUI_GEOMETRY "%s.maximized: %s\n", geom->key,
- geom->maximized == TRUE ? "TRUE" : "FALSE");
+ window_geometry_t *geom = (window_geometry_t *)value;
+ FILE *rf = (FILE *)rfh;
+
+ fprintf(rf, "\n# Geometry and maximized state of %s window.\n", geom->key);
+ fprintf(rf, "# Decimal integers.\n");
+ fprintf(rf, RECENT_GUI_GEOMETRY "%s.x: %d\n", geom->key, geom->x);
+ fprintf(rf, RECENT_GUI_GEOMETRY "%s.y: %d\n", geom->key, geom->y);
+ fprintf(rf, RECENT_GUI_GEOMETRY "%s.width: %d\n", geom->key,
+ geom->width);
+ fprintf(rf, RECENT_GUI_GEOMETRY "%s.height: %d\n", geom->key,
+ geom->height);
+
+ fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
+ fprintf(rf, RECENT_GUI_GEOMETRY "%s.maximized: %s\n", geom->key,
+ geom->maximized == TRUE ? "TRUE" : "FALSE");
}
@@ -165,27 +165,27 @@ static GHashTable *window_geom_hash = NULL;
void
window_geom_save(const gchar *name, window_geometry_t *geom)
{
- gchar *key;
- window_geometry_t *work;
+ gchar *key;
+ window_geometry_t *work;
- /* init hashtable, if not already done */
- if(!window_geom_hash) {
- window_geom_hash = g_hash_table_new(g_str_hash, g_str_equal);
- }
- /* if we have an old one, remove and free it first */
- work = (window_geometry_t *)g_hash_table_lookup(window_geom_hash, name);
- if(work) {
- g_hash_table_remove(window_geom_hash, name);
- g_free(work->key);
- g_free(work);
- }
+ /* init hashtable, if not already done */
+ if (!window_geom_hash) {
+ window_geom_hash = g_hash_table_new(g_str_hash, g_str_equal);
+ }
+ /* if we have an old one, remove and free it first */
+ work = (window_geometry_t *)g_hash_table_lookup(window_geom_hash, name);
+ if (work) {
+ g_hash_table_remove(window_geom_hash, name);
+ g_free(work->key);
+ g_free(work);
+ }
- /* g_malloc and insert the new one */
- work = (window_geometry_t *)g_malloc(sizeof(window_geometry_t));
- *work = *geom;
- key = g_strdup(name);
- work->key = key;
- g_hash_table_insert(window_geom_hash, key, work);
+ /* g_malloc and insert the new one */
+ work = (window_geometry_t *)g_malloc(sizeof(window_geometry_t));
+ *work = *geom;
+ key = g_strdup(name);
+ work->key = key;
+ g_hash_table_insert(window_geom_hash, key, work);
}
/* load the desired geometry for this window from the geometry hashtable */
@@ -193,20 +193,20 @@ gboolean
window_geom_load(const gchar *name,
window_geometry_t *geom)
{
- window_geometry_t *p;
+ window_geometry_t *p;
- /* init hashtable, if not already done */
- if(!window_geom_hash) {
- window_geom_hash = g_hash_table_new(g_str_hash, g_str_equal);
- }
+ /* init hashtable, if not already done */
+ if (!window_geom_hash) {
+ window_geom_hash = g_hash_table_new(g_str_hash, g_str_equal);
+ }
- p = (window_geometry_t *)g_hash_table_lookup(window_geom_hash, name);
- if(p) {
- *geom = *p;
- return TRUE;
- } else {
- return FALSE;
- }
+ p = (window_geometry_t *)g_hash_table_lookup(window_geom_hash, name);
+ if (p) {
+ *geom = *p;
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
/** Read in a single geometry key value pair from the recent file.
@@ -223,7 +223,7 @@ window_geom_recent_read_pair(const char *name,
window_geometry_t geom;
/* find window geometry maybe already in hashtable */
- if(!window_geom_load(name, &geom)) {
+ if (!window_geom_load(name, &geom)) {
/* not in table, init geom with "basic" values */
geom.key = NULL; /* Will be set in window_geom_save() */
geom.set_pos = FALSE;
@@ -280,7 +280,7 @@ static void
window_geom_recent_write_all(FILE *rf)
{
/* init hashtable, if not already done */
- if(!window_geom_hash) {
+ if (!window_geom_hash) {
window_geom_hash = g_hash_table_new(g_str_hash, g_str_equal);
}
@@ -375,15 +375,15 @@ static GHashTable *remote_host_list=NULL;
int recent_get_remote_host_list_size(void)
{
- return g_hash_table_size (remote_host_list);
+ return g_hash_table_size (remote_host_list);
}
void recent_add_remote_host(gchar *host, struct remote_host *rh)
{
- if (remote_host_list == NULL) {
- remote_host_list = g_hash_table_new (g_str_hash, g_str_equal);
- }
- g_hash_table_insert (remote_host_list, g_strdup(host), rh);
+ if (remote_host_list == NULL) {
+ remote_host_list = g_hash_table_new (g_str_hash, g_str_equal);
+ }
+ g_hash_table_insert (remote_host_list, g_strdup(host), rh);
}
static gboolean
@@ -401,7 +401,7 @@ free_remote_host (gpointer key _U_, gpointer value, gpointer user _U_)
GHashTable *get_remote_host_list(void)
{
- return remote_host_list;
+ return remote_host_list;
}
static void
@@ -425,7 +425,7 @@ capture_remote_combo_recent_write_all(FILE *rf)
void free_remote_host_list(void)
{
- g_hash_table_foreach_remove(remote_host_list, free_remote_host, NULL);
+ g_hash_table_foreach_remove(remote_host_list, free_remote_host, NULL);
}
struct remote_host *
@@ -610,26 +610,26 @@ write_recent(void)
fprintf(rf, RECENT_GUI_GEOMETRY_MAIN_X ": %d\n", recent.gui_geometry_main_x);
fprintf(rf, RECENT_GUI_GEOMETRY_MAIN_Y ": %d\n", recent.gui_geometry_main_y);
fprintf(rf, RECENT_GUI_GEOMETRY_MAIN_WIDTH ": %d\n",
- recent.gui_geometry_main_width);
+ recent.gui_geometry_main_width);
fprintf(rf, RECENT_GUI_GEOMETRY_MAIN_HEIGHT ": %d\n",
- recent.gui_geometry_main_height);
+ recent.gui_geometry_main_height);
fprintf(rf, "\n# Main window maximized.\n");
fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(rf, RECENT_GUI_GEOMETRY_MAIN_MAXIMIZED ": %s\n",
- recent.gui_geometry_main_maximized == TRUE ? "TRUE" : "FALSE");
+ recent.gui_geometry_main_maximized == TRUE ? "TRUE" : "FALSE");
fprintf(rf, "\n# Statusbar left pane size.\n");
fprintf(rf, "# Decimal number.\n");
if (recent.gui_geometry_status_pane_left != 0) {
fprintf(rf, RECENT_GUI_GEOMETRY_STATUS_PANE_LEFT ": %d\n",
- recent.gui_geometry_status_pane_left);
+ recent.gui_geometry_status_pane_left);
}
fprintf(rf, "\n# Statusbar middle pane size.\n");
fprintf(rf, "# Decimal number.\n");
if (recent.gui_geometry_status_pane_right != 0) {
fprintf(rf, RECENT_GUI_GEOMETRY_STATUS_PANE_RIGHT ": %d\n",
- recent.gui_geometry_status_pane_right);
+ recent.gui_geometry_status_pane_right);
}
fprintf(rf, "\n# Last used Configuration Profile.\n");
@@ -638,17 +638,17 @@ write_recent(void)
fprintf(rf, "\n# WLAN statistics upper pane size.\n");
fprintf(rf, "# Decimal number.\n");
fprintf(rf, RECENT_GUI_GEOMETRY_WLAN_STATS_PANE ": %d\n",
- recent.gui_geometry_wlan_stats_pane);
+ recent.gui_geometry_wlan_stats_pane);
fprintf(rf, "\n# Warn if running with elevated permissions (e.g. as root).\n");
fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(rf, RECENT_KEY_PRIVS_WARN_IF_ELEVATED ": %s\n",
- recent.privs_warn_if_elevated == TRUE ? "TRUE" : "FALSE");
+ recent.privs_warn_if_elevated == TRUE ? "TRUE" : "FALSE");
fprintf(rf, "\n# Warn if npf.sys isn't loaded on Windows >= 6.0.\n");
fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(rf, RECENT_KEY_PRIVS_WARN_IF_NO_NPF ": %s\n",
- recent.privs_warn_if_no_npf == TRUE ? "TRUE" : "FALSE");
+ recent.privs_warn_if_no_npf == TRUE ? "TRUE" : "FALSE");
window_geom_recent_write_all(rf);
@@ -709,49 +709,49 @@ write_profile_recent(void)
fprintf(rf, "\n# Main Toolbar show (hide).\n");
fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(rf, RECENT_KEY_MAIN_TOOLBAR_SHOW ": %s\n",
- recent.main_toolbar_show == TRUE ? "TRUE" : "FALSE");
+ recent.main_toolbar_show == TRUE ? "TRUE" : "FALSE");
fprintf(rf, "\n# Filter Toolbar show (hide).\n");
fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(rf, RECENT_KEY_FILTER_TOOLBAR_SHOW ": %s\n",
- recent.filter_toolbar_show == TRUE ? "TRUE" : "FALSE");
+ recent.filter_toolbar_show == TRUE ? "TRUE" : "FALSE");
fprintf(rf, "\n# Wireless Settings Toolbar show (hide).\n");
fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(rf, RECENT_KEY_WIRELESS_TOOLBAR_SHOW ": %s\n",
- recent.wireless_toolbar_show == TRUE ? "TRUE" : "FALSE");
+ recent.wireless_toolbar_show == TRUE ? "TRUE" : "FALSE");
#ifdef HAVE_AIRPCAP
fprintf(rf, "\n# Show (hide) old AirPcap driver warning dialog box.\n");
fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(rf, RECENT_KEY_DRIVER_CHECK_SHOW ": %s\n",
- recent.airpcap_driver_check_show == TRUE ? "TRUE" : "FALSE");
+ recent.airpcap_driver_check_show == TRUE ? "TRUE" : "FALSE");
#endif
fprintf(rf, "\n# Packet list show (hide).\n");
fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(rf, RECENT_KEY_PACKET_LIST_SHOW ": %s\n",
- recent.packet_list_show == TRUE ? "TRUE" : "FALSE");
+ recent.packet_list_show == TRUE ? "TRUE" : "FALSE");
fprintf(rf, "\n# Tree view show (hide).\n");
fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(rf, RECENT_KEY_TREE_VIEW_SHOW ": %s\n",
- recent.tree_view_show == TRUE ? "TRUE" : "FALSE");
+ recent.tree_view_show == TRUE ? "TRUE" : "FALSE");
fprintf(rf, "\n# Byte view show (hide).\n");
fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(rf, RECENT_KEY_BYTE_VIEW_SHOW ": %s\n",
- recent.byte_view_show == TRUE ? "TRUE" : "FALSE");
+ recent.byte_view_show == TRUE ? "TRUE" : "FALSE");
fprintf(rf, "\n# Statusbar show (hide).\n");
fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(rf, RECENT_KEY_STATUSBAR_SHOW ": %s\n",
- recent.statusbar_show == TRUE ? "TRUE" : "FALSE");
+ recent.statusbar_show == TRUE ? "TRUE" : "FALSE");
fprintf(rf, "\n# Packet list colorize (hide).\n");
fprintf(rf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(rf, RECENT_KEY_PACKET_LIST_COLORIZE ": %s\n",
- recent.packet_list_colorize == TRUE ? "TRUE" : "FALSE");
+ recent.packet_list_colorize == TRUE ? "TRUE" : "FALSE");
fprintf(rf, "\n# Timestamp display format.\n");
fprintf(rf, "# One of: RELATIVE, ABSOLUTE, ABSOLUTE_WITH_DATE, DELTA, DELTA_DIS, EPOCH, UTC, UTC_WITH_DATE\n");
@@ -771,24 +771,24 @@ write_profile_recent(void)
fprintf(rf, "\n# Zoom level.\n");
fprintf(rf, "# A decimal number.\n");
fprintf(rf, RECENT_GUI_ZOOM_LEVEL ": %d\n",
- recent.gui_zoom_level);
+ recent.gui_zoom_level);
fprintf(rf, "\n# Bytes view.\n");
fprintf(rf, "# A decimal number.\n");
fprintf(rf, RECENT_GUI_BYTES_VIEW ": %d\n",
- recent.gui_bytes_view);
+ recent.gui_bytes_view);
fprintf(rf, "\n# Main window upper (or leftmost) pane size.\n");
fprintf(rf, "# Decimal number.\n");
if (recent.gui_geometry_main_upper_pane != 0) {
fprintf(rf, RECENT_GUI_GEOMETRY_MAIN_UPPER_PANE ": %d\n",
- recent.gui_geometry_main_upper_pane);
+ recent.gui_geometry_main_upper_pane);
}
fprintf(rf, "\n# Main window middle pane size.\n");
fprintf(rf, "# Decimal number.\n");
if (recent.gui_geometry_main_lower_pane != 0) {
fprintf(rf, RECENT_GUI_GEOMETRY_MAIN_LOWER_PANE ": %d\n",
- recent.gui_geometry_main_lower_pane);
+ recent.gui_geometry_main_lower_pane);
}
fprintf(rf, "\n# Packet list column pixel widths.\n");
@@ -810,7 +810,7 @@ write_profile_recent(void)
if (get_last_open_dir() != NULL) {
fprintf(rf, "\n# Last directory navigated to in File Open dialog.\n");
- if(u3_active())
+ if (u3_active())
fprintf(rf, RECENT_GUI_FILEOPEN_REMEMBERED_DIR ": %s\n", u3_contract_device_path(get_last_open_dir()));
else
fprintf(rf, RECENT_GUI_FILEOPEN_REMEMBERED_DIR ": %s\n", get_last_open_dir());
@@ -828,8 +828,8 @@ write_profile_recent(void)
/* set one user's recent common file key/value pair */
static prefs_set_pref_e
read_set_recent_common_pair_static(gchar *key, const gchar *value,
- void *private_data _U_,
- gboolean return_range_errors _U_)
+ void *private_data _U_,
+ gboolean return_range_errors _U_)
{
long num;
char *p;
@@ -845,41 +845,41 @@ read_set_recent_common_pair_static(gchar *key, const gchar *value,
} else if (strcmp(key, RECENT_GUI_GEOMETRY_MAIN_X) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
- return PREFS_SET_SYNTAX_ERR; /* number was bad */
+ return PREFS_SET_SYNTAX_ERR; /* number was bad */
recent.gui_geometry_main_x = (gint)num;
} else if (strcmp(key, RECENT_GUI_GEOMETRY_MAIN_Y) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
- return PREFS_SET_SYNTAX_ERR; /* number was bad */
+ return PREFS_SET_SYNTAX_ERR; /* number was bad */
recent.gui_geometry_main_y = (gint)num;
} else if (strcmp(key, RECENT_GUI_GEOMETRY_MAIN_WIDTH) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
- return PREFS_SET_SYNTAX_ERR; /* number was bad */
+ return PREFS_SET_SYNTAX_ERR; /* number was bad */
if (num <= 0)
- return PREFS_SET_SYNTAX_ERR; /* number must be positive */
+ return PREFS_SET_SYNTAX_ERR; /* number must be positive */
recent.gui_geometry_main_width = (gint)num;
} else if (strcmp(key, RECENT_GUI_GEOMETRY_MAIN_HEIGHT) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
- return PREFS_SET_SYNTAX_ERR; /* number was bad */
+ return PREFS_SET_SYNTAX_ERR; /* number was bad */
if (num <= 0)
- return PREFS_SET_SYNTAX_ERR; /* number must be positive */
+ return PREFS_SET_SYNTAX_ERR; /* number must be positive */
recent.gui_geometry_main_height = (gint)num;
} else if (strcmp(key, RECENT_GUI_GEOMETRY_STATUS_PANE_RIGHT) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
- return PREFS_SET_SYNTAX_ERR; /* number was bad */
+ return PREFS_SET_SYNTAX_ERR; /* number was bad */
if (num <= 0)
- return PREFS_SET_SYNTAX_ERR; /* number must be positive */
+ return PREFS_SET_SYNTAX_ERR; /* number must be positive */
recent.gui_geometry_status_pane_right = (gint)num;
recent.has_gui_geometry_status_pane = TRUE;
} else if (strcmp(key, RECENT_GUI_GEOMETRY_STATUS_PANE_LEFT) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
- return PREFS_SET_SYNTAX_ERR; /* number was bad */
+ return PREFS_SET_SYNTAX_ERR; /* number was bad */
if (num <= 0)
- return PREFS_SET_SYNTAX_ERR; /* number must be positive */
+ return PREFS_SET_SYNTAX_ERR; /* number must be positive */
recent.gui_geometry_status_pane_left = (gint)num;
recent.has_gui_geometry_status_pane = TRUE;
} else if (strcmp(key, RECENT_LAST_USED_PROFILE) == 0) {
@@ -889,15 +889,15 @@ read_set_recent_common_pair_static(gchar *key, const gchar *value,
} else if (strcmp(key, RECENT_GUI_GEOMETRY_WLAN_STATS_PANE) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
- return PREFS_SET_SYNTAX_ERR; /* number was bad */
+ return PREFS_SET_SYNTAX_ERR; /* number was bad */
if (num <= 0)
- return PREFS_SET_SYNTAX_ERR; /* number must be positive */
+ return PREFS_SET_SYNTAX_ERR; /* number must be positive */
recent.gui_geometry_wlan_stats_pane = (gint)num;
} else if (strncmp(key, RECENT_GUI_GEOMETRY, sizeof(RECENT_GUI_GEOMETRY)-1) == 0) {
/* now have something like "gui.geom.main.x", split it into win and sub_key */
char *win = &key[sizeof(RECENT_GUI_GEOMETRY)-1];
char *sub_key = strchr(win, '.');
- if(sub_key) {
+ if (sub_key) {
*sub_key = '\0';
sub_key++;
window_geom_recent_read_pair(win, sub_key, value);
@@ -924,8 +924,8 @@ read_set_recent_common_pair_static(gchar *key, const gchar *value,
/* set one user's recent file key/value pair */
static prefs_set_pref_e
read_set_recent_pair_static(gchar *key, const gchar *value,
- void *private_data _U_,
- gboolean return_range_errors _U_)
+ void *private_data _U_,
+ gboolean return_range_errors _U_)
{
long num;
char *p;
@@ -1000,22 +1000,22 @@ read_set_recent_pair_static(gchar *key, const gchar *value,
}
} else if (strcmp(key, RECENT_GUI_TIME_FORMAT) == 0) {
recent.gui_time_format =
- (ts_type)find_index_from_string_array(value, ts_type_text, TS_RELATIVE);
+ (ts_type)find_index_from_string_array(value, ts_type_text, TS_RELATIVE);
} else if (strcmp(key, RECENT_GUI_TIME_PRECISION) == 0) {
recent.gui_time_precision =
- find_index_from_string_array(value, ts_precision_text, TS_PREC_AUTO);
+ find_index_from_string_array(value, ts_precision_text, TS_PREC_AUTO);
} else if (strcmp(key, RECENT_GUI_SECONDS_FORMAT) == 0) {
recent.gui_seconds_format =
- (ts_seconds_type)find_index_from_string_array(value, ts_seconds_text, TS_SECONDS_DEFAULT);
+ (ts_seconds_type)find_index_from_string_array(value, ts_seconds_text, TS_SECONDS_DEFAULT);
} else if (strcmp(key, RECENT_GUI_ZOOM_LEVEL) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
- return PREFS_SET_SYNTAX_ERR; /* number was bad */
+ return PREFS_SET_SYNTAX_ERR; /* number was bad */
recent.gui_zoom_level = (gint)num;
} else if (strcmp(key, RECENT_GUI_BYTES_VIEW) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
- return PREFS_SET_SYNTAX_ERR; /* number was bad */
+ return PREFS_SET_SYNTAX_ERR; /* number was bad */
recent.gui_bytes_view = (gint)num;
} else if (strcmp(key, RECENT_GUI_GEOMETRY_MAIN_MAXIMIZED) == 0) {
if (g_ascii_strcasecmp(value, "true") == 0) {
@@ -1028,17 +1028,17 @@ read_set_recent_pair_static(gchar *key, const gchar *value,
} else if (strcmp(key, RECENT_GUI_GEOMETRY_MAIN_UPPER_PANE) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
- return PREFS_SET_SYNTAX_ERR; /* number was bad */
+ return PREFS_SET_SYNTAX_ERR; /* number was bad */
if (num <= 0)
- return PREFS_SET_SYNTAX_ERR; /* number must be positive */
+ return PREFS_SET_SYNTAX_ERR; /* number must be positive */
recent.gui_geometry_main_upper_pane = (gint)num;
recent.has_gui_geometry_main_upper_pane = TRUE;
} else if (strcmp(key, RECENT_GUI_GEOMETRY_MAIN_LOWER_PANE) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
- return PREFS_SET_SYNTAX_ERR; /* number was bad */
+ return PREFS_SET_SYNTAX_ERR; /* number was bad */
if (num <= 0)
- return PREFS_SET_SYNTAX_ERR; /* number must be positive */
+ return PREFS_SET_SYNTAX_ERR; /* number must be positive */
recent.gui_geometry_main_lower_pane = (gint)num;
recent.has_gui_geometry_main_lower_pane = TRUE;
} else if (strcmp(key, RECENT_GUI_CONVERSATION_TABS) == 0) {
@@ -1056,10 +1056,10 @@ read_set_recent_pair_static(gchar *key, const gchar *value,
}
/* Check to make sure all column formats are valid. */
col_l_elt = g_list_first(col_l);
- while(col_l_elt) {
+ while (col_l_elt) {
/* Make sure the format isn't empty. */
if (strcmp((const char *)col_l_elt->data, "") == 0) {
- /* It is. */
+ /* It is. */
prefs_clear_string_list(col_l);
return PREFS_SET_SYNTAX_ERR;
}
@@ -1082,29 +1082,29 @@ read_set_recent_pair_static(gchar *key, const gchar *value,
free_col_width_info(&recent);
recent.col_width_list = NULL;
col_l_elt = g_list_first(col_l);
- while(col_l_elt) {
+ while (col_l_elt) {
gchar *fmt = g_strdup((const gchar *)col_l_elt->data);
cfmt = (col_width_data *) g_malloc(sizeof(col_width_data));
if (strncmp(fmt, cust_format, cust_format_len) != 0) {
- cfmt->cfmt = get_column_format_from_str(fmt);
- cfmt->cfield = NULL;
+ cfmt->cfmt = get_column_format_from_str(fmt);
+ cfmt->cfield = NULL;
} else {
- cfmt->cfmt = COL_CUSTOM;
- cfmt->cfield = g_strdup(&fmt[cust_format_len+1]); /* add 1 for ':' */
+ cfmt->cfmt = COL_CUSTOM;
+ cfmt->cfield = g_strdup(&fmt[cust_format_len+1]); /* add 1 for ':' */
}
g_free (fmt);
if (cfmt->cfmt == -1) {
g_free(cfmt->cfield);
- g_free(cfmt);
- return PREFS_SET_SYNTAX_ERR; /* string was bad */
+ g_free(cfmt);
+ return PREFS_SET_SYNTAX_ERR; /* string was bad */
}
col_l_elt = col_l_elt->next;
cfmt->width = (gint)strtol((const char *)col_l_elt->data, &p, 0);
if (p == col_l_elt->data || (*p != '\0' && *p != ':')) {
- g_free(cfmt->cfield);
- g_free(cfmt);
- return PREFS_SET_SYNTAX_ERR; /* number was bad */
+ g_free(cfmt->cfield);
+ g_free(cfmt);
+ return PREFS_SET_SYNTAX_ERR; /* number was bad */
}
if (*p == ':') {
@@ -1131,8 +1131,8 @@ read_set_recent_pair_static(gchar *key, const gchar *value,
/* set one user's recent file key/value pair */
static prefs_set_pref_e
read_set_recent_pair_dynamic(gchar *key, const gchar *value,
- void *private_data _U_,
- gboolean return_range_errors _U_)
+ void *private_data _U_,
+ gboolean return_range_errors _U_)
{
if (!isprint_string(value)) {
return PREFS_SET_SYNTAX_ERR;
@@ -1143,7 +1143,7 @@ read_set_recent_pair_dynamic(gchar *key, const gchar *value,
else
add_menu_recent_capture_file(value);
} else if (strcmp(key, RECENT_KEY_DISPLAY_FILTER) == 0) {
- dfilter_combo_add_recent(value);
+ dfilter_combo_add_recent(value);
} else if (strcmp(key, RECENT_KEY_CAPTURE_FILTER) == 0) {
recent_add_cfilter(NULL, value);
} else if (g_str_has_prefix(key, RECENT_KEY_CAPTURE_FILTER ".")) {
@@ -1151,7 +1151,7 @@ read_set_recent_pair_dynamic(gchar *key, const gchar *value,
recent_add_cfilter(strrchr(key, '.') + 1, value);
#ifdef HAVE_PCAP_REMOTE
} else if (strcmp(key, RECENT_KEY_REMOTE_HOST) == 0) {
- capture_remote_combo_add_recent(value);
+ capture_remote_combo_add_recent(value);
#endif
}
@@ -1168,36 +1168,36 @@ read_set_recent_pair_dynamic(gchar *key, const gchar *value,
int
recent_set_arg(char *prefarg)
{
- gchar *p, *colonp;
- int ret;
-
- colonp = strchr(prefarg, ':');
- if (colonp == NULL)
- return PREFS_SET_SYNTAX_ERR;
-
- p = colonp;
- *p++ = '\0';
-
- /*
- * Skip over any white space (there probably won't be any, but
- * as we allow it in the preferences file, we might as well
- * allow it here).
- */
- while (isspace((guchar)*p))
- p++;
- if (*p == '\0') {
- /*
- * Put the colon back, so if our caller uses, in an
- * error message, the string they passed us, the message
- * looks correct.
- */
- *colonp = ':';
- return PREFS_SET_SYNTAX_ERR;
- }
-
- ret = read_set_recent_pair_static(prefarg, p, NULL, TRUE);
- *colonp = ':'; /* put the colon back */
- return ret;
+ gchar *p, *colonp;
+ int ret;
+
+ colonp = strchr(prefarg, ':');
+ if (colonp == NULL)
+ return PREFS_SET_SYNTAX_ERR;
+
+ p = colonp;
+ *p++ = '\0';
+
+ /*
+ * Skip over any white space (there probably won't be any, but
+ * as we allow it in the preferences file, we might as well
+ * allow it here).
+ */
+ while (isspace((guchar)*p))
+ p++;
+ if (*p == '\0') {
+ /*
+ * Put the colon back, so if our caller uses, in an
+ * error message, the string they passed us, the message
+ * looks correct.
+ */
+ *colonp = ':';
+ return PREFS_SET_SYNTAX_ERR;
+ }
+
+ ret = read_set_recent_pair_static(prefarg, p, NULL, TRUE);
+ *colonp = ':'; /* put the colon back */
+ return ret;
}
@@ -1217,7 +1217,7 @@ recent_read_static(char **rf_path_return, int *rf_errno_return)
recent.gui_geometry_status_pane_left = (DEF_WIDTH/3);
recent.gui_geometry_status_pane_right = (DEF_WIDTH/3);
- recent.gui_geometry_wlan_stats_pane = 200;
+ recent.gui_geometry_wlan_stats_pane = 200;
recent.privs_warn_if_elevated = TRUE;
recent.privs_warn_if_no_npf = TRUE;
@@ -1258,20 +1258,20 @@ recent_read_profile_static(char **rf_path_return, int *rf_errno_return)
FILE *rf;
/* set defaults */
- recent.main_toolbar_show = TRUE;
- recent.filter_toolbar_show = TRUE;
- recent.wireless_toolbar_show = FALSE;
- recent.airpcap_driver_check_show = TRUE;
- recent.packet_list_show = TRUE;
- recent.tree_view_show = TRUE;
- recent.byte_view_show = TRUE;
- recent.statusbar_show = TRUE;
- recent.packet_list_colorize = TRUE;
- recent.gui_time_format = TS_RELATIVE;
- recent.gui_time_precision = TS_PREC_AUTO;
- recent.gui_seconds_format = TS_SECONDS_DEFAULT;
- recent.gui_zoom_level = 0;
- recent.gui_bytes_view = 0;
+ recent.main_toolbar_show = TRUE;
+ recent.filter_toolbar_show = TRUE;
+ recent.wireless_toolbar_show = FALSE;
+ recent.airpcap_driver_check_show = TRUE;
+ recent.packet_list_show = TRUE;
+ recent.tree_view_show = TRUE;
+ recent.byte_view_show = TRUE;
+ recent.statusbar_show = TRUE;
+ recent.packet_list_colorize = TRUE;
+ recent.gui_time_format = TS_RELATIVE;
+ recent.gui_time_precision = TS_PREC_AUTO;
+ recent.gui_seconds_format = TS_SECONDS_DEFAULT;
+ recent.gui_zoom_level = 0;
+ recent.gui_bytes_view = 0;
/* pane size of zero will autodetect */
recent.gui_geometry_main_upper_pane = 0;
@@ -1279,7 +1279,7 @@ recent_read_profile_static(char **rf_path_return, int *rf_errno_return)
recent.has_gui_geometry_main_upper_pane = TRUE;
recent.has_gui_geometry_main_lower_pane = TRUE;
- recent.has_gui_geometry_status_pane = TRUE;
+ recent.has_gui_geometry_status_pane = TRUE;
if (recent.col_width_list) {
free_col_width_info(&recent);
@@ -1386,7 +1386,7 @@ recent_get_column_width(gint col)
col_w = (col_width_data *) col_l->data;
if (col_w->cfmt == cfmt) {
if (cfmt != COL_CUSTOM || strcmp (cfield, col_w->cfield) == 0) {
- return col_w->width;
+ return col_w->width;
}
}
col_l = col_l->next;
@@ -1414,9 +1414,9 @@ recent_set_column_width(gint col, gint width)
col_w = (col_width_data *) col_l->data;
if (col_w->cfmt == cfmt) {
if (cfmt != COL_CUSTOM || strcmp (cfield, col_w->cfield) == 0) {
- col_w->width = width;
- found = TRUE;
- break;
+ col_w->width = width;
+ found = TRUE;
+ break;
}
}
col_l = col_l->next;
@@ -1503,3 +1503,16 @@ recent_set_column_xalign(gint col, gchar xalign)
recent.col_width_list = g_list_append(recent.col_width_list, col_w);
}
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/ui/rtp_analysis.h b/ui/rtp_analysis.h
index e3384b449d..59186bce3a 100644
--- a/ui/rtp_analysis.h
+++ b/ui/rtp_analysis.h
@@ -40,92 +40,104 @@
*/
void rtp_analysis(
- address *ip_src_fwd,
- guint32 port_src_fwd,
- address *ip_dst_fwd,
- guint32 port_dst_fwd,
- guint32 ssrc_fwd,
- address *ip_src_rev,
- guint32 port_src_rev,
- address *ip_dst_rev,
- guint32 port_dst_rev,
- guint32 ssrc_rev
- );
+ address *ip_src_fwd,
+ guint32 port_src_fwd,
+ address *ip_dst_fwd,
+ guint32 port_dst_fwd,
+ guint32 ssrc_fwd,
+ address *ip_src_rev,
+ guint32 port_src_rev,
+ address *ip_dst_rev,
+ guint32 port_dst_rev,
+ guint32 ssrc_rev
+ );
/****************************************************************************/
/* structure that holds the information about the forward and reversed direction */
typedef struct _bw_history_item {
- double time;
- guint32 bytes;
+ double time;
+ guint32 bytes;
} bw_history_item;
#define BUFF_BW 300
typedef struct _tap_rtp_stat_t {
- gboolean first_packet; /**< do not use in code that is called after rtp_packet_analyse */
- /* use (flags & STAT_FLAG_FIRST) instead */
- /* all of the following fields will be initialized after
- * rtp_packet_analyse has been called
- */
- address first_packet_mac_addr; /**< MAC address of first packet, used to determine duplicates due to mirroring */
- guint32 flags; /* see STAT_FLAG-defines below */
- guint16 seq_num;
- guint32 timestamp;
- guint32 first_timestamp;
- guint32 delta_timestamp;
- double bandwidth;
- bw_history_item bw_history[BUFF_BW];
- guint16 bw_start_index;
- guint16 bw_index;
- guint32 total_bytes;
- guint32 clock_rate;
- double delta;
- double jitter;
- double diff;
- double skew;
- double sumt;
- double sumTS;
- double sumt2;
- double sumtTS;
- double time; /**< Unit is ms */
- double start_time;
- double lastnominaltime;
- double max_delta;
- double max_jitter;
- double max_skew;
- double mean_jitter;
- guint32 max_nr;
- guint16 start_seq_nr;
- guint16 stop_seq_nr;
- guint32 total_nr;
- guint32 sequence;
- gboolean under;
- gint cycles;
- guint16 pt;
- int reg_pt;
+ gboolean first_packet; /**< do not use in code that is called after rtp_packet_analyse */
+ /* use (flags & STAT_FLAG_FIRST) instead */
+ /* all of the following fields will be initialized after
+ * rtp_packet_analyse has been called
+ */
+ address first_packet_mac_addr; /**< MAC address of first packet, used to determine duplicates due to mirroring */
+ guint32 flags; /* see STAT_FLAG-defines below */
+ guint16 seq_num;
+ guint32 timestamp;
+ guint32 first_timestamp;
+ guint32 delta_timestamp;
+ double bandwidth;
+ bw_history_item bw_history[BUFF_BW];
+ guint16 bw_start_index;
+ guint16 bw_index;
+ guint32 total_bytes;
+ guint32 clock_rate;
+ double delta;
+ double jitter;
+ double diff;
+ double skew;
+ double sumt;
+ double sumTS;
+ double sumt2;
+ double sumtTS;
+ double time; /**< Unit is ms */
+ double start_time;
+ double lastnominaltime;
+ double max_delta;
+ double max_jitter;
+ double max_skew;
+ double mean_jitter;
+ guint32 max_nr;
+ guint16 start_seq_nr;
+ guint16 stop_seq_nr;
+ guint32 total_nr;
+ guint32 sequence;
+ gboolean under;
+ gint cycles;
+ guint16 pt;
+ int reg_pt;
} tap_rtp_stat_t;
#define PT_UNDEFINED -1
/* status flags for the flags parameter in tap_rtp_stat_t */
-#define STAT_FLAG_FIRST 0x001
-#define STAT_FLAG_MARKER 0x002
-#define STAT_FLAG_WRONG_SEQ 0x004
-#define STAT_FLAG_PT_CHANGE 0x008
-#define STAT_FLAG_PT_CN 0x010
-#define STAT_FLAG_FOLLOW_PT_CN 0x020
-#define STAT_FLAG_REG_PT_CHANGE 0x040
-#define STAT_FLAG_WRONG_TIMESTAMP 0x080
-#define STAT_FLAG_PT_T_EVENT 0x100
-#define STAT_FLAG_DUP_PKT 0x200
+#define STAT_FLAG_FIRST 0x001
+#define STAT_FLAG_MARKER 0x002
+#define STAT_FLAG_WRONG_SEQ 0x004
+#define STAT_FLAG_PT_CHANGE 0x008
+#define STAT_FLAG_PT_CN 0x010
+#define STAT_FLAG_FOLLOW_PT_CN 0x020
+#define STAT_FLAG_REG_PT_CHANGE 0x040
+#define STAT_FLAG_WRONG_TIMESTAMP 0x080
+#define STAT_FLAG_PT_T_EVENT 0x100
+#define STAT_FLAG_DUP_PKT 0x200
/* forward */
struct _rtp_info;
/* function for analysing an RTP packet. Called from rtp_analysis and rtp_streams */
extern int rtp_packet_analyse(tap_rtp_stat_t *statinfo,
- packet_info *pinfo,
- const struct _rtp_info *rtpinfo);
+ packet_info *pinfo,
+ const struct _rtp_info *rtpinfo);
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
#endif /* __RTP_ANALYSIS_H__ */
diff --git a/ui/rtp_stream.h b/ui/rtp_stream.h
index 323b7371d2..4dcbf5165e 100644
--- a/ui/rtp_stream.h
+++ b/ui/rtp_stream.h
@@ -35,7 +35,7 @@
/****************************************************************************/
/* type for storing rtp frame information */
typedef struct st_rtp_sample_header {
- guint32 rec_time; /**< milliseconds since start of recording */
+ guint32 rec_time; /**< milliseconds since start of recording */
guint16 frame_length; /**< number of bytes in *frame */
} rtp_sample_header_t;
@@ -50,30 +50,30 @@ typedef rtp_sample_t* rtp_sample_p;
/** Defines an rtp stream */
typedef struct _rtp_stream_info {
- address src_addr;
- guint32 src_port;
- address dest_addr;
- guint32 dest_port;
- guint32 ssrc;
- guint8 pt;
- const gchar *info_payload_type_str;
- guint32 npackets;
-
- guint32 first_frame_num; /**< frame number of first frame */
- guint32 setup_frame_number; /**< frame number of setup message */
+ address src_addr;
+ guint32 src_port;
+ address dest_addr;
+ guint32 dest_port;
+ guint32 ssrc;
+ guint8 pt;
+ const gchar *info_payload_type_str;
+ guint32 npackets;
+
+ guint32 first_frame_num; /**< frame number of first frame */
+ guint32 setup_frame_number; /**< frame number of setup message */
/* start of recording (GMT) of this stream */
- guint32 start_sec; /**< seconds */
- guint32 start_usec; /**< microseconds */
- gboolean tag_vlan_error;
- guint32 start_rel_sec; /**< start stream rel seconds */
- guint32 start_rel_usec; /**< start stream rel microseconds */
- guint32 stop_rel_sec; /**< stop stream rel seconds */
- guint32 stop_rel_usec; /**< stop stream rel microseconds */
- gboolean tag_diffserv_error;
- guint16 vlan_id;
-
- tap_rtp_stat_t rtp_stats; /**< here goes the RTP statistics info */
- gboolean problem; /**< if the streams had wrong sequence numbers or wrong timerstamps */
+ guint32 start_sec; /**< seconds */
+ guint32 start_usec; /**< microseconds */
+ gboolean tag_vlan_error;
+ guint32 start_rel_sec; /**< start stream rel seconds */
+ guint32 start_rel_usec; /**< start stream rel microseconds */
+ guint32 stop_rel_sec; /**< stop stream rel seconds */
+ guint32 stop_rel_usec; /**< stop stream rel microseconds */
+ gboolean tag_diffserv_error;
+ guint16 vlan_id;
+
+ tap_rtp_stat_t rtp_stats; /**< here goes the RTP statistics info */
+ gboolean problem; /**< if the streams had wrong sequence numbers or wrong timerstamps */
} rtp_stream_info_t;
@@ -89,16 +89,16 @@ typedef enum
/* structure that holds the information about all detected streams */
/** struct holding all information of the tap */
typedef struct _rtpstream_tapinfo {
- int nstreams; /**< number of streams in the list */
- GList* strinfo_list; /**< list with all streams */
- int npackets; /**< total number of rtp packets of all streams */
+ int nstreams; /**< number of streams in the list */
+ GList *strinfo_list; /**< list with all streams */
+ int npackets; /**< total number of rtp packets of all streams */
/* used while tapping. user shouldn't modify these */
- tap_mode_t mode;
- rtp_stream_info_t* filter_stream_fwd; /**< used as filter in some tap modes */
- rtp_stream_info_t* filter_stream_rev; /**< used as filter in some tap modes */
- FILE* save_file;
- guint32 launch_count; /**< number of times the tap has been run */
- gboolean is_registered; /**< if the tap listener is currently registered or not */
+ tap_mode_t mode;
+ rtp_stream_info_t *filter_stream_fwd; /**< used as filter in some tap modes */
+ rtp_stream_info_t *filter_stream_rev; /**< used as filter in some tap modes */
+ FILE *save_file;
+ guint32 launch_count; /**< number of times the tap has been run */
+ gboolean is_registered; /**< if the tap listener is currently registered or not */
} rtpstream_tapinfo_t;
/****************************************************************************/
@@ -149,5 +149,17 @@ gboolean rtpstream_save(rtp_stream_info_t* stream, const gchar *filename);
*/
void rtpstream_mark(rtp_stream_info_t* stream_fwd, rtp_stream_info_t* stream_rev);
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
#endif /* __RTP_STREAM_H__ */
diff --git a/ui/tap-megaco-common.c b/ui/tap-megaco-common.c
index c547b39ec0..b958e16bc4 100644
--- a/ui/tap-megaco-common.c
+++ b/ui/tap-megaco-common.c
@@ -45,7 +45,7 @@ megacostat_is_duplicate_reply(const gcp_cmd_t* cmd)
{
switch (cmd->type) {
- GCP_CMD_REPLY_CASE
+ GCP_CMD_REPLY_CASE
{
gcp_cmd_msg_t *cmd_msg;
/* cycle through commands to find same command in the transaction */
@@ -72,7 +72,7 @@ megacostat_had_request(const gcp_cmd_t* cmd)
{
switch (cmd->type) {
- GCP_CMD_REPLY_CASE
+ GCP_CMD_REPLY_CASE
{
gcp_cmd_msg_t *cmd_msg;
/* cycle through commands to find a request in the transaction */
@@ -82,7 +82,7 @@ megacostat_had_request(const gcp_cmd_t* cmd)
switch (cmd_msg->cmd->type) {
- GCP_CMD_REQ_CASE
+ GCP_CMD_REQ_CASE
return TRUE;
break;
default:
@@ -110,7 +110,7 @@ megacostat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const
switch (mi->type) {
- GCP_CMD_REQ_CASE
+ GCP_CMD_REQ_CASE
if(!mi->trx->initial) {
/* Track Context is probably disabled, we cannot
* measure service response time */
@@ -126,7 +126,7 @@ megacostat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const
}
break;
- GCP_CMD_REPLY_CASE
+ GCP_CMD_REPLY_CASE
if(megacostat_is_duplicate_reply(mi)){
/* Duplicate is ignored */
ms->rsp_dup_num++;
@@ -188,3 +188,15 @@ megacostat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const
return ret;
}
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/ui/tap-megaco-common.h b/ui/tap-megaco-common.h
index f6b1dd44d2..6619bb5956 100644
--- a/ui/tap-megaco-common.h
+++ b/ui/tap-megaco-common.h
@@ -33,34 +33,34 @@
#define NUM_TIMESTATS 12
#define GCP_CMD_REPLY_CASE \
- case GCP_CMD_ADD_REPLY: \
- case GCP_CMD_MOVE_REPLY: \
- case GCP_CMD_MOD_REPLY: \
- case GCP_CMD_SUB_REPLY: \
- case GCP_CMD_AUDITCAP_REPLY: \
- case GCP_CMD_AUDITVAL_REPLY: \
- case GCP_CMD_NOTIFY_REPLY: \
- case GCP_CMD_SVCCHG_REPLY: \
- case GCP_CMD_TOPOLOGY_REPLY: \
- case GCP_CMD_REPLY:
+ case GCP_CMD_ADD_REPLY: \
+ case GCP_CMD_MOVE_REPLY: \
+ case GCP_CMD_MOD_REPLY: \
+ case GCP_CMD_SUB_REPLY: \
+ case GCP_CMD_AUDITCAP_REPLY: \
+ case GCP_CMD_AUDITVAL_REPLY: \
+ case GCP_CMD_NOTIFY_REPLY: \
+ case GCP_CMD_SVCCHG_REPLY: \
+ case GCP_CMD_TOPOLOGY_REPLY: \
+ case GCP_CMD_REPLY:
#define GCP_CMD_REQ_CASE \
- case GCP_CMD_ADD_REQ: \
- case GCP_CMD_MOVE_REQ: \
- case GCP_CMD_MOD_REQ: \
- case GCP_CMD_SUB_REQ: \
- case GCP_CMD_AUDITCAP_REQ: \
- case GCP_CMD_AUDITVAL_REQ: \
- case GCP_CMD_NOTIFY_REQ: \
- case GCP_CMD_SVCCHG_REQ: \
- case GCP_CMD_TOPOLOGY_REQ: \
- case GCP_CMD_CTX_ATTR_AUDIT_REQ: \
- case GCP_CMD_OTHER_REQ:
+ case GCP_CMD_ADD_REQ: \
+ case GCP_CMD_MOVE_REQ: \
+ case GCP_CMD_MOD_REQ: \
+ case GCP_CMD_SUB_REQ: \
+ case GCP_CMD_AUDITCAP_REQ: \
+ case GCP_CMD_AUDITVAL_REQ: \
+ case GCP_CMD_NOTIFY_REQ: \
+ case GCP_CMD_SVCCHG_REQ: \
+ case GCP_CMD_TOPOLOGY_REQ: \
+ case GCP_CMD_CTX_ATTR_AUDIT_REQ: \
+ case GCP_CMD_OTHER_REQ:
/* used to keep track of the statistics for an entire program interface */
typedef struct _megacostat_t {
char *filter;
- timestat_t rtd[NUM_TIMESTATS];
+ timestat_t rtd[NUM_TIMESTATS];
guint32 open_req_num;
guint32 disc_rsp_num;
guint32 req_dup_num;
@@ -74,20 +74,33 @@ typedef struct _megacostat_t {
} megacostat_t;
static const value_string megaco_message_type[] = {
- { 0, "ADD "},
- { 1, "MOVE"},
- { 2, "MDFY"},
- { 3, "SUBT"},
- { 4, "AUCP"},
- { 5, "AUVL"},
- { 6, "NTFY"},
- { 7, "SVCC"},
- { 8, "TOPO"},
- { 9, "NONE"},
- { 10,"ALL "},
- { 0, NULL}
+ { 0, "ADD "},
+ { 1, "MOVE"},
+ { 2, "MDFY"},
+ { 3, "SUBT"},
+ { 4, "AUCP"},
+ { 5, "AUVL"},
+ { 6, "NTFY"},
+ { 7, "SVCC"},
+ { 8, "TOPO"},
+ { 9, "NONE"},
+ { 10, "ALL "},
+ { 0, NULL}
};
int megacostat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pmi);
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
+
#endif /*TAP_MEGACO_COMMON_H*/
diff --git a/ui/tap-rtp-common.h b/ui/tap-rtp-common.h
index 3919bad666..918a48c310 100644
--- a/ui/tap-rtp-common.h
+++ b/ui/tap-rtp-common.h
@@ -36,4 +36,17 @@ void rtp_write_header(rtp_stream_info_t*, FILE*);
void rtp_write_sample(rtp_sample_t*, FILE*);
int rtpstream_packet(void*, packet_info*, epan_dissect_t *, const void *);
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
+
#endif /*TAP_RTP_COMMON_H_INCLUDED*/
diff --git a/ui/tap-sctp-analysis.c b/ui/tap-sctp-analysis.c
index 1b7c2376f7..eceafc9905 100644
--- a/ui/tap-sctp-analysis.c
+++ b/ui/tap-sctp-analysis.c
@@ -399,8 +399,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
tmp_info.initiate_tag = 0;
}
- tmp_info.direction = sctp_info->direction;
- tmp_info.assoc_id = sctp_info->assoc_index;
+ tmp_info.direction = sctp_info->direction;
+ tmp_info.assoc_id = sctp_info->assoc_index;
info = find_assoc(&tmp_info);
if (!info)
{
@@ -1204,3 +1204,16 @@ register_tap_listener_sctp_stat(void)
sctp_tapinfo_struct.is_registered=TRUE;
}
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/ui/tap-sctp-analysis.h b/ui/tap-sctp-analysis.h
index c0acc3f540..d28b28799a 100644
--- a/ui/tap-sctp-analysis.h
+++ b/ui/tap-sctp-analysis.h
@@ -12,7 +12,7 @@
*
* 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
+ * 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
@@ -39,135 +39,135 @@ extern "C" {
#endif
#endif
-#define SCTP_DATA_CHUNK_ID 0
-#define SCTP_INIT_CHUNK_ID 1
-#define SCTP_INIT_ACK_CHUNK_ID 2
-#define SCTP_SACK_CHUNK_ID 3
-#define SCTP_HEARTBEAT_CHUNK_ID 4
-#define SCTP_HEARTBEAT_ACK_CHUNK_ID 5
-#define SCTP_ABORT_CHUNK_ID 6
-#define SCTP_SHUTDOWN_CHUNK_ID 7
-#define SCTP_SHUTDOWN_ACK_CHUNK_ID 8
-#define SCTP_ERROR_CHUNK_ID 9
-#define SCTP_COOKIE_ECHO_CHUNK_ID 10
-#define SCTP_COOKIE_ACK_CHUNK_ID 11
-#define SCTP_ECNE_CHUNK_ID 12
-#define SCTP_CWR_CHUNK_ID 13
+#define SCTP_DATA_CHUNK_ID 0
+#define SCTP_INIT_CHUNK_ID 1
+#define SCTP_INIT_ACK_CHUNK_ID 2
+#define SCTP_SACK_CHUNK_ID 3
+#define SCTP_HEARTBEAT_CHUNK_ID 4
+#define SCTP_HEARTBEAT_ACK_CHUNK_ID 5
+#define SCTP_ABORT_CHUNK_ID 6
+#define SCTP_SHUTDOWN_CHUNK_ID 7
+#define SCTP_SHUTDOWN_ACK_CHUNK_ID 8
+#define SCTP_ERROR_CHUNK_ID 9
+#define SCTP_COOKIE_ECHO_CHUNK_ID 10
+#define SCTP_COOKIE_ACK_CHUNK_ID 11
+#define SCTP_ECNE_CHUNK_ID 12
+#define SCTP_CWR_CHUNK_ID 13
#define SCTP_SHUTDOWN_COMPLETE_CHUNK_ID 14
-#define SCTP_AUTH_CHUNK_ID 15
-#define SCTP_NR_SACK_CHUNK_ID 16
+#define SCTP_AUTH_CHUNK_ID 15
+#define SCTP_NR_SACK_CHUNK_ID 16
#define SCTP_ASCONF_ACK_CHUNK_ID 0x80
-#define SCTP_PKTDROP_CHUNK_ID 0x81
-#define SCTP_RE_CONFIG_CHUNK_ID 0x82
-#define SCTP_PAD_CHUNK_ID 0x84
+#define SCTP_PKTDROP_CHUNK_ID 0x81
+#define SCTP_RE_CONFIG_CHUNK_ID 0x82
+#define SCTP_PAD_CHUNK_ID 0x84
#define SCTP_FORWARD_TSN_CHUNK_ID 0xC0
-#define SCTP_ASCONF_CHUNK_ID 0xC1
-#define SCTP_IETF_EXT 0xFF
+#define SCTP_ASCONF_CHUNK_ID 0xC1
+#define SCTP_IETF_EXT 0xFF
#define IS_SCTP_CHUNK_TYPE(t) \
- (((t) <= 16) || ((t) == 0xC0) || ((t) == 0xC1) || ((t) == 0x80) || ((t) == 0x81))
+ (((t) <= 16) || ((t) == 0xC0) || ((t) == 0xC1) || ((t) == 0x80) || ((t) == 0x81))
-#define CHUNK_TYPE_LENGTH 1
-#define CHUNK_FLAGS_LENGTH 1
-#define CHUNK_LENGTH_LENGTH 2
+#define CHUNK_TYPE_LENGTH 1
+#define CHUNK_FLAGS_LENGTH 1
+#define CHUNK_LENGTH_LENGTH 2
-#define CHUNK_HEADER_OFFSET 0
-#define CHUNK_TYPE_OFFSET CHUNK_HEADER_OFFSET
-#define CHUNK_FLAGS_OFFSET (CHUNK_TYPE_OFFSET + CHUNK_TYPE_LENGTH)
-#define CHUNK_LENGTH_OFFSET (CHUNK_FLAGS_OFFSET + CHUNK_FLAGS_LENGTH)
-#define CHUNK_VALUE_OFFSET (CHUNK_LENGTH_OFFSET + CHUNK_LENGTH_LENGTH)
+#define CHUNK_HEADER_OFFSET 0
+#define CHUNK_TYPE_OFFSET CHUNK_HEADER_OFFSET
+#define CHUNK_FLAGS_OFFSET (CHUNK_TYPE_OFFSET + CHUNK_TYPE_LENGTH)
+#define CHUNK_LENGTH_OFFSET (CHUNK_FLAGS_OFFSET + CHUNK_FLAGS_LENGTH)
+#define CHUNK_VALUE_OFFSET (CHUNK_LENGTH_OFFSET + CHUNK_LENGTH_LENGTH)
-#define INIT_CHUNK_INITIATE_TAG_LENGTH 4
-#define INIT_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH 4
+#define INIT_CHUNK_INITIATE_TAG_LENGTH 4
+#define INIT_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH 4
#define INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_LENGTH 2
#define INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_LENGTH 2
-#define INIT_CHUNK_INITIATE_TAG_OFFSET CHUNK_VALUE_OFFSET
-#define INIT_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET (INIT_CHUNK_INITIATE_TAG_OFFSET + \
- INIT_CHUNK_INITIATE_TAG_LENGTH )
+#define INIT_CHUNK_INITIATE_TAG_OFFSET CHUNK_VALUE_OFFSET
+#define INIT_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET (INIT_CHUNK_INITIATE_TAG_OFFSET + \
+ INIT_CHUNK_INITIATE_TAG_LENGTH )
#define INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_OFFSET (INIT_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET + \
- INIT_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH )
+ INIT_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH )
#define INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_OFFSET (INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_OFFSET + \
- INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_LENGTH )
-#define INIT_CHUNK_INITIAL_TSN_OFFSET (INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_OFFSET + \
- INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_LENGTH )
+ INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_LENGTH )
+#define INIT_CHUNK_INITIAL_TSN_OFFSET (INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_OFFSET + \
+ INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_LENGTH )
-#define DATA_CHUNK_TSN_LENGTH 4
-#define DATA_CHUNK_TSN_OFFSET (CHUNK_VALUE_OFFSET + 0)
+#define DATA_CHUNK_TSN_LENGTH 4
+#define DATA_CHUNK_TSN_OFFSET (CHUNK_VALUE_OFFSET + 0)
#define DATA_CHUNK_STREAM_ID_OFFSET (DATA_CHUNK_TSN_OFFSET + DATA_CHUNK_TSN_LENGTH)
#define DATA_CHUNK_STREAM_ID_LENGTH 2
#define DATA_CHUNK_STREAM_SEQ_NUMBER_LENGTH 2
#define DATA_CHUNK_PAYLOAD_PROTOCOL_ID_LENGTH 4
#define DATA_CHUNK_HEADER_LENGTH (CHUNK_HEADER_LENGTH + \
- DATA_CHUNK_TSN_LENGTH + \
- DATA_CHUNK_STREAM_ID_LENGTH + \
- DATA_CHUNK_STREAM_SEQ_NUMBER_LENGTH + \
- DATA_CHUNK_PAYLOAD_PROTOCOL_ID_LENGTH)
-#define MAX_ADDRESS_LEN 47
+ DATA_CHUNK_TSN_LENGTH + \
+ DATA_CHUNK_STREAM_ID_LENGTH + \
+ DATA_CHUNK_STREAM_SEQ_NUMBER_LENGTH + \
+ DATA_CHUNK_PAYLOAD_PROTOCOL_ID_LENGTH)
+#define MAX_ADDRESS_LEN 47
-#define SCTP_ABORT_CHUNK_T_BIT 0x01
+#define SCTP_ABORT_CHUNK_T_BIT 0x01
-#define PARAMETER_TYPE_LENGTH 2
-#define PARAMETER_LENGTH_LENGTH 2
-#define PARAMETER_HEADER_LENGTH (PARAMETER_TYPE_LENGTH + PARAMETER_LENGTH_LENGTH)
+#define PARAMETER_TYPE_LENGTH 2
+#define PARAMETER_LENGTH_LENGTH 2
+#define PARAMETER_HEADER_LENGTH (PARAMETER_TYPE_LENGTH + PARAMETER_LENGTH_LENGTH)
-#define PARAMETER_HEADER_OFFSET 0
-#define PARAMETER_TYPE_OFFSET PARAMETER_HEADER_OFFSET
-#define PARAMETER_LENGTH_OFFSET (PARAMETER_TYPE_OFFSET + PARAMETER_TYPE_LENGTH)
-#define PARAMETER_VALUE_OFFSET (PARAMETER_LENGTH_OFFSET + PARAMETER_LENGTH_LENGTH)
+#define PARAMETER_HEADER_OFFSET 0
+#define PARAMETER_TYPE_OFFSET PARAMETER_HEADER_OFFSET
+#define PARAMETER_LENGTH_OFFSET (PARAMETER_TYPE_OFFSET + PARAMETER_TYPE_LENGTH)
+#define PARAMETER_VALUE_OFFSET (PARAMETER_LENGTH_OFFSET + PARAMETER_LENGTH_LENGTH)
#define IPV6_ADDRESS_LENGTH 16
#define IPV6_ADDRESS_OFFSET PARAMETER_VALUE_OFFSET
#define IPV4_ADDRESS_LENGTH 4
#define IPV4_ADDRESS_OFFSET PARAMETER_VALUE_OFFSET
-#define IPV4ADDRESS_PARAMETER_ID 0x0005
-#define IPV6ADDRESS_PARAMETER_ID 0x0006
+#define IPV4ADDRESS_PARAMETER_ID 0x0005
+#define IPV6ADDRESS_PARAMETER_ID 0x0006
-#define SACK_CHUNK_CUMULATIVE_TSN_ACK_LENGTH 4
+#define SACK_CHUNK_CUMULATIVE_TSN_ACK_LENGTH 4
#define SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET (CHUNK_VALUE_OFFSET + 0)
#define SACK_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH 4
#define SACK_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET (SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET + \
- SACK_CHUNK_CUMULATIVE_TSN_ACK_LENGTH)
-
-#define INIT_CHUNK_INITIAL_TSN_LENGTH 4
-#define INIT_CHUNK_FIXED_PARAMTERS_LENGTH (INIT_CHUNK_INITIATE_TAG_LENGTH + \
- INIT_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH + \
- INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_LENGTH + \
- INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_LENGTH + \
- INIT_CHUNK_INITIAL_TSN_LENGTH)
-#define CHUNK_HEADER_LENGTH (CHUNK_TYPE_LENGTH + \
- CHUNK_FLAGS_LENGTH + \
- CHUNK_LENGTH_LENGTH)
+ SACK_CHUNK_CUMULATIVE_TSN_ACK_LENGTH)
+
+#define INIT_CHUNK_INITIAL_TSN_LENGTH 4
+#define INIT_CHUNK_FIXED_PARAMTERS_LENGTH (INIT_CHUNK_INITIATE_TAG_LENGTH + \
+ INIT_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH + \
+ INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_LENGTH + \
+ INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_LENGTH + \
+ INIT_CHUNK_INITIAL_TSN_LENGTH)
+#define CHUNK_HEADER_LENGTH (CHUNK_TYPE_LENGTH + \
+ CHUNK_FLAGS_LENGTH + \
+ CHUNK_LENGTH_LENGTH)
#define INIT_CHUNK_VARIABLE_LENGTH_PARAMETER_OFFSET (INIT_CHUNK_INITIAL_TSN_OFFSET + \
- INIT_CHUNK_INITIAL_TSN_LENGTH )
+ INIT_CHUNK_INITIAL_TSN_LENGTH )
static const value_string chunk_type_values[] = {
- { SCTP_DATA_CHUNK_ID, "DATA" },
- { SCTP_INIT_CHUNK_ID, "INIT" },
- { SCTP_INIT_ACK_CHUNK_ID, "INIT_ACK" },
- { SCTP_SACK_CHUNK_ID, "SACK" },
- { SCTP_HEARTBEAT_CHUNK_ID, "HEARTBEAT" },
- { SCTP_HEARTBEAT_ACK_CHUNK_ID, "HEARTBEAT_ACK" },
- { SCTP_ABORT_CHUNK_ID, "ABORT" },
- { SCTP_SHUTDOWN_CHUNK_ID, "SHUTDOWN" },
- { SCTP_SHUTDOWN_ACK_CHUNK_ID, "SHUTDOWN_ACK" },
- { SCTP_ERROR_CHUNK_ID, "ERROR" },
- { SCTP_COOKIE_ECHO_CHUNK_ID, "COOKIE_ECHO" },
- { SCTP_COOKIE_ACK_CHUNK_ID, "COOKIE_ACK" },
- { SCTP_ECNE_CHUNK_ID, "ECNE" },
- { SCTP_CWR_CHUNK_ID, "CWR" },
+ { SCTP_DATA_CHUNK_ID, "DATA" },
+ { SCTP_INIT_CHUNK_ID, "INIT" },
+ { SCTP_INIT_ACK_CHUNK_ID, "INIT_ACK" },
+ { SCTP_SACK_CHUNK_ID, "SACK" },
+ { SCTP_HEARTBEAT_CHUNK_ID, "HEARTBEAT" },
+ { SCTP_HEARTBEAT_ACK_CHUNK_ID, "HEARTBEAT_ACK" },
+ { SCTP_ABORT_CHUNK_ID, "ABORT" },
+ { SCTP_SHUTDOWN_CHUNK_ID, "SHUTDOWN" },
+ { SCTP_SHUTDOWN_ACK_CHUNK_ID, "SHUTDOWN_ACK" },
+ { SCTP_ERROR_CHUNK_ID, "ERROR" },
+ { SCTP_COOKIE_ECHO_CHUNK_ID, "COOKIE_ECHO" },
+ { SCTP_COOKIE_ACK_CHUNK_ID, "COOKIE_ACK" },
+ { SCTP_ECNE_CHUNK_ID, "ECNE" },
+ { SCTP_CWR_CHUNK_ID, "CWR" },
{ SCTP_SHUTDOWN_COMPLETE_CHUNK_ID, "SHUTDOWN_COMPLETE" },
- { SCTP_AUTH_CHUNK_ID, "AUTH" },
- { SCTP_NR_SACK_CHUNK_ID, "NR-SACK" },
- { SCTP_ASCONF_ACK_CHUNK_ID, "ASCONF_ACK" },
- { SCTP_PKTDROP_CHUNK_ID, "PKTDROP" },
- { SCTP_RE_CONFIG_CHUNK_ID, "RE_CONFIG" },
- { SCTP_PAD_CHUNK_ID, "PAD" },
- { SCTP_FORWARD_TSN_CHUNK_ID, "FORWARD_TSN" },
- { SCTP_ASCONF_CHUNK_ID, "ASCONF" },
- { SCTP_IETF_EXT, "IETF_EXTENSION" },
- { 0, NULL } };
+ { SCTP_AUTH_CHUNK_ID, "AUTH" },
+ { SCTP_NR_SACK_CHUNK_ID, "NR-SACK" },
+ { SCTP_ASCONF_ACK_CHUNK_ID, "ASCONF_ACK" },
+ { SCTP_PKTDROP_CHUNK_ID, "PKTDROP" },
+ { SCTP_RE_CONFIG_CHUNK_ID, "RE_CONFIG" },
+ { SCTP_PAD_CHUNK_ID, "PAD" },
+ { SCTP_FORWARD_TSN_CHUNK_ID, "FORWARD_TSN" },
+ { SCTP_ASCONF_CHUNK_ID, "ASCONF" },
+ { SCTP_IETF_EXT, "IETF_EXTENSION" },
+ { 0, NULL } };
/* The below value is 255 */
#define NUM_CHUNKS 0x100
@@ -186,13 +186,13 @@ static const value_string chunk_type_values[] = {
#define MAX_SCTP_CHUNK_TYPE 256
typedef struct _tsn {
- guint32 frame_number;
- guint32 secs; /* Absolute seconds */
- guint32 usecs;
- address src;
- address dst;
- guint32 first_tsn;
- GList *tsns;
+ guint32 frame_number;
+ guint32 secs; /* Absolute seconds */
+ guint32 usecs;
+ address src;
+ address dst;
+ guint32 first_tsn;
+ GList *tsns;
} tsn_t;
typedef struct _sctp_tmp_info {
@@ -217,7 +217,7 @@ typedef struct _sctp_min_max {
guint32 tmp_min_tsn2;
guint32 tmp_max_tsn1;
guint32 tmp_max_tsn2;
- gint tmp_secs;
+ gint tmp_secs;
} sctp_min_max_t;
struct tsn_sort{
@@ -230,107 +230,107 @@ struct tsn_sort{
};
typedef struct _sctp_addr_chunk {
- guint32 direction;
- address* addr;
+ guint32 direction;
+ address *addr;
/* The array is initialized to MAX_SCTP_CHUNK_TYPE
* so that there is no memory overwrite
* when accessed using sctp chunk type as index.
*/
- guint32 addr_count[MAX_SCTP_CHUNK_TYPE];
+ guint32 addr_count[MAX_SCTP_CHUNK_TYPE];
} sctp_addr_chunk;
typedef struct _sctp_assoc_info {
- guint16 assoc_id;
- address src;
- address dst;
- guint16 port1;
- guint16 port2;
- guint32 verification_tag1;
- guint32 verification_tag2;
- guint32 initiate_tag;
- guint32 n_tvbs;
- GList *addr1;
- GList *addr2;
- guint16 instream1;
- guint16 outstream1;
- guint16 instream2;
- guint16 outstream2;
- guint32 n_adler32_calculated;
- guint32 n_adler32_correct;
- guint32 n_crc32c_calculated;
- guint32 n_crc32c_correct;
- gchar checksum_type[8];
- guint32 n_checksum_errors;
- guint32 n_bundling_errors;
- guint32 n_padding_errors;
- guint32 n_length_errors;
- guint32 n_value_errors;
- guint32 n_data_chunks;
- guint32 n_forward_chunks;
- guint32 n_forward_chunks_ep1;
- guint32 n_forward_chunks_ep2;
- guint32 n_data_bytes;
- guint32 n_packets;
- guint32 n_data_chunks_ep1;
- guint32 n_data_bytes_ep1;
- guint32 n_data_chunks_ep2;
- guint32 n_data_bytes_ep2;
- guint32 n_sack_chunks_ep1;
- guint32 n_sack_chunks_ep2;
- guint32 n_array_tsn1;
- guint32 n_array_tsn2;
- guint32 max_window1;
- guint32 max_window2;
- guint32 arwnd1;
- guint32 arwnd2;
- gboolean init;
- gboolean initack;
- guint16 initack_dir;
- guint16 direction;
- guint32 min_secs;
- guint32 min_usecs;
- guint32 max_secs;
- guint32 max_usecs;
- guint32 min_tsn1;
- guint32 min_tsn2;
- guint32 max_tsn1;
- guint32 max_tsn2;
- guint32 max_bytes1;
- guint32 max_bytes2;
- GSList *min_max;
- GList *frame_numbers;
- GList *tsn1;
+ guint16 assoc_id;
+ address src;
+ address dst;
+ guint16 port1;
+ guint16 port2;
+ guint32 verification_tag1;
+ guint32 verification_tag2;
+ guint32 initiate_tag;
+ guint32 n_tvbs;
+ GList *addr1;
+ GList *addr2;
+ guint16 instream1;
+ guint16 outstream1;
+ guint16 instream2;
+ guint16 outstream2;
+ guint32 n_adler32_calculated;
+ guint32 n_adler32_correct;
+ guint32 n_crc32c_calculated;
+ guint32 n_crc32c_correct;
+ gchar checksum_type[8];
+ guint32 n_checksum_errors;
+ guint32 n_bundling_errors;
+ guint32 n_padding_errors;
+ guint32 n_length_errors;
+ guint32 n_value_errors;
+ guint32 n_data_chunks;
+ guint32 n_forward_chunks;
+ guint32 n_forward_chunks_ep1;
+ guint32 n_forward_chunks_ep2;
+ guint32 n_data_bytes;
+ guint32 n_packets;
+ guint32 n_data_chunks_ep1;
+ guint32 n_data_bytes_ep1;
+ guint32 n_data_chunks_ep2;
+ guint32 n_data_bytes_ep2;
+ guint32 n_sack_chunks_ep1;
+ guint32 n_sack_chunks_ep2;
+ guint32 n_array_tsn1;
+ guint32 n_array_tsn2;
+ guint32 max_window1;
+ guint32 max_window2;
+ guint32 arwnd1;
+ guint32 arwnd2;
+ gboolean init;
+ gboolean initack;
+ guint16 initack_dir;
+ guint16 direction;
+ guint32 min_secs;
+ guint32 min_usecs;
+ guint32 max_secs;
+ guint32 max_usecs;
+ guint32 min_tsn1;
+ guint32 min_tsn2;
+ guint32 max_tsn1;
+ guint32 max_tsn2;
+ guint32 max_bytes1;
+ guint32 max_bytes2;
+ GSList *min_max;
+ GList *frame_numbers;
+ GList *tsn1;
GPtrArray *sort_tsn1;
GPtrArray *sort_sack1;
- GList *sack1;
- GList *tsn2;
+ GList *sack1;
+ GList *tsn2;
GPtrArray *sort_tsn2;
GPtrArray *sort_sack2;
- GList *sack2;
- gboolean check_address;
- GList* error_info_list;
+ GList *sack2;
+ gboolean check_address;
+ GList* error_info_list;
/* The array is initialized to MAX_SCTP_CHUNK_TYPE
* so that there is no memory overwrite
* when accessed using sctp chunk type as index.
*/
- guint32 chunk_count[MAX_SCTP_CHUNK_TYPE];
- guint32 ep1_chunk_count[MAX_SCTP_CHUNK_TYPE];
- guint32 ep2_chunk_count[MAX_SCTP_CHUNK_TYPE];
- GList* addr_chunk_count;
+ guint32 chunk_count[MAX_SCTP_CHUNK_TYPE];
+ guint32 ep1_chunk_count[MAX_SCTP_CHUNK_TYPE];
+ guint32 ep2_chunk_count[MAX_SCTP_CHUNK_TYPE];
+ GList *addr_chunk_count;
} sctp_assoc_info_t;
typedef struct _sctp_error_info {
- guint32 frame_number;
- gchar chunk_info[200];
- const gchar *info_text;
+ guint32 frame_number;
+ gchar chunk_info[200];
+ const gchar *info_text;
} sctp_error_info_t;
typedef struct _sctp_allassocs_info {
- guint32 sum_tvbs;
- GList* assoc_info_list;
- gboolean is_registered;
- GList* children;
+ guint32 sum_tvbs;
+ GList *assoc_info_list;
+ gboolean is_registered;
+ GList *children;
} sctp_allassocs_info_t;
@@ -350,5 +350,17 @@ const sctp_assoc_info_t* get_selected_assoc(void);
}
#endif /* __cplusplus */
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
#endif /* __TAP_SCTP_ANALYSIS_H__ */
diff --git a/ui/time_shift.h b/ui/time_shift.h
index 282f1e9d46..510280b7e3 100644
--- a/ui/time_shift.h
+++ b/ui/time_shift.h
@@ -98,4 +98,17 @@ const gchar * time_shift_undo(capture_file *cf);
}
#endif /* __cplusplus */
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
+
#endif /* __TIME_SHIFT_H__ */