aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2008-07-11 21:13:39 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2008-07-11 21:13:39 +0000
commit71c1e4faf015c565e543b78b7324b6eb6d528f07 (patch)
tree5e1e69aa616bb4bdffc060e562f4230fdad6b1f9 /epan/dissectors
parentbde286846f5b4c4589cb8d9256a6282720e96086 (diff)
Change the stats tree API to use signed chars instead of guint8s for all its
strings; this should fix a number of signed/unsigned char warnings. Reindent a bunch, too. svn path=/trunk/; revision=25716
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-http.c46
-rw-r--r--epan/dissectors/packet-isup.c11
-rw-r--r--epan/dissectors/packet-smpp.c5
-rw-r--r--epan/dissectors/packet-ucp.c16
4 files changed, 49 insertions, 29 deletions
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index 17c8f1f359..b7b83482fc 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -277,7 +277,9 @@ static int st_node_reqs_by_http_host = -1;
static int st_node_resps_by_srv_addr = -1;
/* HTTP/Load Distribution stats init function */
-static void http_reqs_stats_tree_init(stats_tree* st) {
+static void
+http_reqs_stats_tree_init(stats_tree* st)
+{
st_node_reqs = stats_tree_create_node(st, st_str_reqs, 0, TRUE);
st_node_reqs_by_srv_addr = stats_tree_create_node(st, st_str_reqs_by_srv_addr, st_node_reqs, TRUE);
st_node_reqs_by_http_host = stats_tree_create_node(st, st_str_reqs_by_http_host, st_node_reqs, TRUE);
@@ -285,7 +287,9 @@ static void http_reqs_stats_tree_init(stats_tree* st) {
}
/* HTTP/Load Distribution stats packet function */
-static int http_reqs_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt _U_, const void* p) {
+static int
+http_reqs_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt _U_, const void* p)
+{
const http_info_value_t* v = p;
int reqs_by_this_host;
int reqs_by_this_addr;
@@ -331,15 +335,19 @@ static int http_reqs_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_
static int st_node_requests_by_host = -1;
-static const guint8* st_str_requests_by_host = "HTTP Requests by HTTP Host";
+static const gchar *st_str_requests_by_host = "HTTP Requests by HTTP Host";
/* HTTP/Requests stats init function */
-static void http_req_stats_tree_init(stats_tree* st) {
+static void
+http_req_stats_tree_init(stats_tree* st)
+{
st_node_requests_by_host = stats_tree_create_node(st, st_str_requests_by_host, 0, TRUE);
}
/* HTTP/Requests stats packet function */
-static int http_req_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p) {
+static int
+http_req_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
+{
const http_info_value_t* v = p;
int reqs_by_this_host;
@@ -360,16 +368,16 @@ static int http_req_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, ep
return 0;
}
-static const guint8* st_str_packets = "Total HTTP Packets";
-static const guint8* st_str_requests = "HTTP Request Packets";
-static const guint8* st_str_responses = "HTTP Response Packets";
-static const guint8* st_str_resp_broken = "???: broken";
-static const guint8* st_str_resp_100 = "1xx: Informational";
-static const guint8* st_str_resp_200 = "2xx: Success";
-static const guint8* st_str_resp_300 = "3xx: Redirection";
-static const guint8* st_str_resp_400 = "4xx: Client Error";
-static const guint8* st_str_resp_500 = "5xx: Server Error";
-static const guint8* st_str_other = "Other HTTP Packets";
+static const gchar *st_str_packets = "Total HTTP Packets";
+static const gchar *st_str_requests = "HTTP Request Packets";
+static const gchar *st_str_responses = "HTTP Response Packets";
+static const gchar *st_str_resp_broken = "???: broken";
+static const gchar *st_str_resp_100 = "1xx: Informational";
+static const gchar *st_str_resp_200 = "2xx: Success";
+static const gchar *st_str_resp_300 = "3xx: Redirection";
+static const gchar *st_str_resp_400 = "4xx: Client Error";
+static const gchar *st_str_resp_500 = "5xx: Server Error";
+static const gchar *st_str_other = "Other HTTP Packets";
static int st_node_packets = -1;
static int st_node_requests = -1;
@@ -384,7 +392,9 @@ static int st_node_other = -1;
/* HTTP/Packet Counter stats init function */
-static void http_stats_tree_init(stats_tree* st) {
+static void
+http_stats_tree_init(stats_tree* st)
+{
st_node_packets = stats_tree_create_node(st, st_str_packets, 0, TRUE);
st_node_requests = stats_tree_create_pivot(st, st_str_requests, st_node_packets);
st_node_responses = stats_tree_create_node(st, st_str_responses, st_node_packets, TRUE);
@@ -398,7 +408,9 @@ static void http_stats_tree_init(stats_tree* st) {
}
/* HTTP/Packet Counter stats packet function */
-static int http_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p) {
+static int
+http_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
+{
const http_info_value_t* v = p;
guint i = v->response_code;
int resp_grp;
diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c
index cb089a5a7e..dcb252ab89 100644
--- a/epan/dissectors/packet-isup.c
+++ b/epan/dissectors/packet-isup.c
@@ -7228,12 +7228,16 @@ dissect_application_isup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int st_node_msg = -1;
static int st_node_dir = -1;
-static void msg_stats_tree_init(stats_tree* st) {
+static void
+msg_stats_tree_init(stats_tree* st)
+{
st_node_msg = stats_tree_create_node(st, "Messages by Type", 0, TRUE);
st_node_dir = stats_tree_create_node(st, "Messages by Direction", 0, TRUE);
}
-static int msg_stats_tree_packet(stats_tree *st , packet_info *pinfo, epan_dissect_t *edt _U_, const void *p ) {
+static int
+msg_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p )
+{
const gchar* msg = match_strval(((const isup_tap_rec_t*)p)->message_type, isup_message_type_value_acro);
gchar src[MAX_ADDR_STR_LEN];
gchar dst[MAX_ADDR_STR_LEN];
@@ -8249,7 +8253,8 @@ proto_register_isup(void)
&isup_apm_desegment);
/* Register the stats_tree */
- stats_tree_register("isup","isup_msg","ISUP Messages", msg_stats_tree_packet, msg_stats_tree_init, NULL );
+ stats_tree_register("isup", "isup_msg", "ISUP Messages",
+ msg_stats_tree_packet, msg_stats_tree_init, NULL);
}
diff --git a/epan/dissectors/packet-smpp.c b/epan/dissectors/packet-smpp.c
index a6acdc8956..9293e9aa94 100644
--- a/epan/dissectors/packet-smpp.c
+++ b/epan/dissectors/packet-smpp.c
@@ -227,7 +227,7 @@ static gboolean reassemble_over_tcp = TRUE;
static int smpp_tap = -1;
/* Stats Tree */
-static guint8* st_str_smpp = "SMPP Operations";
+static gchar* st_str_smpp = "SMPP Operations";
/*
* Value-arrays for field-contents
@@ -2880,5 +2880,6 @@ proto_reg_handoff_smpp(void)
DISSECTOR_ASSERT(gsm_sms_handle);
/* Tapping setup */
- stats_tree_register("smpp","smpp_commands", st_str_smpp, smpp_stats_tree_per_packet, smpp_stats_tree_init, NULL);
+ stats_tree_register("smpp","smpp_commands", st_str_smpp,
+ smpp_stats_tree_per_packet, smpp_stats_tree_init, NULL);
}
diff --git a/epan/dissectors/packet-ucp.c b/epan/dissectors/packet-ucp.c
index 82f85690a8..927886230d 100644
--- a/epan/dissectors/packet-ucp.c
+++ b/epan/dissectors/packet-ucp.c
@@ -110,12 +110,12 @@ static int st_ucp_results = -1;
static int st_ucp_results_pos = -1;
static int st_ucp_results_neg = -1;
-static guint8* st_str_ucp = "UCP Messages";
-static guint8* st_str_ops = "Operations";
-static guint8* st_str_res = "Results";
-static guint8* st_str_ucp_res = "UCP Results Acks/Nacks";
-static guint8* st_str_pos = "Positive";
-static guint8* st_str_neg = "Negative";
+static gchar* st_str_ucp = "UCP Messages";
+static gchar* st_str_ops = "Operations";
+static gchar* st_str_res = "Results";
+static gchar* st_str_ucp_res = "UCP Results Acks/Nacks";
+static gchar* st_str_pos = "Positive";
+static gchar* st_str_neg = "Negative";
/*
* Data (variable) section
@@ -2757,5 +2757,7 @@ proto_reg_handoff_ucp(void)
dissector_add_handle("tcp.port", ucp_handle);
/* Tapping setup */
- stats_tree_register("ucp", "ucp_messages", st_str_ucp, ucp_stats_tree_per_packet, ucp_stats_tree_init, NULL);
+ stats_tree_register("ucp", "ucp_messages", st_str_ucp,
+ ucp_stats_tree_per_packet, ucp_stats_tree_init,
+ NULL);
}