From: Miek Gieben Date: Wed, 8 Mar 2006 14:58:42 +0000 (+0000) Subject: readme and format tweak X-Git-Tag: release-1.1.0~312 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a7733f33e8882a62436188ca2f26ae4ece6f7cd;p=thirdparty%2Fldns.git readme and format tweak --- diff --git a/examples/README.pcat b/examples/README.pcat index f10ccd9e..7397353e 100644 --- a/examples/README.pcat +++ b/examples/README.pcat @@ -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 diff --git a/examples/pcat-print.c b/examples/pcat-print.c index a40c26e6..3bff68a8 100644 --- a/examples/pcat-print.c +++ b/examples/pcat-print.c @@ -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++;