[svn] commit: r690 - in /branches/parkinglot: ./ src/bin/ src/bin/auth/ src/bin/bind10/ src/lib/ src/lib/auth/ src/lib/auth/cpp/ src/lib/dns/cpp/ src/lib/dns/cpp/rdata/hs_4/
BIND 10 source code commits
bind10-changes at lists.isc.org
Sat Jan 30 07:39:38 UTC 2010
Author: each
Date: Sat Jan 30 07:39:38 2010
New Revision: 690
Log:
Merged experiments/each-query branch into parkinglot.
(This now builds the b10-auth binary. The b10-parkinglot binary is
still being built for reference purposes, but is expected to be removed.
Both programs use port 5300, so they cannot be run simultaneously.)
Added:
branches/parkinglot/src/bin/auth/
- copied from r689, experiments/each-query/src/bin/auth/
branches/parkinglot/src/lib/auth/
- copied from r689, experiments/each-query/src/lib/auth/
branches/parkinglot/src/lib/dns/cpp/rdata/hs_4/
branches/parkinglot/src/lib/dns/cpp/rdata/hs_4/a_1.cc
branches/parkinglot/src/lib/dns/cpp/rdata/hs_4/a_1.h
Modified:
branches/parkinglot/configure.ac
branches/parkinglot/src/bin/Makefile.am
branches/parkinglot/src/bin/auth/Makefile.am
branches/parkinglot/src/bin/auth/main.cc
branches/parkinglot/src/bin/bind10/bind10.py.in
branches/parkinglot/src/bin/bind10/bind10_test.in
branches/parkinglot/src/bin/bind10/run_bind10.sh.in
branches/parkinglot/src/lib/Makefile.am
branches/parkinglot/src/lib/auth/cpp/data_source_static.cc
branches/parkinglot/src/lib/dns/cpp/message.h
branches/parkinglot/src/lib/dns/cpp/rrclass-placeholder.h
branches/parkinglot/src/lib/dns/cpp/rrset.h
Modified: branches/parkinglot/configure.ac
==============================================================================
--- branches/parkinglot/configure.ac (original)
+++ branches/parkinglot/configure.ac Sat Jan 30 07:39:38 2010
@@ -151,6 +151,7 @@
src/bin/cfgmgr/Makefile
src/bin/host/Makefile
src/bin/msgq/Makefile
+ src/bin/auth/Makefile
src/bin/parkinglot/Makefile
src/lib/Makefile
src/lib/cc/Makefile
@@ -166,6 +167,8 @@
src/lib/config/python/isc/config/Makefile
src/lib/dns/Makefile
src/lib/dns/cpp/Makefile
+ src/lib/auth/Makefile
+ src/lib/auth/cpp/Makefile
])
AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py
src/bin/cfgmgr/run_b10-cfgmgr.sh
@@ -179,6 +182,7 @@
src/bin/msgq/msgq.py
src/bin/msgq/msgq_test
src/bin/msgq/run_msgq.sh
+ src/bin/auth/config.h
src/bin/parkinglot/config.h
src/lib/dns/cpp/gen-rdatacode.py
], [
Modified: branches/parkinglot/src/bin/Makefile.am
==============================================================================
--- branches/parkinglot/src/bin/Makefile.am (original)
+++ branches/parkinglot/src/bin/Makefile.am Sat Jan 30 07:39:38 2010
@@ -1,1 +1,1 @@
-SUBDIRS = bind10 bindctl cfgmgr msgq parkinglot host cmdctl
+SUBDIRS = bind10 bindctl cfgmgr msgq host cmdctl auth parkinglot
Modified: branches/parkinglot/src/bin/auth/Makefile.am
==============================================================================
--- branches/parkinglot/src/bin/auth/Makefile.am (original)
+++ branches/parkinglot/src/bin/auth/Makefile.am Sat Jan 30 07:39:38 2010
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_srcdir)/ext
+AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_builddir)/src/lib/dns/cpp -I$(top_srcdir)/src/lib/dns/cpp -I$(top_srcdir)/src/lib -I$(top_srcdir)/ext
bin_PROGRAMS = b10-auth
b10_auth_SOURCES = auth_srv.cc auth_srv.h
Modified: branches/parkinglot/src/bin/auth/main.cc
==============================================================================
--- branches/parkinglot/src/bin/auth/main.cc (original)
+++ branches/parkinglot/src/bin/auth/main.cc Sat Jan 30 07:39:38 2010
@@ -100,7 +100,7 @@
// initialize command channel
try {
- CommandSession cs = CommandSession(PROGRAM, AUTH_SPECFILE_LOCATION,
+ CommandSession cs = CommandSession(AUTH_SPECFILE_LOCATION,
my_config_handler,
my_command_handler);
Modified: branches/parkinglot/src/bin/bind10/bind10.py.in
==============================================================================
--- branches/parkinglot/src/bin/bind10/bind10.py.in (original)
+++ branches/parkinglot/src/bin/bind10/bind10.py.in Sat Jan 30 07:39:38 2010
@@ -194,16 +194,16 @@
# XXX: this must be read from the configuration manager in the future
# XXX: we hardcode port 5300
if self.verbose:
- sys.stdout.write("Starting b10-parkinglot on port 5300\n")
- try:
- parkinglot = ProcessInfo("b10-parkinglot", ["b10-parkinglot", "-p", "5300"])
+ sys.stdout.write("Starting b10-auth on port 5300\n")
+ try:
+ auth = ProcessInfo("b10-auth", ["b10-auth", "-p", "5300"])
except Exception as e:
c_channel.process.kill()
bind_cfgd.process.kill()
- return "Unable to start b10-parkinglot; " + str(e)
- self.processes[parkinglot.pid] = parkinglot
- if self.verbose:
- sys.stdout.write("Started b10-parkinglot (PID %d)\n" % parkinglot.pid)
+ return "Unable to start b10-auth; " + str(e)
+ self.processes[auth.pid] = auth
+ if self.verbose:
+ sys.stdout.write("Started b10-auth (PID %d)\n" % auth.pid)
# start the b10-cmdctl
# XXX: we hardcode port 8080
@@ -214,7 +214,7 @@
except Exception as e:
c_channel.process.kill()
bind_cfgd.process.kill()
- parkinglot.process.kill()
+ auth.process.kill()
return "Unable to start b10-cmdctl; " + str(e)
self.processes[cmd_ctrld.pid] = cmd_ctrld
if self.verbose:
Modified: branches/parkinglot/src/bin/bind10/bind10_test.in
==============================================================================
--- branches/parkinglot/src/bin/bind10/bind10_test.in (original)
+++ branches/parkinglot/src/bin/bind10/bind10_test.in Sat Jan 30 07:39:38 2010
@@ -5,7 +5,7 @@
BIND10_PATH=@abs_top_srcdir@/src/bin/bind10
-PATH=@abs_top_srcdir@/src/bin/msgq:@abs_top_srcdir@/src/bin/parkinglot:@abs_top_srcdir@/src/bin/bind-cfgd:$PATH
+PATH=@abs_top_srcdir@/src/bin/msgq:@abs_top_srcdir@/src/bin/auth:@abs_top_srcdir@/src/bin/bind-cfgd:$PATH
export PATH
PYTHONPATH=@abs_top_srcdir@/src/lib/cc/python:${abs_top_src_dir}/lib/cc/python/ISC
Modified: branches/parkinglot/src/bin/bind10/run_bind10.sh.in
==============================================================================
--- branches/parkinglot/src/bin/bind10/run_bind10.sh.in (original)
+++ branches/parkinglot/src/bin/bind10/run_bind10.sh.in Sat Jan 30 07:39:38 2010
@@ -5,7 +5,7 @@
BIND10_PATH=@abs_top_builddir@/src/bin/bind10
-PATH=@abs_top_builddir@/src/bin/msgq:@abs_top_builddir@/src/bin/parkinglot:@abs_top_builddir@/src/bin/cfgmgr:@abs_top_builddir@/src/bin/cmdctl:$PATH
+PATH=@abs_top_builddir@/src/bin/msgq:@abs_top_builddir@/src/bin/auth:@abs_top_builddir@/src/bin/cfgmgr:@abs_top_builddir@/src/bin/cmdctl:$PATH
export PATH
PYTHONPATH=@abs_top_srcdir@/src/lib/cc/python:@abs_top_srcdir@/src/lib/config/python
Modified: branches/parkinglot/src/lib/Makefile.am
==============================================================================
--- branches/parkinglot/src/lib/Makefile.am (original)
+++ branches/parkinglot/src/lib/Makefile.am Sat Jan 30 07:39:38 2010
@@ -1,1 +1,1 @@
-SUBDIRS = cc config dns
+SUBDIRS = cc config dns auth
Modified: branches/parkinglot/src/lib/auth/cpp/data_source_static.cc
==============================================================================
--- branches/parkinglot/src/lib/auth/cpp/data_source_static.cc (original)
+++ branches/parkinglot/src/lib/auth/cpp/data_source_static.cc Sat Jan 30 07:39:38 2010
@@ -1,34 +1,43 @@
#include "data_source_static.h"
+
+#include <dns/cpp/name.h>
+#include <dns/cpp/rdata.h>
+#include <dns/cpp/rdataclass.h>
+#include <dns/cpp/rrclass.h>
+#include <dns/cpp/rrset.h>
+#include <dns/cpp/rrtype.h>
#include <dns/cpp/rrttl.h>
-#include <dns/cpp/rdata.h>
#include <iostream>
namespace isc {
namespace dns {
+using namespace isc::dns;
+using namespace isc::dns::rdata;
+
StaticDataSrc::StaticDataSrc() : authors_name("authors.bind"),
- version_name("version.bind")
+ version_name("version.bind")
{
- authors = RRsetPtr(new RRset(authors_name, RRClass::CH(),
- RRType::TXT(), RRTTL(3600)));
- authors->addRdata(rdata::generic::TXT("Evan Hunt"));
- authors->addRdata(rdata::generic::TXT("Han Feng"));
- authors->addRdata(rdata::generic::TXT("Jelte Jansen"));
- authors->addRdata(rdata::generic::TXT("Jeremy C. Reed"));
- authors->addRdata(rdata::generic::TXT("Jin Jian"));
- authors->addRdata(rdata::generic::TXT("JINMEI Tatuya"));
- authors->addRdata(rdata::generic::TXT("Kazunori Fujiwara"));
- authors->addRdata(rdata::generic::TXT("Michael Graff"));
- authors->addRdata(rdata::generic::TXT("Naoki Kambe"));
- authors->addRdata(rdata::generic::TXT("Shane Kerr"));
- authors->addRdata(rdata::generic::TXT("Zhang Likun"));
+ RRsetPtr authors = RRsetPtr(new RRset(authors_name, RRClass::CH(),
+ RRType::TXT(), RRTTL(3600)));
+ authors->addRdata(generic::TXT("Evan Hunt"));
+ authors->addRdata(generic::TXT("Han Feng"));
+ authors->addRdata(generic::TXT("Jelte Jansen"));
+ authors->addRdata(generic::TXT("Jeremy C. Reed"));
+ authors->addRdata(generic::TXT("Jin Jian"));
+ authors->addRdata(generic::TXT("JINMEI Tatuya"));
+ authors->addRdata(generic::TXT("Kazunori Fujiwara"));
+ authors->addRdata(generic::TXT("Michael Graff"));
+ authors->addRdata(generic::TXT("Naoki Kambe"));
+ authors->addRdata(generic::TXT("Shane Kerr"));
+ authors->addRdata(generic::TXT("Zhang Likun"));
- version = RRsetPtr(new RRset(version_name, RRClass::CH(),
- RRType::TXT(), RRTTL(3600)));
- version->addRdata(rdata::generic::TXT("BIND10 0.0.0 (pre-alpha)"));
+ RRsetPtr version = RRsetPtr(new RRset(version_name, RRClass::CH(),
+ RRType::TXT(), RRTTL(3600)));
+ version->addRdata(generic::TXT("BIND10 0.0.0 (pre-alpha)"));
}
const DataSrc*
Modified: branches/parkinglot/src/lib/dns/cpp/message.h
==============================================================================
--- branches/parkinglot/src/lib/dns/cpp/message.h (original)
+++ branches/parkinglot/src/lib/dns/cpp/message.h Sat Jan 30 07:39:38 2010
@@ -401,7 +401,15 @@
public:
unsigned int getCode() const { return (code_); }
bool operator==(const Section& other) const
- { return (code_ == other.code_); }
+ { return (code_ == other.code_); }
+
+ enum {
+ SECTION_QUESTION = 0U,
+ SECTION_ANSWER = 1U,
+ SECTION_AUTHORITY = 2U,
+ SECTION_ADDITIONAL = 3U
+ };
+
static const Section& QUESTION();
static const Section& ANSWER();
static const Section& AUTHORITY();
@@ -414,28 +422,28 @@
inline const Section&
Section::QUESTION()
{
- static Section s(0);
+ static Section s(SECTION_QUESTION);
return (s);
}
inline const Section&
Section::ANSWER()
{
- static Section s(1);
+ static Section s(SECTION_ANSWER);
return (s);
}
inline const Section&
Section::AUTHORITY()
{
- static Section s(2);
+ static Section s(SECTION_AUTHORITY);
return (s);
}
inline const Section&
Section::ADDITIONAL()
{
- static Section s(3);
+ static Section s(SECTION_ADDITIONAL);
return (s);
}
Modified: branches/parkinglot/src/lib/dns/cpp/rrclass-placeholder.h
==============================================================================
--- branches/parkinglot/src/lib/dns/cpp/rrclass-placeholder.h (original)
+++ branches/parkinglot/src/lib/dns/cpp/rrclass-placeholder.h Sat Jan 30 07:39:38 2010
@@ -237,6 +237,15 @@
// BEGIN_WELL_KNOWN_CLASS_DECLARATIONS
// END_WELL_KNOWN_CLASS_DECLARATIONS
+
+ // \brief Meta-classes
+ enum {
+ RRCLASS_RESERVED0 = 0,
+ RRCLASS_NONE = 254,
+ RRCLASS_ANY = 255
+ };
+ static const RRClass& NONE();
+ static const RRClass& ANY();
private:
uint16_t classcode_;
@@ -244,6 +253,22 @@
// BEGIN_WELL_KNOWN_CLASS_DEFINITIONS
// END_WELL_KNOWN_CLASS_DEFINITIONS
+
+inline const RRClass&
+RRClass::NONE()
+{
+ static RRClass rrclass(RRCLASS_NONE);
+
+ return (rrclass);
+}
+
+inline const RRClass&
+RRClass::ANY()
+{
+ static RRClass rrclass(RRCLASS_ANY);
+
+ return (rrclass);
+}
///
/// \brief Insert the \c RRClass as a string into stream.
Modified: branches/parkinglot/src/lib/dns/cpp/rrset.h
==============================================================================
--- branches/parkinglot/src/lib/dns/cpp/rrset.h (original)
+++ branches/parkinglot/src/lib/dns/cpp/rrset.h Sat Jan 30 07:39:38 2010
@@ -19,6 +19,7 @@
#include <iostream>
#include <string>
+#include <vector>
#include <boost/shared_ptr.hpp>
@@ -38,6 +39,7 @@
typedef boost::shared_ptr<AbstractRRset> RRsetPtr;
class BasicRRset;
typedef BasicRRset RRset;
+typedef std::vector<RRsetPtr> RRsetList;
class BasicRRsetImpl;
class RdataIterator;
More information about the bind10-changes
mailing list