Add new files to cmake as well
[metze/wireshark/wip.git] / tap-sipstat.c
index c883d7a6ece82f2f6d0dfbb0d7f2965d21d3dcb7..5d545b66f13e76e6f20c16a4966038f266fa45f2 100644 (file)
@@ -38,7 +38,6 @@
 #include <epan/tap.h>
 #include <epan/stat_cmd_args.h>
 #include "epan/value_string.h"
-#include "register.h"
 #include <epan/dissectors/packet-sip.h>
 
 /* used to keep track of the statictics for an entire program interface */
@@ -83,6 +82,7 @@ static const value_string vals_status_code[] = {
 
     { 200, "OK"},
     { 202, "Accepted"},
+    { 204, "No Notification"},
     { 299, "Success - Others"},        /* used to keep track of other Success packets */
 
     { 300, "Multiple Choices"},
@@ -111,7 +111,16 @@ static const value_string vals_status_code[] = {
     { 421, "Extension Required"},
     { 422, "Session Timer Too Small"},
     { 423, "Interval Too Brief"},
+    { 428, "Use Identity Header"},
     { 429, "Provide Referrer Identity"},
+    { 430, "Flow Failed"},
+    { 433, "Anonymity Disallowed"},
+    { 436, "Bad Identity-Info"},
+    { 437, "Unsupported Certificate"},
+    { 438, "Invalid Identity Header"},
+    { 439, "First Hop Lacks Outbound Support"},
+    { 440, "Max-Breadth Exceeded"},
+    { 470, "Consent Needed"},
     { 480, "Temporarily Unavailable"},
     { 481, "Call/Transaction Does Not Exist"},
     { 482, "Loop Detected"},
@@ -237,7 +246,7 @@ sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const
 {
     const sip_info_value_t *value=pri;
     sipstat_t *sp = (sipstat_t *)psp;
-    
+
     /* Total number of packets, including continuation packets */
     sp->packets++;
 
@@ -259,17 +268,17 @@ sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const
                                sp->min_setup_time = value->setup_time;
                        }
                        /* Calculate average */
-                       sp->average_setup_time = (guint32)(sp->total_setup_time / sp->no_of_completed_calls); 
+                       sp->average_setup_time = (guint32)(sp->total_setup_time / sp->no_of_completed_calls);
                }
        }
-    
+
     /* Update resent count if flag set */
     if (value->resend)
     {
         sp->resent_packets++;
     }
 
-    
+
     /* Looking at both requests and responses */
     if (value->response_code != 0)
     {
@@ -378,7 +387,7 @@ sipstat_draw(void *psp  )
        printf("\n* List of SIP Request methods\n");
        g_hash_table_foreach( sp->hash_requests,  (GHFunc)sip_draw_hash_requests,
                "  %-15s : %5d Packets\n");
-       printf( "\n* Average setuptime %d ms\n Min %d ms\n Max %d ms\n", sp->average_setup_time);
+       printf( "\n* Average setup time %d ms\n Min %d ms\n Max %d ms\n", sp->average_setup_time, sp->min_setup_time, sp->max_setup_time);
        printf("===================================================================\n");
 }
 
@@ -408,6 +417,7 @@ sipstat_init(const char *optarg, void* userdata _U_)
                        "sip",
                        sp,
                        filter,
+                       0,
                        sipstat_reset,
                        sipstat_packet,
                        sipstat_draw);