debug keys
[metze/wireshark/wip.git] / text2pcap.c
index 309f4704c6238a7699e3ab2bc0fcf5c5b17b20e4..226d53094fe6c9d31941bcbde22328cf5c0f7f61 100644 (file)
@@ -19,7 +19,7 @@
  * This utility reads in an ASCII hexdump of this common format:
  *
  * 00000000  00 E0 1E A7 05 6F 00 10 5A A0 B9 12 08 00 46 00 .....o..Z.....F.
- * 00000010  03 68 00 00 00 00 0A 2E EE 33 0F 19 08 7F 0F 19 .h.......3...\7f..
+ * 00000010  03 68 00 00 00 00 0A 2E EE 33 0F 19 08 7F 0F 19 .h.......3......
  * 00000020  03 80 94 04 00 00 10 01 16 A2 0A 00 03 50 00 0C .............P..
  * 00000030  01 01 0F 19 03 80 11 01 1E 61 00 0C 03 01 0F 19 .........a......
  *
@@ -196,7 +196,7 @@ static gboolean identify_ascii = FALSE;
 static gboolean has_direction = FALSE;
 static guint32 direction = 0;
 
-/*--- Local date -----------------------------------------------------------------*/
+/*--- Local data -----------------------------------------------------------------*/
 
 /* This is where we store the packet currently being built */
 static guint8  packet_buf[WTAP_MAX_PACKET_SIZE_STANDARD];
@@ -291,14 +291,16 @@ typedef struct {
 
 /* Fixed IP address values */
 #if G_BYTE_ORDER == G_BIG_ENDIAN
+#define IP_ID  0x1234
 #define IP_SRC 0x0a010101
 #define IP_DST 0x0a020202
 #else
+#define IP_ID  0x3412
 #define IP_SRC 0x0101010a
 #define IP_DST 0x0202020a
 #endif
 
-static hdr_ip_t HDR_IP = {0x45, 0, 0, 0x3412, 0, 0, 0xff, 0, 0, IP_SRC, IP_DST};
+static hdr_ip_t HDR_IP = {0x45, 0, 0, IP_ID, 0, 0, 0xff, 0, 0, IP_SRC, IP_DST};
 
 static struct {         /* pseudo header for checksum calculation */
     guint32 src_addr;
@@ -877,7 +879,7 @@ write_file_header (void)
         char *comment;
 
         comment = g_strdup_printf("Generated from input file %s.", input_filename);
-        success = pcapng_write_session_header_block(output_file,
+        success = pcapng_write_section_header_block(output_file,
                                                     comment,
                                                     NULL,    /* HW */
                                                     NULL,    /* OS */
@@ -1851,7 +1853,7 @@ parse_options (int argc, char *argv[])
 }
 
 int
-real_main(int argc, char *argv[])
+main(int argc, char *argv[])
 {
     int ret = EXIT_SUCCESS;