White space changes.
[obnox/wireshark/wip.git] / tap-sipstat.c
index e3b281c93875ab30633cf377530463f4494a5e5c..b8273219baef0d3dc8da84210d0cfc214bef3f55 100644 (file)
@@ -2,7 +2,7 @@
  * sip message counter for wireshark
  *
  * $Id$
- * Copied from gtk/sip_stat.c and tap-httpstat.c
+ * Copied from ui/gtk/sip_stat.c and tap-httpstat.c
  *
  * Wireshark - Network traffic analyzer
  * By Gerald Combs <gerald@wireshark.org>
 #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 */
 typedef struct _sip_stats_t {
-       char            *filter;
+       char            *filter;
        guint32         packets;        /* number of sip packets, including continuations */
        guint32         resent_packets;
        guint32         average_setup_time;
@@ -59,8 +58,8 @@ typedef struct _sip_stats_t {
  * for example it can be { 3, 404, "Not Found" ,...}
  * which means we captured 3 reply sip/1.1 404 Not Found */
 typedef struct _sip_response_code_t {
-       guint32          packets;               /* 3 */
-       guint            response_code;         /* 404 */
+       guint32  packets;               /* 3 */
+       guint            response_code;         /* 404 */
        const gchar     *name;                  /* Not Found */
        sipstat_t       *sp;
 } sip_response_code_t;
@@ -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"},
@@ -142,7 +151,7 @@ static const value_string vals_status_code[] = {
     { 606, "Not Acceptable"},
     { 699, "Global Failure - Others"},
 
-    { 0,       NULL}
+    { 0,       NULL}
 };
 
 /* Create tables for responses and requests */
@@ -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)
     {