]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
readme and format tweak
authorMiek Gieben <miekg@NLnetLabs.nl>
Wed, 8 Mar 2006 14:58:42 +0000 (14:58 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Wed, 8 Mar 2006 14:58:42 +0000 (14:58 +0000)
examples/README.pcat
examples/pcat-print.c

index f10ccd9ed9233b7e79c0095b5bd95eda0aac36f8..7397353e6272b90daa1a12b0da9e39a25a84bbf6 100644 (file)
@@ -42,3 +42,7 @@ pcat-diff:
 If we to see what actual packets that differ (if they can be parsed) we
 can use pcap-print:
    pcap-print reply.diff
+
+Or it can all be done with pipes, eliminating the need of files.
+./pcat-diff <(./pcat -a 213.154.224.1 20011009-134418-q50000.pkt) \
+<(./pcat 213.154.224.1 -p 5454 20011009-134418-q50000.pkt) | ./pcat-print      
index a40c26e6fd451b9eba0d1932d396a131008f7283..3bff68a860b30c2d7de8af09b818ee7c2428008c 100644 (file)
@@ -23,6 +23,8 @@ usage(FILE *fp)
         fprintf(fp, "\nOUTPUT FORMAT:\n");
         fprintf(fp, "  Each record consists of an index and then three packets.\n");
         fprintf(fp, "  Each packet is seperated by a line of '='s.\n");
+        fprintf(fp, "    ==============\n");
+        fprintf(fp, "    ==============\n");
         fprintf(fp, "    Index: xxx:xxx\n");
         fprintf(fp, "    ==============\n");
         fprintf(fp, "    query packet\n");
@@ -80,6 +82,8 @@ main(int argc, char **argv)
                line[read - 1] = '\0';
                switch(i % 4) {
                        case SEQUENCE:
+                               printf_bar();
+                               printf_bar();
                                printf("Index: %s\n", line);
                                printf_bar();
                                break;
@@ -99,7 +103,6 @@ main(int argc, char **argv)
                                } else {
                                        ldns_pkt_print(stdout, p);
                                }
-                               printf_bar();
                                break;
                }
                i++;