[SCM] Samba Shared Repository - branch master updated

Kai Blin kai at samba.org
Sat Oct 23 04:59:01 MDT 2010


The branch, master has been updated
       via  72c8ccd s4 dns: Implement update record prescan logic
       via  005a656 s4 dns: Add stub checking if updates are allowed
       via  1e670df s4 dns: Add a prerequisites check for updates
       via  cfa4796 s4 dns: Switch to WERROR
       via  682a2e9 s4 dns: Split up the code into multiple files for easier development
       via  cebce2b s4 dns: More work on updates
       via  fb18175 s4 dns: Map between NTSTATUS and dns error codes
       via  a6305c4 s4 dns: Better error handling when parsing invalid or unknown records
       via  69a5229 s4 dns: start handling update requests, return correct error codes
       via  eb4f101 s4 dns: Allow more components as part of a domain name
       via  063727a s4 dns: Handle CNAME records
       via  32a1b71 s4 dns: Parse srv and soa records
       via  615857d s4 dns: Look up all names in the ldb database.
       via  678634a s4 dns: Look up records in the ldb database
       via  80f3088 s4 dns: Fix a data corruption in the dns_string parsing
       via  1c25cc7 dnsp: Can't have two memebers of a union with the same name
       via  a7b833e s4 dns: Reply to a name request with an A record.
       via  719a6bb ndr dns: Add simple parser
       via  96195b2 s4 dns: Add a boilerplate DNS server implementation
       via  caf4196 dns/nbt: Fix spelling of the "authoritative" flag.
       via  9786871 idl: Add idl describing DNS structures
       via  4ffdf09 netlogon.idl: Switch to explicit constants to remove dependency on nbt.idl
       via  eeac222 s4 dns: Import DNS win32 error codes from MS-ERREF
       via  e7358e7 s4 dsdb kcc: Prefer msDS-hasMasterNCs over hasMasterNCs when replicating
       via  f26c9b3 s4 socket: increase the debuglevel to make add interface debug messages less verbose
      from  821a202 s4:rpc_server/netlogon: netr_ServerAuthenticate3 should return NO_TRUST_SAM_ACCOUNT

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 72c8ccd408070bcb3defba34865d31a1ea6311fe
Author: Kai Blin <kai at samba.org>
Date:   Sun Oct 3 12:21:00 2010 +0200

    s4 dns: Implement update record prescan logic
    
    Autobuild-User: Kai Blin <kai at samba.org>
    Autobuild-Date: Sat Oct 23 10:58:18 UTC 2010 on sn-devel-104

commit 005a65660d1d5a39cccdabca1970b7e56537df17
Author: Kai Blin <kai at samba.org>
Date:   Sun Oct 3 00:40:32 2010 +0200

    s4 dns: Add stub checking if updates are allowed

commit 1e670dff6a0b9b5e42849817deb3c79e4ea30f57
Author: Kai Blin <kai at samba.org>
Date:   Mon Oct 11 23:40:18 2010 +0200

    s4 dns: Add a prerequisites check for updates

commit cfa47965fe2aacf861a107c0db4daa5d43180471
Author: Kai Blin <kai at samba.org>
Date:   Mon Oct 11 23:39:44 2010 +0200

    s4 dns: Switch to WERROR

commit 682a2e93daddbd95e617dde9dcdc7dee7a739929
Author: Kai Blin <kai at samba.org>
Date:   Fri Oct 1 12:59:22 2010 -0700

    s4 dns: Split up the code into multiple files for easier development

commit cebce2b9a40db1f5d28e20b6eda7010e9c530a5d
Author: Kai Blin <kai at samba.org>
Date:   Mon Oct 11 23:50:16 2010 +0200

    s4 dns: More work on updates

commit fb181752c5a8704140e36977c2723d4d3c4c8166
Author: Kai Blin <kai at samba.org>
Date:   Mon Oct 11 23:22:55 2010 +0200

    s4 dns: Map between NTSTATUS and dns error codes

commit a6305c4a168e7d3ac06f824dce05767bc7e9b9c0
Author: Kai Blin <kai at samba.org>
Date:   Thu Sep 30 20:35:00 2010 -0700

    s4 dns: Better error handling when parsing invalid or unknown records

commit 69a52290ce81c62f1d6af717c4bd9b6281f0886f
Author: Kai Blin <kai at samba.org>
Date:   Thu Sep 30 18:21:53 2010 -0700

    s4 dns: start handling update requests, return correct error codes

commit eb4f101200f18fdf7482e14c4471d6e90b166af0
Author: Kai Blin <kai at samba.org>
Date:   Thu Sep 30 18:20:42 2010 -0700

    s4 dns: Allow more components as part of a domain name

commit 063727a88b10cbd27892d0e165fe18958849f7df
Author: Kai Blin <kai at samba.org>
Date:   Thu Sep 30 17:05:23 2010 -0700

    s4 dns: Handle CNAME records

commit 32a1b71ec8e51a2e9486c174e4b23e3942e14079
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Oct 1 01:41:29 2010 +0200

    s4 dns: Parse srv and soa records
    
    Signed-off-by: Kai Blin <kai at samba.org>

commit 615857d9899906b3505397b22e769538315a27ef
Author: Kai Blin <kai at samba.org>
Date:   Thu Sep 30 16:35:04 2010 -0700

    s4 dns: Look up all names in the ldb database.

commit 678634abfb590a6819b125a04777c509e83e4a3f
Author: Kai Blin <kai at samba.org>
Date:   Mon Oct 11 22:32:25 2010 +0200

    s4 dns: Look up records in the ldb database

commit 80f30889e9c947e6ddf31efd5d07d32d1a806209
Author: Kai Blin <kai at samba.org>
Date:   Mon Oct 11 22:31:14 2010 +0200

    s4 dns: Fix a data corruption in the dns_string parsing

commit 1c25cc705762366e2525e61df3d193b2ea2106bf
Author: Kai Blin <kai at samba.org>
Date:   Mon Oct 11 22:29:05 2010 +0200

    dnsp: Can't have two memebers of a union with the same name

commit a7b833ec7e19bc3251ade69af101631013d60419
Author: Kai Blin <kai at samba.org>
Date:   Wed Sep 29 17:24:53 2010 -0700

    s4 dns: Reply to a name request with an A record.
    
    The first real answer to a DNS request. Still uses hardcoded reply.

commit 719a6bbfede5b124c96f7c84d27e68ac285b073a
Author: Kai Blin <kai at samba.org>
Date:   Fri Oct 22 09:37:38 2010 +0200

    ndr dns: Add simple parser

commit 96195b2c0c239781c47f51bbf62156a8804f9525
Author: Kai Blin <kai at samba.org>
Date:   Tue Oct 12 06:23:32 2010 +0200

    s4 dns: Add a boilerplate DNS server implementation

commit caf4196899d864abe4bb6d3c9da3952f5b5ba8b8
Author: Kai Blin <kai at samba.org>
Date:   Wed Sep 29 17:22:09 2010 -0700

    dns/nbt: Fix spelling of the "authoritative" flag.

commit 97868713a0ed4a8519796abc69d282c9b2ea3121
Author: Kai Blin <kai at samba.org>
Date:   Fri Oct 22 09:08:20 2010 +0200

    idl: Add idl describing DNS structures

commit 4ffdf09623da867f5c0dd3031820f7d033681b1f
Author: Kai Blin <kai at samba.org>
Date:   Sat Sep 25 07:23:56 2010 -0700

    netlogon.idl: Switch to explicit constants to remove dependency on nbt.idl

commit eeac222398b49a6fbeb72314df06376cb8e3e7af
Author: Kai Blin <kai at samba.org>
Date:   Fri Oct 1 17:41:01 2010 -0700

    s4 dns: Import DNS win32 error codes from MS-ERREF

commit e7358e75821b036b19327dc4117226def5787db7
Author: Kai Blin <kai at samba.org>
Date:   Thu Sep 30 13:16:19 2010 -0700

    s4 dsdb kcc: Prefer msDS-hasMasterNCs over hasMasterNCs when replicating

commit f26c9b3966d27c4c53b8334d3eb272a7bf3226b0
Author: Kai Blin <kai at samba.org>
Date:   Fri Oct 1 01:13:28 2010 -0700

    s4 socket: increase the debuglevel to make add interface debug messages less verbose

-----------------------------------------------------------------------

Summary of changes:
 libcli/util/doserr.c                  |  188 +++++++++
 libcli/util/werror.h                  |   94 +++++
 librpc/idl/dns.idl                    |  187 +++++++++
 librpc/idl/dnsp.idl                   |    8 +-
 librpc/idl/nbt.idl                    |    2 +-
 librpc/idl/netlogon.idl               |   32 +-
 librpc/idl/wscript_build              |    2 +-
 librpc/ndr/libndr.h                   |    1 +
 librpc/ndr/ndr_dns.c                  |  303 +++++++++++++++
 librpc/ndr/ndr_dns.h                  |    5 +
 librpc/wscript_build                  |    5 +
 pidl/lib/Parse/Pidl/NDR.pm            |    1 +
 pidl/lib/Parse/Pidl/Samba4/Python.pm  |    9 +
 pidl/lib/Parse/Pidl/Typelist.pm       |    3 +-
 source4/dns_server/TODO               |   15 +
 source4/dns_server/dns_query.c        |  233 +++++++++++
 source4/dns_server/dns_server.c       |  683 +++++++++++++++++++++++++++++++++
 source4/dns_server/dns_server.h       |   64 +++
 source4/dns_server/dns_update.c       |  185 +++++++++
 source4/dns_server/dns_utils.c        |  151 ++++++++
 source4/dns_server/wscript_build      |    9 +
 source4/dsdb/kcc/kcc_periodic.c       |   15 +-
 source4/lib/socket/interface.c        |    2 +-
 source4/librpc/wscript_build          |   33 ++-
 source4/nbt_server/nodestatus.c       |    2 +-
 source4/nbt_server/packet.c           |   34 +-
 source4/smb_server/smb_server.h       |    1 +
 source4/smbd/server.c                 |    1 +
 source4/torture/nbt/winsreplication.c |   20 +-
 source4/wscript_build                 |    1 +
 30 files changed, 2229 insertions(+), 60 deletions(-)
 create mode 100644 librpc/idl/dns.idl
 create mode 100644 librpc/ndr/ndr_dns.c
 create mode 100644 librpc/ndr/ndr_dns.h
 create mode 100644 source4/dns_server/TODO
 create mode 100644 source4/dns_server/dns_query.c
 create mode 100644 source4/dns_server/dns_server.c
 create mode 100644 source4/dns_server/dns_server.h
 create mode 100644 source4/dns_server/dns_update.c
 create mode 100644 source4/dns_server/dns_utils.c
 create mode 100644 source4/dns_server/wscript_build


Changeset truncated at 500 lines:

diff --git a/libcli/util/doserr.c b/libcli/util/doserr.c
index fd0233c..1663edb 100644
--- a/libcli/util/doserr.c
+++ b/libcli/util/doserr.c
@@ -166,6 +166,100 @@ static const struct werror_code_struct dos_errs[] =
 	{ "WERR_DS_DNS_LOOKUP_FAILURE", WERR_DS_DNS_LOOKUP_FAILURE },
 	{ "WERR_DS_NO_MSDS_INTID", WERR_DS_NO_MSDS_INTID },
 	{ "WERR_DS_DUP_MSDS_INTID", WERR_DS_DUP_MSDS_INTID },
+	{ "WERR_DNS_ERROR_RCODE_FORMAT_ERROR", WERR_DNS_ERROR_RCODE_FORMAT_ERROR },
+	{ "WERR_DNS_ERROR_RCODE_SERVER_FAILURE", WERR_DNS_ERROR_RCODE_SERVER_FAILURE },
+	{ "WERR_DNS_ERROR_RCODE_NAME_ERROR", WERR_DNS_ERROR_RCODE_NAME_ERROR },
+	{ "WERR_DNS_ERROR_RCODE_NOT_IMPLEMENTED", WERR_DNS_ERROR_RCODE_NOT_IMPLEMENTED },
+	{ "WERR_DNS_ERROR_RCODE_REFUSED", WERR_DNS_ERROR_RCODE_REFUSED },
+	{ "WERR_DNS_ERROR_RCODE_YXDOMAIN", WERR_DNS_ERROR_RCODE_YXDOMAIN },
+	{ "WERR_DNS_ERROR_RCODE_YXRRSET", WERR_DNS_ERROR_RCODE_YXRRSET },
+	{ "WERR_DNS_ERROR_RCODE_NXRRSET", WERR_DNS_ERROR_RCODE_NXRRSET },
+	{ "WERR_DNS_ERROR_RCODE_NOTAUTH", WERR_DNS_ERROR_RCODE_NOTAUTH },
+	{ "WERR_DNS_ERROR_RCODE_NOTZONE", WERR_DNS_ERROR_RCODE_NOTZONE },
+	{ "WERR_DNS_ERROR_RCODE_BADSIG", WERR_DNS_ERROR_RCODE_BADSIG },
+	{ "WERR_DNS_ERROR_RCODE_BADKEY", WERR_DNS_ERROR_RCODE_BADKEY },
+	{ "WERR_DNS_ERROR_RCODE_BADTIME", WERR_DNS_ERROR_RCODE_BADTIME },
+	{ "WERR_DNS_INFO_NO_RECORDS", WERR_DNS_INFO_NO_RECORDS },
+	{ "WERR_DNS_ERROR_BAD_PACKET", WERR_DNS_ERROR_BAD_PACKET },
+	{ "WERR_DNS_ERROR_NO_PACKET", WERR_DNS_ERROR_NO_PACKET },
+	{ "WERR_DNS_ERROR_RCODE", WERR_DNS_ERROR_RCODE },
+	{ "WERR_DNS_ERROR_UNSECURE_PACKET", WERR_DNS_ERROR_UNSECURE_PACKET },
+	{ "WERR_DNS_ERROR_INVALID_TYPE", WERR_DNS_ERROR_INVALID_TYPE },
+	{ "WERR_DNS_ERROR_INVALID_IP_ADDRESS", WERR_DNS_ERROR_INVALID_IP_ADDRESS },
+	{ "WERR_DNS_ERROR_INVALID_PROPERTY", WERR_DNS_ERROR_INVALID_PROPERTY },
+	{ "WERR_DNS_ERROR_TRY_AGAIN_LATER", WERR_DNS_ERROR_TRY_AGAIN_LATER },
+	{ "WERR_DNS_ERROR_NOT_UNIQUE", WERR_DNS_ERROR_NOT_UNIQUE },
+	{ "WERR_DNS_ERROR_NON_RFC_NAME", WERR_DNS_ERROR_NON_RFC_NAME },
+	{ "WERR_DNS_STATUS_FQDN", WERR_DNS_STATUS_FQDN },
+	{ "WERR_DNS_STATUS_DOTTED_NAME", WERR_DNS_STATUS_DOTTED_NAME },
+	{ "WERR_DNS_STATUS_SINGLE_PART_NAME", WERR_DNS_STATUS_SINGLE_PART_NAME },
+	{ "WERR_DNS_ERROR_INVALID_NAME_CHAR", WERR_DNS_ERROR_INVALID_NAME_CHAR },
+	{ "WERR_DNS_ERROR_NUMERIC_NAME", WERR_DNS_ERROR_NUMERIC_NAME },
+	{ "WERR_DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER", WERR_DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER },
+	{ "WERR_DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION", WERR_DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION },
+	{ "WERR_DNS_ERROR_CANNOT_FIND_ROOT_HINTS", WERR_DNS_ERROR_CANNOT_FIND_ROOT_HINTS },
+	{ "WERR_DNS_ERROR_INCONSISTENT_ROOT_HINTS", WERR_DNS_ERROR_INCONSISTENT_ROOT_HINTS },
+	{ "WERR_DNS_ERROR_DWORD_VALUE_TOO_SMALL", WERR_DNS_ERROR_DWORD_VALUE_TOO_SMALL },
+	{ "WERR_DNS_ERROR_DWORD_VALUE_TOO_LARGE", WERR_DNS_ERROR_DWORD_VALUE_TOO_LARGE },
+	{ "WERR_DNS_ERROR_BACKGROUND_LOADING", WERR_DNS_ERROR_BACKGROUND_LOADING },
+	{ "WERR_DNS_ERROR_NOT_ALLOWED_ON_RODC", WERR_DNS_ERROR_NOT_ALLOWED_ON_RODC },
+	{ "WERR_DNS_ERROR_ZONE_DOES_NOT_EXIST", WERR_DNS_ERROR_ZONE_DOES_NOT_EXIST },
+	{ "WERR_DNS_ERROR_NO_ZONE_INFO", WERR_DNS_ERROR_NO_ZONE_INFO },
+	{ "WERR_DNS_ERROR_INVALID_ZONE_OPERATION", WERR_DNS_ERROR_INVALID_ZONE_OPERATION },
+	{ "WERR_DNS_ERROR_ZONE_CONFIGURATION_ERROR", WERR_DNS_ERROR_ZONE_CONFIGURATION_ERROR },
+	{ "WERR_DNS_ERROR_ZONE_HAS_NO_SOA_RECORD", WERR_DNS_ERROR_ZONE_HAS_NO_SOA_RECORD },
+	{ "WERR_DNS_ERROR_ZONE_HAS_NO_NS_RECORDS", WERR_DNS_ERROR_ZONE_HAS_NO_NS_RECORDS },
+	{ "WERR_DNS_ERROR_ZONE_LOCKED", WERR_DNS_ERROR_ZONE_LOCKED },
+	{ "WERR_DNS_ERROR_ZONE_CREATION_FAILED", WERR_DNS_ERROR_ZONE_CREATION_FAILED },
+	{ "WERR_DNS_ERROR_ZONE_ALREADY_EXISTS", WERR_DNS_ERROR_ZONE_ALREADY_EXISTS },
+	{ "WERR_DNS_ERROR_AUTOZONE_ALREADY_EXISTS", WERR_DNS_ERROR_AUTOZONE_ALREADY_EXISTS },
+	{ "WERR_DNS_ERROR_INVALID_ZONE_TYPE", WERR_DNS_ERROR_INVALID_ZONE_TYPE },
+	{ "WERR_DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP", WERR_DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP },
+	{ "WERR_DNS_ERROR_ZONE_NOT_SECONDARY", WERR_DNS_ERROR_ZONE_NOT_SECONDARY },
+	{ "WERR_DNS_ERROR_NEED_SECONDARY_ADDRESSES", WERR_DNS_ERROR_NEED_SECONDARY_ADDRESSES },
+	{ "WERR_DNS_ERROR_WINS_INIT_FAILED", WERR_DNS_ERROR_WINS_INIT_FAILED },
+	{ "WERR_DNS_ERROR_NEED_WINS_SERVERS", WERR_DNS_ERROR_NEED_WINS_SERVERS },
+	{ "WERR_DNS_ERROR_NBSTAT_INIT_FAILED", WERR_DNS_ERROR_NBSTAT_INIT_FAILED },
+	{ "WERR_DNS_ERROR_SOA_DELETE_INVALID", WERR_DNS_ERROR_SOA_DELETE_INVALID },
+	{ "WERR_DNS_ERROR_FORWARDER_ALREADY_EXISTS", WERR_DNS_ERROR_FORWARDER_ALREADY_EXISTS },
+	{ "WERR_DNS_ERROR_ZONE_REQUIRES_MASTER_IP", WERR_DNS_ERROR_ZONE_REQUIRES_MASTER_IP },
+	{ "WERR_DNS_ERROR_ZONE_IS_SHUTDOWN", WERR_DNS_ERROR_ZONE_IS_SHUTDOWN },
+	{ "WERR_DNS_ERROR_PRIMARY_REQUIRES_DATAFILE", WERR_DNS_ERROR_PRIMARY_REQUIRES_DATAFILE },
+	{ "WERR_DNS_ERROR_INVALID_DATAFILE_NAME", WERR_DNS_ERROR_INVALID_DATAFILE_NAME },
+	{ "WERR_DNS_ERROR_DATAFILE_OPEN_FAILURE", WERR_DNS_ERROR_DATAFILE_OPEN_FAILURE },
+	{ "WERR_DNS_ERROR_FILE_WRITEBACK_FAILED", WERR_DNS_ERROR_FILE_WRITEBACK_FAILED },
+	{ "WERR_DNS_ERROR_DATAFILE_PARSING", WERR_DNS_ERROR_DATAFILE_PARSING },
+	{ "WERR_DNS_ERROR_RECORD_DOES_NOT_EXIST", WERR_DNS_ERROR_RECORD_DOES_NOT_EXIST },
+	{ "WERR_DNS_ERROR_RECORD_FORMAT", WERR_DNS_ERROR_RECORD_FORMAT },
+	{ "WERR_DNS_ERROR_NODE_CREATION_FAILED", WERR_DNS_ERROR_NODE_CREATION_FAILED },
+	{ "WERR_DNS_ERROR_UNKNOWN_RECORD_TYPE", WERR_DNS_ERROR_UNKNOWN_RECORD_TYPE },
+	{ "WERR_DNS_ERROR_RECORD_TIMED_OUT", WERR_DNS_ERROR_RECORD_TIMED_OUT },
+	{ "WERR_DNS_ERROR_NAME_NOT_IN_ZONE", WERR_DNS_ERROR_NAME_NOT_IN_ZONE },
+	{ "WERR_DNS_ERROR_CNAME_LOOP", WERR_DNS_ERROR_CNAME_LOOP },
+	{ "WERR_DNS_ERROR_NODE_IS_CNAME", WERR_DNS_ERROR_NODE_IS_CNAME },
+	{ "WERR_DNS_ERROR_CNAME_COLLISION", WERR_DNS_ERROR_CNAME_COLLISION },
+	{ "WERR_DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT", WERR_DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT },
+	{ "WERR_DNS_ERROR_RECORD_ALREADY_EXISTS", WERR_DNS_ERROR_RECORD_ALREADY_EXISTS },
+	{ "WERR_DNS_ERROR_SECONDARY_DATA", WERR_DNS_ERROR_SECONDARY_DATA },
+	{ "WERR_DNS_ERROR_NO_CREATE_CACHE_DATA", WERR_DNS_ERROR_NO_CREATE_CACHE_DATA },
+	{ "WERR_DNS_ERROR_NAME_DOES_NOT_EXIST", WERR_DNS_ERROR_NAME_DOES_NOT_EXIST },
+	{ "WERR_DNS_WARNING_PTR_CREATE_FAILED", WERR_DNS_WARNING_PTR_CREATE_FAILED },
+	{ "WERR_DNS_WARNING_DOMAIN_UNDELETED", WERR_DNS_WARNING_DOMAIN_UNDELETED },
+	{ "WERR_DNS_ERROR_DS_UNAVAILABLE", WERR_DNS_ERROR_DS_UNAVAILABLE },
+	{ "WERR_DNS_ERROR_DS_ZONE_ALREADY_EXISTS", WERR_DNS_ERROR_DS_ZONE_ALREADY_EXISTS },
+	{ "WERR_DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE", WERR_DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE },
+	{ "WERR_DNS_INFO_AXFR_COMPLETE", WERR_DNS_INFO_AXFR_COMPLETE },
+	{ "WERR_DNS_ERROR_AXFR", WERR_DNS_ERROR_AXFR },
+	{ "WERR_DNS_INFO_ADDED_LOCAL_WINS", WERR_DNS_INFO_ADDED_LOCAL_WINS },
+	{ "WERR_DNS_STATUS_CONTINUE_NEEDED", WERR_DNS_STATUS_CONTINUE_NEEDED },
+	{ "WERR_DNS_ERROR_NO_TCPIP", WERR_DNS_ERROR_NO_TCPIP },
+	{ "WERR_DNS_ERROR_NO_DNS_SERVERS", WERR_DNS_ERROR_NO_DNS_SERVERS },
+	{ "WERR_DNS_ERROR_DP_DOES_NOT_EXIST", WERR_DNS_ERROR_DP_DOES_NOT_EXIST },
+	{ "WERR_DNS_ERROR_DP_ALREADY_EXISTS", WERR_DNS_ERROR_DP_ALREADY_EXISTS },
+	{ "WERR_DNS_ERROR_DP_NOT_ENLISTED", WERR_DNS_ERROR_DP_NOT_ENLISTED },
+	{ "WERR_DNS_ERROR_DP_ALREADY_ENLISTED", WERR_DNS_ERROR_DP_ALREADY_ENLISTED },
+	{ "WERR_DNS_ERROR_DP_NOT_AVAILABLE", WERR_DNS_ERROR_DP_NOT_AVAILABLE },
+	{ "WERR_DNS_ERROR_DP_FSMO_ERROR", WERR_DNS_ERROR_DP_FSMO_ERROR },
 	{ "WERR_GENERAL_FAILURE", WERR_GENERAL_FAILURE },
 	{ "WERR_PRINTQ_FULL", WERR_PRINTQ_FULL },
 	{ "WERR_NO_SPOOL_SPACE", WERR_NO_SPOOL_SPACE },
@@ -4850,6 +4944,100 @@ const struct werror_str_struct dos_err_strs[] = {
 	{ WERR_DS_AUDIT_FAILURE, "A required audit event could not be generated for the operation." },
 	{ WERR_DS_INVALID_SEARCH_FLAG_SUBTREE, "The search flags for the attribute are invalid. The subtree index bit is valid only on single-valued attributes." },
 	{ WERR_DS_INVALID_SEARCH_FLAG_TUPLE, "The search flags for the attribute are invalid. The tuple index bit is valid only on attributes of Unicode strings." },
+	{ WERR_DNS_ERROR_RCODE_FORMAT_ERROR, "DNS server unable to interpret format." },
+	{ WERR_DNS_ERROR_RCODE_SERVER_FAILURE, "DNS server failure." },
+	{ WERR_DNS_ERROR_RCODE_NAME_ERROR, "DNS name does not exist." },
+	{ WERR_DNS_ERROR_RCODE_NOT_IMPLEMENTED, "DNS request not supported by name server." },
+	{ WERR_DNS_ERROR_RCODE_REFUSED, "DNS operation refused." },
+	{ WERR_DNS_ERROR_RCODE_YXDOMAIN, "DNS name that should not exist, does exist." },
+	{ WERR_DNS_ERROR_RCODE_YXRRSET, "DNS resource record (RR) set that should not exist, does exist." },
+	{ WERR_DNS_ERROR_RCODE_NXRRSET, "DNS RR set that should to exist, does not exist." },
+	{ WERR_DNS_ERROR_RCODE_NOTAUTH, "DNS server not authoritative for zone." },
+	{ WERR_DNS_ERROR_RCODE_NOTZONE, "DNS name in update or prereq is not in zone." },
+	{ WERR_DNS_ERROR_RCODE_BADSIG, "DNS signature failed to verify." },
+	{ WERR_DNS_ERROR_RCODE_BADKEY, "DNS bad key." },
+	{ WERR_DNS_ERROR_RCODE_BADTIME, "DNS signature validity expired." },
+	{ WERR_DNS_INFO_NO_RECORDS, "No records found for given DNS query." },
+	{ WERR_DNS_ERROR_BAD_PACKET, "Bad DNS packet." },
+	{ WERR_DNS_ERROR_NO_PACKET, "No DNS packet." },
+	{ WERR_DNS_ERROR_RCODE, "DNS error, check rcode." },
+	{ WERR_DNS_ERROR_UNSECURE_PACKET, "Unsecured DNS packet." },
+	{ WERR_DNS_ERROR_INVALID_TYPE, "Invalid DNS type." },
+	{ WERR_DNS_ERROR_INVALID_IP_ADDRESS, "Invalid IP address." },
+	{ WERR_DNS_ERROR_INVALID_PROPERTY, "Invalid property." },
+	{ WERR_DNS_ERROR_TRY_AGAIN_LATER, "Try DNS operation again later." },
+	{ WERR_DNS_ERROR_NOT_UNIQUE, "Record for given name and type is not unique." },
+	{ WERR_DNS_ERROR_NON_RFC_NAME, "DNS name does not comply with RFC specifications." },
+	{ WERR_DNS_STATUS_FQDN, "DNS name is a fully qualified DNS name." },
+	{ WERR_DNS_STATUS_DOTTED_NAME, "DNS name is dotted (multilabel)." },
+	{ WERR_DNS_STATUS_SINGLE_PART_NAME, "DNS name is a single-part name." },
+	{ WERR_DNS_ERROR_INVALID_NAME_CHAR, "DNS name contains an invalid character." },
+	{ WERR_DNS_ERROR_NUMERIC_NAME, "DNS name is entirely numeric." },
+	{ WERR_DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER, "The operation requested is not permitted on a DNS root server." },
+	{ WERR_DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION, "The record could not be created because this part of the DNS namespace has been delegated to another server." },
+	{ WERR_DNS_ERROR_CANNOT_FIND_ROOT_HINTS, "The DNS server could not find a set of root hints." },
+	{ WERR_DNS_ERROR_INCONSISTENT_ROOT_HINTS, "The DNS server found root hints but they were not consistent across all adapters." },
+	{ WERR_DNS_ERROR_DWORD_VALUE_TOO_SMALL, "The specified value is too small for this parameter." },
+	{ WERR_DNS_ERROR_DWORD_VALUE_TOO_LARGE, "The specified value is too large for this parameter." },
+	{ WERR_DNS_ERROR_BACKGROUND_LOADING, "This operation is not allowed while the DNS server is loading zones in the background. Try again later." },
+	{ WERR_DNS_ERROR_NOT_ALLOWED_ON_RODC, "The operation requested is not permitted on against a DNS server running on a read-only DC." },
+	{ WERR_DNS_ERROR_ZONE_DOES_NOT_EXIST, "DNS zone does not exist." },
+	{ WERR_DNS_ERROR_NO_ZONE_INFO, "DNS zone information not available." },
+	{ WERR_DNS_ERROR_INVALID_ZONE_OPERATION, "Invalid operation for DNS zone." },
+	{ WERR_DNS_ERROR_ZONE_CONFIGURATION_ERROR, "Invalid DNS zone configuration." },
+	{ WERR_DNS_ERROR_ZONE_HAS_NO_SOA_RECORD, "DNS zone has no start of authority (SOA) record." },
+	{ WERR_DNS_ERROR_ZONE_HAS_NO_NS_RECORDS, "DNS zone has no Name Server (NS) record." },
+	{ WERR_DNS_ERROR_ZONE_LOCKED, "DNS zone is locked." },
+	{ WERR_DNS_ERROR_ZONE_CREATION_FAILED, "DNS zone creation failed." },
+	{ WERR_DNS_ERROR_ZONE_ALREADY_EXISTS, "DNS zone already exists." },
+	{ WERR_DNS_ERROR_AUTOZONE_ALREADY_EXISTS, "DNS automatic zone already exists." },
+	{ WERR_DNS_ERROR_INVALID_ZONE_TYPE, "Invalid DNS zone type." },
+	{ WERR_DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP, "Secondary DNS zone requires master IP address." },
+	{ WERR_DNS_ERROR_ZONE_NOT_SECONDARY, "DNS zone not secondary." },
+	{ WERR_DNS_ERROR_NEED_SECONDARY_ADDRESSES, "Need secondary IP address." },
+	{ WERR_DNS_ERROR_WINS_INIT_FAILED, "WINS initialization failed." },
+	{ WERR_DNS_ERROR_NEED_WINS_SERVERS, "Need WINS servers." },
+	{ WERR_DNS_ERROR_NBSTAT_INIT_FAILED, "NBTSTAT initialization call failed." },
+	{ WERR_DNS_ERROR_SOA_DELETE_INVALID, "Invalid delete of SOA." },
+	{ WERR_DNS_ERROR_FORWARDER_ALREADY_EXISTS, "A conditional forwarding zone already exists for that name." },
+	{ WERR_DNS_ERROR_ZONE_REQUIRES_MASTER_IP, "This zone must be configured with one or more master DNS server IP addresses." },
+	{ WERR_DNS_ERROR_ZONE_IS_SHUTDOWN, "The operation cannot be performed because this zone is shut down." },
+	{ WERR_DNS_ERROR_PRIMARY_REQUIRES_DATAFILE, "The primary DNS zone requires a data file." },
+	{ WERR_DNS_ERROR_INVALID_DATAFILE_NAME, "Invalid data file name for the DNS zone." },
+	{ WERR_DNS_ERROR_DATAFILE_OPEN_FAILURE, "Failed to open the data file for the DNS zone." },
+	{ WERR_DNS_ERROR_FILE_WRITEBACK_FAILED, "Failed to write the data file for the DNS zone." },
+	{ WERR_DNS_ERROR_DATAFILE_PARSING, "Failure while reading datafile for DNS zone." },
+	{ WERR_DNS_ERROR_RECORD_DOES_NOT_EXIST, "DNS record does not exist." },
+	{ WERR_DNS_ERROR_RECORD_FORMAT, "DNS record format error." },
+	{ WERR_DNS_ERROR_NODE_CREATION_FAILED, "Node creation failure in DNS." },
+	{ WERR_DNS_ERROR_UNKNOWN_RECORD_TYPE, "Unknown DNS record type." },
+	{ WERR_DNS_ERROR_RECORD_TIMED_OUT, "DNS record timed out." },
+	{ WERR_DNS_ERROR_NAME_NOT_IN_ZONE, "Name not in DNS zone." },
+	{ WERR_DNS_ERROR_CNAME_LOOP, "CNAME loop detected." },
+	{ WERR_DNS_ERROR_NODE_IS_CNAME, "Node is a CNAME DNS record." },
+	{ WERR_DNS_ERROR_CNAME_COLLISION, "A CNAME record already exists for the given name." },
+	{ WERR_DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT, "Record is only at DNS zone root." },
+	{ WERR_DNS_ERROR_RECORD_ALREADY_EXISTS, "DNS record already exists." },
+	{ WERR_DNS_ERROR_SECONDARY_DATA, "Secondary DNS zone data error." },
+	{ WERR_DNS_ERROR_NO_CREATE_CACHE_DATA, "Could not create DNS cache data." },
+	{ WERR_DNS_ERROR_NAME_DOES_NOT_EXIST, "DNS name does not exist." },
+	{ WERR_DNS_WARNING_PTR_CREATE_FAILED, "Could not create pointer (PTR) record." },
+	{ WERR_DNS_WARNING_DOMAIN_UNDELETED, "DNS domain was undeleted." },
+	{ WERR_DNS_ERROR_DS_UNAVAILABLE, "The directory service is unavailable." },
+	{ WERR_DNS_ERROR_DS_ZONE_ALREADY_EXISTS, "DNS zone already exists in the directory service." },
+	{ WERR_DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE, "DNS server not creating or reading the boot file for the directory service integrated DNS zone." },
+	{ WERR_DNS_INFO_AXFR_COMPLETE, "DNS AXFR (zone transfer) complete." },
+	{ WERR_DNS_ERROR_AXFR, "DNS zone transfer failed." },
+	{ WERR_DNS_INFO_ADDED_LOCAL_WINS, "Added local WINS server." },
+	{ WERR_DNS_STATUS_CONTINUE_NEEDED, "Secure update call needs to continue update request." },
+	{ WERR_DNS_ERROR_NO_TCPIP, "TCP/IP network protocol not installed." },
+	{ WERR_DNS_ERROR_NO_DNS_SERVERS, "No DNS servers configured for local system." },
+	{ WERR_DNS_ERROR_DP_DOES_NOT_EXIST, "The specified directory partition does not exist." },
+	{ WERR_DNS_ERROR_DP_ALREADY_EXISTS, "The specified directory partition already exists." },
+	{ WERR_DNS_ERROR_DP_NOT_ENLISTED, "This DNS server is not enlisted in the specified directory partition." },
+	{ WERR_DNS_ERROR_DP_ALREADY_ENLISTED, "This DNS server is already enlisted in the specified directory partition." },
+	{ WERR_DNS_ERROR_DP_NOT_AVAILABLE, "The directory partition is not available at this time. Wait a few minutes and try again." },
+	{ WERR_DNS_ERROR_DP_FSMO_ERROR, "The application directory partition operation failed. The domain controller holding the domain naming master role is down or unable to service the request or is not running Windows Server 2003." },
 	{ WERR_IPSEC_QM_POLICY_EXISTS, "The specified quick mode policy already exists." },
 	{ WERR_IPSEC_QM_POLICY_NOT_FOUND, "The specified quick mode policy was not found." },
 	{ WERR_IPSEC_QM_POLICY_IN_USE, "The specified quick mode policy is being used." },
diff --git a/libcli/util/werror.h b/libcli/util/werror.h
index d89cd9c..efcc19c 100644
--- a/libcli/util/werror.h
+++ b/libcli/util/werror.h
@@ -2388,6 +2388,100 @@ typedef uint32_t WERROR;
 #define WERR_DS_AUDIT_FAILURE	W_ERROR(0x000021B1)
 #define WERR_DS_INVALID_SEARCH_FLAG_SUBTREE	W_ERROR(0x000021B2)
 #define WERR_DS_INVALID_SEARCH_FLAG_TUPLE	W_ERROR(0x000021B3)
+#define WERR_DNS_ERROR_RCODE_FORMAT_ERROR	W_ERROR(0x00002329)
+#define WERR_DNS_ERROR_RCODE_SERVER_FAILURE	W_ERROR(0x0000232A)
+#define WERR_DNS_ERROR_RCODE_NAME_ERROR	W_ERROR(0x0000232B)
+#define WERR_DNS_ERROR_RCODE_NOT_IMPLEMENTED	W_ERROR(0x0000232C)
+#define WERR_DNS_ERROR_RCODE_REFUSED	W_ERROR(0x0000232D)
+#define WERR_DNS_ERROR_RCODE_YXDOMAIN	W_ERROR(0x0000232E)
+#define WERR_DNS_ERROR_RCODE_YXRRSET	W_ERROR(0x0000232F)
+#define WERR_DNS_ERROR_RCODE_NXRRSET	W_ERROR(0x00002330)
+#define WERR_DNS_ERROR_RCODE_NOTAUTH	W_ERROR(0x00002331)
+#define WERR_DNS_ERROR_RCODE_NOTZONE	W_ERROR(0x00002332)
+#define WERR_DNS_ERROR_RCODE_BADSIG	W_ERROR(0x00002338)
+#define WERR_DNS_ERROR_RCODE_BADKEY	W_ERROR(0x00002339)
+#define WERR_DNS_ERROR_RCODE_BADTIME	W_ERROR(0x0000233A)
+#define WERR_DNS_INFO_NO_RECORDS	W_ERROR(0x0000251D)
+#define WERR_DNS_ERROR_BAD_PACKET	W_ERROR(0x0000251E)
+#define WERR_DNS_ERROR_NO_PACKET	W_ERROR(0x0000251F)
+#define WERR_DNS_ERROR_RCODE	W_ERROR(0x00002520)
+#define WERR_DNS_ERROR_UNSECURE_PACKET	W_ERROR(0x00002521)
+#define WERR_DNS_ERROR_INVALID_TYPE	W_ERROR(0x0000254F)
+#define WERR_DNS_ERROR_INVALID_IP_ADDRESS	W_ERROR(0x00002550)
+#define WERR_DNS_ERROR_INVALID_PROPERTY	W_ERROR(0x00002551)
+#define WERR_DNS_ERROR_TRY_AGAIN_LATER	W_ERROR(0x00002552)
+#define WERR_DNS_ERROR_NOT_UNIQUE	W_ERROR(0x00002553)
+#define WERR_DNS_ERROR_NON_RFC_NAME	W_ERROR(0x00002554)
+#define WERR_DNS_STATUS_FQDN	W_ERROR(0x00002555)
+#define WERR_DNS_STATUS_DOTTED_NAME	W_ERROR(0x00002556)
+#define WERR_DNS_STATUS_SINGLE_PART_NAME	W_ERROR(0x00002557)
+#define WERR_DNS_ERROR_INVALID_NAME_CHAR	W_ERROR(0x00002558)
+#define WERR_DNS_ERROR_NUMERIC_NAME	W_ERROR(0x00002559)
+#define WERR_DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER	W_ERROR(0x0000255A)
+#define WERR_DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION	W_ERROR(0x0000255B)
+#define WERR_DNS_ERROR_CANNOT_FIND_ROOT_HINTS	W_ERROR(0x0000255C)
+#define WERR_DNS_ERROR_INCONSISTENT_ROOT_HINTS	W_ERROR(0x0000255D)
+#define WERR_DNS_ERROR_DWORD_VALUE_TOO_SMALL	W_ERROR(0x0000255E)
+#define WERR_DNS_ERROR_DWORD_VALUE_TOO_LARGE	W_ERROR(0x0000255F)
+#define WERR_DNS_ERROR_BACKGROUND_LOADING	W_ERROR(0x00002560)
+#define WERR_DNS_ERROR_NOT_ALLOWED_ON_RODC	W_ERROR(0x00002561)
+#define WERR_DNS_ERROR_ZONE_DOES_NOT_EXIST	W_ERROR(0x00002581)
+#define WERR_DNS_ERROR_NO_ZONE_INFO	W_ERROR(0x00002582)
+#define WERR_DNS_ERROR_INVALID_ZONE_OPERATION	W_ERROR(0x00002583)
+#define WERR_DNS_ERROR_ZONE_CONFIGURATION_ERROR	W_ERROR(0x00002584)
+#define WERR_DNS_ERROR_ZONE_HAS_NO_SOA_RECORD	W_ERROR(0x00002585)
+#define WERR_DNS_ERROR_ZONE_HAS_NO_NS_RECORDS	W_ERROR(0x00002586)
+#define WERR_DNS_ERROR_ZONE_LOCKED	W_ERROR(0x00002587)
+#define WERR_DNS_ERROR_ZONE_CREATION_FAILED	W_ERROR(0x00002588)
+#define WERR_DNS_ERROR_ZONE_ALREADY_EXISTS	W_ERROR(0x00002589)
+#define WERR_DNS_ERROR_AUTOZONE_ALREADY_EXISTS	W_ERROR(0x0000258A)
+#define WERR_DNS_ERROR_INVALID_ZONE_TYPE	W_ERROR(0x0000258B)
+#define WERR_DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP	W_ERROR(0x0000258C)
+#define WERR_DNS_ERROR_ZONE_NOT_SECONDARY	W_ERROR(0x0000258D)
+#define WERR_DNS_ERROR_NEED_SECONDARY_ADDRESSES	W_ERROR(0x0000258E)
+#define WERR_DNS_ERROR_WINS_INIT_FAILED	W_ERROR(0x0000258F)
+#define WERR_DNS_ERROR_NEED_WINS_SERVERS	W_ERROR(0x00002590)
+#define WERR_DNS_ERROR_NBSTAT_INIT_FAILED	W_ERROR(0x00002591)
+#define WERR_DNS_ERROR_SOA_DELETE_INVALID	W_ERROR(0x00002592)
+#define WERR_DNS_ERROR_FORWARDER_ALREADY_EXISTS	W_ERROR(0x00002593)
+#define WERR_DNS_ERROR_ZONE_REQUIRES_MASTER_IP	W_ERROR(0x00002594)
+#define WERR_DNS_ERROR_ZONE_IS_SHUTDOWN	W_ERROR(0x00002595)
+#define WERR_DNS_ERROR_PRIMARY_REQUIRES_DATAFILE	W_ERROR(0x000025B3)
+#define WERR_DNS_ERROR_INVALID_DATAFILE_NAME	W_ERROR(0x000025B4)
+#define WERR_DNS_ERROR_DATAFILE_OPEN_FAILURE	W_ERROR(0x000025B5)
+#define WERR_DNS_ERROR_FILE_WRITEBACK_FAILED	W_ERROR(0x000025B6)
+#define WERR_DNS_ERROR_DATAFILE_PARSING	W_ERROR(0x000025B7)
+#define WERR_DNS_ERROR_RECORD_DOES_NOT_EXIST	W_ERROR(0x000025E5)
+#define WERR_DNS_ERROR_RECORD_FORMAT	W_ERROR(0x000025E6)
+#define WERR_DNS_ERROR_NODE_CREATION_FAILED	W_ERROR(0x000025E7)
+#define WERR_DNS_ERROR_UNKNOWN_RECORD_TYPE	W_ERROR(0x000025E8)
+#define WERR_DNS_ERROR_RECORD_TIMED_OUT	W_ERROR(0x000025E9)
+#define WERR_DNS_ERROR_NAME_NOT_IN_ZONE	W_ERROR(0x000025EA)
+#define WERR_DNS_ERROR_CNAME_LOOP	W_ERROR(0x000025EB)
+#define WERR_DNS_ERROR_NODE_IS_CNAME	W_ERROR(0x000025EC)
+#define WERR_DNS_ERROR_CNAME_COLLISION	W_ERROR(0x000025ED)
+#define WERR_DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT	W_ERROR(0x000025EE)
+#define WERR_DNS_ERROR_RECORD_ALREADY_EXISTS	W_ERROR(0x000025EF)
+#define WERR_DNS_ERROR_SECONDARY_DATA	W_ERROR(0x000025F0)
+#define WERR_DNS_ERROR_NO_CREATE_CACHE_DATA	W_ERROR(0x000025F1)
+#define WERR_DNS_ERROR_NAME_DOES_NOT_EXIST	W_ERROR(0x000025F2)
+#define WERR_DNS_WARNING_PTR_CREATE_FAILED	W_ERROR(0x000025F3)
+#define WERR_DNS_WARNING_DOMAIN_UNDELETED	W_ERROR(0x000025F4)
+#define WERR_DNS_ERROR_DS_UNAVAILABLE	W_ERROR(0x000025F5)
+#define WERR_DNS_ERROR_DS_ZONE_ALREADY_EXISTS	W_ERROR(0x000025F6)
+#define WERR_DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE	W_ERROR(0x000025F7)
+#define WERR_DNS_INFO_AXFR_COMPLETE	W_ERROR(0x00002617)
+#define WERR_DNS_ERROR_AXFR	W_ERROR(0x00002618)
+#define WERR_DNS_INFO_ADDED_LOCAL_WINS	W_ERROR(0x00002619)
+#define WERR_DNS_STATUS_CONTINUE_NEEDED	W_ERROR(0x00002649)
+#define WERR_DNS_ERROR_NO_TCPIP	W_ERROR(0x0000267B)
+#define WERR_DNS_ERROR_NO_DNS_SERVERS	W_ERROR(0x0000267C)
+#define WERR_DNS_ERROR_DP_DOES_NOT_EXIST	W_ERROR(0x000026AD)
+#define WERR_DNS_ERROR_DP_ALREADY_EXISTS	W_ERROR(0x000026AE)
+#define WERR_DNS_ERROR_DP_NOT_ENLISTED	W_ERROR(0x000026AF)
+#define WERR_DNS_ERROR_DP_ALREADY_ENLISTED	W_ERROR(0x000026B0)
+#define WERR_DNS_ERROR_DP_NOT_AVAILABLE	W_ERROR(0x000026B1)
+#define WERR_DNS_ERROR_DP_FSMO_ERROR	W_ERROR(0x000026B2)
 #define WERR_IPSEC_QM_POLICY_EXISTS	W_ERROR(0x000032C8)
 #define WERR_IPSEC_QM_POLICY_NOT_FOUND	W_ERROR(0x000032C9)
 #define WERR_IPSEC_QM_POLICY_IN_USE	W_ERROR(0x000032CA)
diff --git a/librpc/idl/dns.idl b/librpc/idl/dns.idl
new file mode 100644
index 0000000..90ac47a
--- /dev/null
+++ b/librpc/idl/dns.idl
@@ -0,0 +1,187 @@
+#include "idl_types.h"
+
+/*
+   IDL structures for DNS operations
+
+   DNS is not traditionally encoded using IDL/NDR. This is a bit of an
+   experiment, and I may well switch us back to a more traditional
+   encoding if it doesn't work out
+*/
+
+import "misc.idl";
+[
+	helper("librpc/ndr/ndr_dns.h"),
+	helpstring("DNS records"),
+	version(0.0),
+	uuid("a047c001-5f22-40b0-9d52-7042c43f711a")
+]
+interface dns
+{
+	const int DNS_SERVICE_PORT       = 53;
+
+	typedef [public,bitmap16bit] bitmap {
+		DNS_RCODE                   = 0x000F,
+		DNS_FLAG_BROADCAST          = 0x0010,
+		DNS_FLAG_RECURSION_AVAIL    = 0x0080,
+		DNS_FLAG_RECURSION_DESIRED  = 0x0100,
+		DNS_FLAG_TRUNCATION         = 0x0200,
+		DNS_FLAG_AUTHORITATIVE      = 0x0400,
+		DNS_OPCODE                  = 0x7800,
+		DNS_FLAG_REPLY              = 0x8000
+	} dns_operation;
+
+	/* the opcodes are in the operation field, masked with
+	   DNS_OPCODE */
+	typedef [public] enum {
+		DNS_OPCODE_QUERY          =  (0x0<<11),
+		DNS_OPCODE_IQUERY         =  (0x1<<11),
+		DNS_OPCODE_STATUS         =  (0x2<<11),
+		DNS_OPCODE_REGISTER       =  (0x5<<11),
+		DNS_OPCODE_RELEASE        =  (0x6<<11),
+		DNS_OPCODE_WACK           =  (0x7<<11),
+		DNS_OPCODE_REFRESH        =  (0x8<<11),
+		DNS_OPCODE_REFRESH2       =  (0x9<<11),
+		DNS_OPCODE_MULTI_HOME_REG =  (0xf<<11)
+	} dns_opcode;
+
+	/* rcode values */
+	typedef [public] enum {
+		DNS_RCODE_OK       = 0x0,
+		DNS_RCODE_FORMERR  = 0x1,
+		DNS_RCODE_SERVFAIL = 0x2,
+		DNS_RCODE_NXDOMAIN = 0x3,
+		DNS_RCODE_NOTIMP   = 0x4,
+		DNS_RCODE_REFUSED  = 0x5,
+		DNS_RCODE_YXDOMAIN = 0x6,
+		DNS_RCODE_YXRRSET  = 0x7,
+		DNS_RCODE_NXRRSET  = 0x8,
+		DNS_RCODE_NOTAUTH  = 0x9,
+		DNS_RCODE_NOTZONE  = 0xA
+	} dns_rcode;
+
+	typedef [public,enum16bit] enum {
+		DNS_QCLASS_IP   = 0x0001,
+		DNS_QCLASS_NONE = 0x00FE,
+		DNS_QCLASS_ANY  = 0x00FF
+	} dns_qclass;
+
+	/* These vese values could have been merged with NBT_QTYPE values, but
+	   DNS_QTYPE_SRV and NBT_QTYPE_STATUS have the same numeric value. */
+	typedef [public,enum16bit] enum {
+		DNS_QTYPE_ZERO   = 0x0000,
+		DNS_QTYPE_A      = 0x0001,
+		DNS_QTYPE_NS     = 0x0002,
+		DNS_QTYPE_MD     = 0x0003,
+		DNS_QTYPE_MF     = 0x0004,
+		DNS_QTYPE_CNAME  = 0x0005,
+		DNS_QTYPE_SOA    = 0x0006,
+		DNS_QTYPE_MB     = 0x0007,
+		DNS_QTYPE_MG     = 0x0008,
+		DNS_QTYPE_MR     = 0x0009,
+		DNS_QTYPE_NULL   = 0x000A,
+		DNS_QTYPE_WKS    = 0x000B,
+		DNS_QTYPE_PTR    = 0x000C,
+		DNS_QTYPE_HINFO  = 0x000D,
+		DNS_QTYPE_MINFO  = 0x000E,
+		DNS_QTYPE_MX     = 0x000F,
+		DNS_QTYPE_TXT    = 0x0010,
+		DNS_QTYPE_RP     = 0x0011,
+		DNS_QTYPE_AFSDB  = 0x0012,
+		DNS_QTYPE_X25    = 0x0013,
+		DNS_QTYPE_ISDN   = 0x0014,
+		DNS_QTYPE_RT     = 0x0015,
+		DNS_QTYPE_SIG    = 0x0018,
+		DNS_QTYPE_KEY    = 0x0019,
+		DNS_QTYPE_AAAA   = 0x001C,
+		DNS_QTYPE_LOC    = 0x001D,
+		DNS_QTYPE_NXT    = 0x001E,
+		DNS_QTYPE_NETBIOS= 0x0020,
+		DNS_QTYPE_SRV    = 0x0021,
+		DNS_QTYPE_ATMA   = 0x0022,
+		DNS_QTYPE_NAPTR  = 0x0023,
+		DNS_QTYPE_DNAME  = 0x0027,
+		DNS_QTYPE_DS     = 0x002B,
+		DNS_QTYPE_RRSIG  = 0x002E,
+		DNS_QTYPE_NSEC   = 0x002F,
+		DNS_QTYPE_DNSKEY = 0x0030,
+		DNS_QTYPE_DHCID  = 0x0031,
+		DNS_QTYPE_ALL    = 0x00FF,
+		DNS_QTYPE_WINS   = 0xFF01,
+		DNS_QTYPE_WINSR  = 0xFF02
+	} dns_qtype;
+
+	typedef [public] struct {
+		dns_string name;
+		dns_qtype  question_type;
+		dns_qclass question_class;
+	} dns_name_question;
+
+	typedef [public] struct {
+		uint16 length;
+		uint8  data[length];
+	} dns_rdata_data;
+
+	typedef struct {
+		dns_string mname;
+		dns_string rname;
+		uint32     serial;
+		uint32     refresh;
+		uint32     retry;
+		uint32     expire;
+		uint32     minimum;
+	} dns_soa_record;
+
+	typedef [public] struct {
+		uint16     priority;
+		uint16     weight;
+		uint16     port;
+		dns_string target;
+	} dns_srv_record;
+
+	typedef [public] struct {
+		uint16     preference;
+		dns_string exchange;
+	} dns_mx_record;
+
+	typedef [nodiscriminant,public,flag(NDR_NOALIGN)] union {
+		[case(DNS_QTYPE_A)]     ipv4address	 ipv4_record;
+		[case(DNS_QTYPE_NS)]    dns_string       ns_record;
+		[case(DNS_QTYPE_CNAME)] dns_string       cname_record;
+		[case(DNS_QTYPE_SOA)]   dns_soa_record   soa_record;
+		[case(DNS_QTYPE_PTR)]   dns_string       ptr_record;
+		[case(DNS_QTYPE_MX)]    dns_mx_record    mx_record;
+		[case(DNS_QTYPE_AAAA)]	ipv6address	 ipv6_record;
+		[case(DNS_QTYPE_SRV)]	dns_srv_record	 srv_record;
+		[default];
+	} dns_rdata;
+
+	typedef [flag(LIBNDR_PRINT_ARRAY_HEX|NDR_NOALIGN),nopush,nopull] struct {
+		dns_string name;
+		dns_qtype  rr_type;
+		dns_qclass rr_class;
+		uint32     ttl;
+		uint16     length; /* Should be set to either UINT16_MAX or 0 */
+		[switch_is(rr_type)] dns_rdata rdata;
+		DATA_BLOB  unexpected;
+	} dns_res_rec;
+
+	typedef [flag(NDR_NOALIGN|NDR_BIG_ENDIAN|NDR_PAHEX),public] struct {
+		uint16            id;
+		dns_operation     operation;
+		uint16            qdcount;
+		uint16            ancount;
+		uint16            nscount;
+		uint16            arcount;
+		dns_name_question questions[qdcount];
+		dns_res_rec       answers[ancount];
+		dns_res_rec       nsrecs[nscount];
+		dns_res_rec       additional[arcount];
+	} dns_name_packet;
+
+        /*
+	   this is a convenience hook for ndrdump
+	*/


-- 
Samba Shared Repository


More information about the samba-cvs mailing list