Add #ifndef __PRIVILEGES_H__ / #define / #endif logic to prevent multiple
[obnox/wireshark/wip.git] / tap-sctpchunkstat.c
index a7ef6efa04ee968cb0ada9329cec82d454a5a41c..fcb82852408b0ebb2404adc563b8f2ee53fac142 100644 (file)
@@ -39,7 +39,6 @@
 #include <epan/tap.h>
 #include <epan/stat_cmd_args.h>
 #include "epan/value_string.h"
-#include "register.h"
 #include <epan/dissectors/packet-sctp.h>
 #include <epan/to_str.h>
 
@@ -105,7 +104,8 @@ sctpstat_reset(void *phs)
 }
 
 
-sctp_ep_t* alloc_sctp_ep(struct _sctp_info *si)
+static sctp_ep_t*
+alloc_sctp_ep(const struct _sctp_info *si)
 {
        sctp_ep_t* ep;
        guint16 chunk_type;
@@ -135,7 +135,7 @@ sctpstat_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, cons
 
        sctpstat_t *hs=(sctpstat_t *)phs;
        sctp_ep_t *tmp = NULL, *te = NULL;
-       struct _sctp_info *si = (struct _sctp_info *) phi;
+       const struct _sctp_info *si = (const struct _sctp_info *) phi;
        guint32 tvb_number;
        guint8 chunk_type;
 
@@ -199,8 +199,8 @@ sctpstat_draw(void *phs)
 
        for(tmp = list ; tmp ; tmp=tmp->next) {
                printf("|%15s|%5u|%15s|%5u|%8u|%8u|%8u|%8u|%8u|%8u|%8u|%8u|%8u|%8u|\n",
-                      address_to_str(&tmp->src),tmp->sport,
-                      address_to_str(&tmp->dst),tmp->dport,
+                      ep_address_to_str(&tmp->src),tmp->sport,
+                      ep_address_to_str(&tmp->dst),tmp->dport,
                       tmp->chunk_count[SCTP_DATA_CHUNK_ID],
                       tmp->chunk_count[SCTP_SACK_CHUNK_ID],
                       tmp->chunk_count[SCTP_HEARTBEAT_CHUNK_ID],
@@ -222,7 +222,7 @@ sctpstat_init(const char *optarg, void* userdata _U_)
        sctpstat_t *hs;
        GString *error_string;
 
-       hs = g_malloc(sizeof(sctpstat_t));
+       hs = (sctpstat_t *)g_malloc(sizeof(sctpstat_t));
        if(!strncmp(optarg,"sctp,stat,",11)){
                hs->filter=g_strdup(optarg+11);
        } else {