[svn] commit: r653 - in /experiments/each-query: ./ src/bin/ src/bin/auth/ src/lib/auth/cpp/
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Jan 29 20:09:46 UTC 2010
Author: each
Date: Fri Jan 29 20:09:46 2010
New Revision: 653
Log:
adding a new "b10-auth" binary. doesn't compile yet, but will be the
new auth server
Added:
experiments/each-query/src/bin/auth/
- copied from r633, experiments/each-query/src/bin/parkinglot/
experiments/each-query/src/bin/auth/auth.spec
Removed:
experiments/each-query/src/bin/auth/builtin.cc
experiments/each-query/src/bin/auth/builtin.h
experiments/each-query/src/bin/auth/parkinglot.cc
experiments/each-query/src/bin/auth/parkinglot.h
experiments/each-query/src/bin/auth/parkinglot.spec
experiments/each-query/src/bin/auth/zoneset.cc
experiments/each-query/src/bin/auth/zoneset.h
Modified:
experiments/each-query/configure.ac
experiments/each-query/src/bin/Makefile.am
experiments/each-query/src/bin/auth/Makefile.am
experiments/each-query/src/bin/auth/config.h.in
experiments/each-query/src/bin/auth/main.cc
experiments/each-query/src/lib/auth/cpp/Makefile.am
experiments/each-query/src/lib/auth/cpp/query.h
Modified: experiments/each-query/configure.ac
==============================================================================
--- experiments/each-query/configure.ac (original)
+++ experiments/each-query/configure.ac Fri Jan 29 20:09:46 2010
@@ -145,12 +145,12 @@
AC_CONFIG_FILES([Makefile
src/Makefile
src/bin/Makefile
+ src/bin/auth/Makefile
src/bin/bind10/Makefile
src/bin/cmd-ctrld/Makefile
src/bin/bindctl/Makefile
src/bin/host/Makefile
src/bin/msgq/Makefile
- src/bin/parkinglot/Makefile
src/lib/Makefile
src/lib/cc/Makefile
src/lib/cc/cpp/Makefile
@@ -168,7 +168,7 @@
src/bin/bindctl/bindctl
src/bin/msgq/msgq
src/bin/msgq/msgq_test
- src/bin/parkinglot/config.h
+ src/bin/auth/config.h
], [
chmod +x src/bin/bind-cfgd/bind-cfgd
chmod +x src/bin/cmd-ctrld/cmd-ctrld
Modified: experiments/each-query/src/bin/Makefile.am
==============================================================================
--- experiments/each-query/src/bin/Makefile.am (original)
+++ experiments/each-query/src/bin/Makefile.am Fri Jan 29 20:09:46 2010
@@ -1,1 +1,1 @@
-SUBDIRS = bind10 bindctl msgq parkinglot host cmd-ctrld
+SUBDIRS = auth bind10 bindctl msgq host cmd-ctrld
Modified: experiments/each-query/src/bin/auth/Makefile.am
==============================================================================
--- experiments/each-query/src/bin/auth/Makefile.am (original)
+++ experiments/each-query/src/bin/auth/Makefile.am Fri Jan 29 20:09:46 2010
@@ -1,11 +1,9 @@
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_srcdir)/ext
-bin_PROGRAMS = parkinglot
-parkinglot_SOURCES = common.cc common.h zoneset.h zoneset.cc parkinglot.cc
-parkinglot_SOURCES += parkinglot.h main.cc
-parkinglot_SOURCES += data_source_plot.h data_source_plot.cc
-parkinglot_SOURCES += data_source.h data_source.cc
-parkinglot_SOURCES += builtin.h builtin.cc
-parkinglot_LDADD = $(top_srcdir)/src/lib/dns/cpp/.libs/libdns.a
-parkinglot_LDADD += $(top_srcdir)/src/lib/config/cpp/libclient.a
-parkinglot_LDADD += $(top_srcdir)/src/lib/cc/cpp/libcc.a
+bin_PROGRAMS = b10-auth
+b10_auth_SOURCES = common.cc common.h
+b10_auth_SOURCES += main.cc
+b10_auth_SOURCES += auth.cc auth.h
+b10_auth_LDADD = $(top_srcdir)/src/lib/dns/cpp/.libs/libdns.a
+b10_auth_LDADD += $(top_srcdir)/src/lib/auth/cpp/.libs/libauth.a
+b10_auth_LDADD += $(top_srcdir)/src/lib/config/cpp/libclient.a
Modified: experiments/each-query/src/bin/auth/config.h.in
==============================================================================
--- experiments/each-query/src/bin/auth/config.h.in (original)
+++ experiments/each-query/src/bin/auth/config.h.in Fri Jan 29 20:09:46 2010
@@ -1,1 +1,1 @@
-#define PARKINGLOT_SPECFILE_LOCATION "@abs_top_srcdir@/src/bin/parkinglot/parkinglot.spec"
+#define AUTH_SPECFILE_LOCATION "@abs_top_srcdir@/src/bin/auth/auth.spec"
Modified: experiments/each-query/src/bin/auth/main.cc
==============================================================================
--- experiments/each-query/src/bin/auth/main.cc (original)
+++ experiments/each-query/src/bin/auth/main.cc Fri Jan 29 20:09:46 2010
@@ -34,40 +34,36 @@
#include <cc/cpp/data.h>
#include <config/cpp/ccsession.h>
-#include "zoneset.h"
-#include "parkinglot.h"
-
#include "common.h"
+#include "config.h"
+#include "auth.h"
#include <boost/foreach.hpp>
-#include "config.h"
-
using namespace std;
-const string PROGRAM = "ParkingLot";
+const string PROGRAM = "Auth";
const int DNSPORT = 5300;
/* need global var for config/command handlers.
- * todo: turn this around, and put handlers in the parkinglot
+ * todo: turn this around, and put handlers in the authserver
* class itself? */
-ParkingLot plot = ParkingLot(DNSPORT);
+AuthServer auth = AuthServer(DNSPORT);
static void
usage() {
- cerr << "Usage: parkinglot [-p port]" << endl;
+ cerr << "Usage: b10-auth [-p port]" << endl;
exit(1);
}
isc::data::ElementPtr
my_config_handler(isc::data::ElementPtr config)
{
- return plot.updateConfig(config);
+ return auth.updateConfig(config);
}
isc::data::ElementPtr
-my_command_handler(isc::data::ElementPtr command)
-{
+my_command_handler(isc::data::ElementPtr command) {
isc::data::ElementPtr answer = isc::data::Element::createFromString("{ \"result\": [0] }");
cout << "[XX] Handle command: " << endl << command->str() << endl;
@@ -102,16 +98,15 @@
if (argc - optind > 0)
usage();
- // initialize parking lot
- //plot = ParkingLot(port);
-
// initialize command channel
try {
- CommandSession cs = CommandSession(PROGRAM, PARKINGLOT_SPECFILE_LOCATION, my_config_handler, my_command_handler);
+ CommandSession cs = CommandSession(PROGRAM, AUTH_SPECFILE_LOCATION,
+ my_config_handler,
+ my_command_handler);
// main server loop
fd_set fds;
- int ps = plot.getSocket();
+ int ps = auth.getSocket();
int ss = cs.getSocket();
int nfds = max(ps, ss) + 1;
int counter = 0;
@@ -128,7 +123,7 @@
if (FD_ISSET(ps, &fds)) {
++counter;
- plot.processMessage();
+ auth.processMessage();
}
/* isset not really necessary, but keep it for now */
Modified: experiments/each-query/src/lib/auth/cpp/Makefile.am
==============================================================================
--- experiments/each-query/src/lib/auth/cpp/Makefile.am (original)
+++ experiments/each-query/src/lib/auth/cpp/Makefile.am Fri Jan 29 20:09:46 2010
@@ -4,7 +4,7 @@
lib_LTLIBRARIES = libauth.la
libauth_la_SOURCES = data_source.h data_source.cc
-libauth_la_SOURCES = data_source_static.h data_source_static.cc
+libauth_la_SOURCES += data_source_static.h data_source_static.cc
#libauth_la_SOURCES += data_source_static.h data_source_static.cc
#libauth_la_SOURCES += data_source_plot.h data_source_plot.cc
libauth_la_SOURCES += query.h query.cc
Modified: experiments/each-query/src/lib/auth/cpp/query.h
==============================================================================
--- experiments/each-query/src/lib/auth/cpp/query.h (original)
+++ experiments/each-query/src/lib/auth/cpp/query.h Fri Jan 29 20:09:46 2010
@@ -30,9 +30,9 @@
namespace dns {
enum QueryStatus {
- INCOMPLETE,
- DATA_FOUND,
- NO_DATA
+ QUERY_INCOMPLETE,
+ QUERY_FOUND,
+ QUERY_NODATA
};
///
@@ -73,7 +73,7 @@
message_ = &m;
want_additional = true;
want_dnssec = dnssec;
- status_ = INCOMPLETE;
+ status_ = QUERY_INCOMPLETE;
// Check message formatting
QuestionIterator qid = message_->beginQuestion();
More information about the bind10-changes
mailing list