[svn] commit: r150 - /branches/f2f200910/src/bin/host/host.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Oct 28 23:44:46 UTC 2009
Author: jreed
Date: Wed Oct 28 23:44:45 2009
New Revision: 150
Log:
Comment out sendTo for now.
Add basic usage output.
Used wrong argv, fixed.
Modified:
branches/f2f200910/src/bin/host/host.cc
Modified: branches/f2f200910/src/bin/host/host.cc
==============================================================================
--- branches/f2f200910/src/bin/host/host.cc (original)
+++ branches/f2f200910/src/bin/host/host.cc Wed Oct 28 23:44:45 2009
@@ -21,16 +21,18 @@
{
Message msg;
- if (argc) {
+ if (argc < 2) {
+ cout << "Usage: host _hostname_\n";
+ }
+ else {
- cout << argv[0];
-
+ cout << argv[1] << "\n";
msg.setQid(0); // does this matter?
// TODO: add switch for this
msg.setRD(true); // set recursive bit
- msg.addQuestion(Name(argv[0]),
+ msg.addQuestion(Name(argv[1]),
RRClass::IN, // IN class only for now
RRType(dns_type));
@@ -46,8 +48,8 @@
char* sin_addr;
inet_pton(AF_INET, "127.0.0.1", sin_addr);
int size = sizeof(sin_addr);
-
- msg.SingleBuffer().sendTo(s, sin_addr, size);
+
+// msg.SingleBuffer().sendTo(s, sin_addr, size);
}
}
More information about the bind10-changes
mailing list