Make Content-Length and Max-Forwards fields uints
[obnox/wireshark/wip.git] / rdps.c
diff --git a/rdps.c b/rdps.c
index 2f8209de83b743451623591f02495c21d10dff29..a28c48605d7b5aae00ad0fb8fe8cb670baa94a25 100644 (file)
--- a/rdps.c
+++ b/rdps.c
@@ -2,8 +2,8 @@
  *
  * $Id$
  * 
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
  * This program is free software; you can redistribute it and/or
@@ -39,13 +39,13 @@ with 2 functions:
 
 #define BUFFER_SIZE 1024
 
-void start_code(FILE *fd, char *func);
+void start_code(FILE *fd, const char *func);
 void write_code(FILE *fd, char *string);
 void end_code(FILE *fd);
 void ps_clean_string(char *out, const char *in,
                        int outbuf_size);
 
-enum ps_state { null, preamble, hex, finale };
+enum ps_state { null, preamble, finale };
 
 int main(int argc, char **argv)
 {
@@ -76,29 +76,19 @@ int main(int argc, char **argv)
        while (fgets(buf, BUFFER_SIZE - 1, input)) {
 
                if (state == null) {
-                       if (strcmp(buf, "% ---- ethereal preamble start ---- %\n") == 0) {
+                       if (strcmp(buf, "% ---- wireshark preamble start ---- %\n") == 0) {
                                state = preamble;
                                start_code(output, "preamble");
                                continue;
                        }
-                       else if (strcmp(buf, "% ---- ethereal finale start ---- %\n") == 0) {
+                       else if (strcmp(buf, "% ---- wireshark finale start ---- %\n") == 0) {
                                state = finale;
                                start_code(output, "finale");
                                continue;
                        }
                }
                else if (state == preamble) {
-                       if (strcmp(buf, "% ---- ethereal preamble end ---- %\n") == 0) {
-                               state = null;
-                               end_code(output);
-                               continue;
-                       }
-                       else {
-                               write_code(output, buf);
-                       }
-               }
-               else if (state == hex) {
-                       if (strcmp(buf, "% ---- ethereal hex end ---- %\n") == 0) {
+                       if (strcmp(buf, "% ---- wireshark preamble end ---- %\n") == 0) {
                                state = null;
                                end_code(output);
                                continue;
@@ -108,7 +98,7 @@ int main(int argc, char **argv)
                        }
                }
                else if (state == finale) {
-                       if (strcmp(buf, "% ---- ethereal finale end ---- %\n") == 0) {
+                       if (strcmp(buf, "% ---- wireshark finale end ---- %\n") == 0) {
                                state = null;
                                end_code(output);
                                continue;
@@ -125,7 +115,7 @@ int main(int argc, char **argv)
         exit(0);
 }
 
-void start_code(FILE *fd, char *func)
+void start_code(FILE *fd, const char *func)
 {
        fprintf(fd, "/* Created by rdps.c. Do not edit! */\n");
        fprintf(fd, "void print_ps_%s(FILE *fd) {\n", func);