]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
usage added
authorMiek Gieben <miekg@NLnetLabs.nl>
Mon, 6 Mar 2006 13:57:09 +0000 (13:57 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Mon, 6 Mar 2006 13:57:09 +0000 (13:57 +0000)
examples/ldns-cat-pcap.c

index 271d17231b7a1d334e6e6b726c19a975a1460599..2efab9bac5b54c46b0417f565f1209da8bcab05f 100644 (file)
 #endif
 
 
-/** 
- * general layout
- *
- * read in a pcap file (tcpdumped)
- * walk over the packets, dump them when pcap_dump()
- * send packet to nameserver, ldns_send_udp
- *     which can handle raw buffers
- * wait for an reply
- * also write this with pcap_dump
- */
+void
+usage(FILE *fp, char *progname)
+{
+       fprintf(fp, "%s: [-a IP] [-p PORT} PCAP_FILE\n\n");
+       fprintf(fp, "   -a IP\tuse IP as nameserver\n");
+       fprintf(fp, "   -p PORT\tuse POTR as port\n");
+       fprintf(fp, "  PCAP_FILE\tuse this file as source\n");
+       fprintf(fp, "  If no file is given standard output is read\n\n");
+       fprintf(fp, "  if no address is given 127.0.0.1 port 53 is user\n");
+}
+
 
 u_char *
 pcap2ldns_pkt_ip(const u_char *packet, struct pcap_pkthdr *h)