pike.git
/
lib
/
modules
/
Protocols.pmod
/
DNS.pmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Protocols.pmod/DNS.pmod:3:
//inherit Stdio.UDP : udp; //! Support for the Domain Name System protocol. //! //! RFC 1034, RFC 1035 and RFC 2308 protected void send_reply(mapping r, mapping q, mapping m, Stdio.UDP udp); #pike __REAL_VERSION__
+
// documentation taken from RFC 2136
+
//! No error condition.
final constant NOERROR=0;
-
+
//! The name server was unable to interpret the request due to a format error.
final constant FORMERR=1;
-
+
//!The name server encountered an internal failure while processing this request, for example an operating system error or a forwarding timeout.
final constant SERVFAIL=2;
-
+
//! Some name that ought to exist, does not exist.
final constant NXDOMAIN=3;
-
+
//! The name server does not support the specified Opcode.
final constant NOTIMPL=4;
-
+
//! The name server refuses to perform the specified operation for policy or security reasons.
final constant REFUSED=5;
-
+
//! Some RRset that ought to exist, does not exist.
final constant NXRRSET=8; final constant QUERY=0; //! Resource classes enum ResourceClass { //! Class Internet C_IN=1,
pike.git/lib/modules/Protocols.pmod/DNS.pmod:83:
//! Type - mailbox or mail list information T_MINFO=14, //! Type - mail exchange T_MX=15, //! Type - text strings T_TXT=16,
-
//! Type - IPv6 address record (RFC 1886
, deprecated
)
+
//! Type - IPv6 address record (RFC 1886)
T_AAAA=28, //! Type - Location Record (RFC 1876) T_LOC=29, //! Type - Service location record (RFC 2782) T_SRV=33, //! Type - NAPTR (RFC 3403) T_NAPTR=35,
pike.git/lib/modules/Protocols.pmod/DNS.pmod:729:
//! //! @note //! To indicate the default failure @[cb] must be called with an //! argument of @expr{0@} (zero), and @expr{0@} (zero) be returned. //! //! @returns //! Returns @expr{0@} (zero) when the @[cb] callback will be used, //! or a result mapping if not: //! @mapping //! @member int "rcode"
+
//! 0 (or omit) for success, otherwise one of the Protocols.DNS.* constants
//! @member array(mapping(string:string|int))|void "an"
-
+
//! Answer section:
//! @array //! @elem mapping(string:string|int) entry //! @mapping //! @member string|array(string) "name" //! @member int "type" //! @member int "cl" //! @endmapping //! @endarray //! @member array|void "qd"
-
+
//! Question section, same format as @[an]; omit to return the original question
//! @member array|void "ns"
-
+
//! Authority section (usually NS records), same format as @[an]
//! @member array|void "ar"
-
+
//! Additional section, same format as @[an]
+
//! @member int "aa"
+
//! Set to 1 to include the Authoritative Answer bit in the response
+
//! @member int "tc"
+
//! Set to 1 to include the TrunCated bit in the response
+
//! @member int "rd"
+
//! Set to 1 to include the Recursion Desired bit in the response
+
//! @member int "ra"
+
//! Set to 1 to include the Recursion Available bit in the response
+
//! @member int "cd"
+
//! Set to 1 to include the Checking Disabled bit in the response
+
//! @member int "ad"
+
//! Set to 1 to include the Authenticated Data bit in the response
//! @endmapping protected mapping reply_query(mapping query, mapping udp_data, function(mapping:void) cb) { // Override this function. // // Return mapping may contain: // aa, ra, {ad, cd,} rcode, an, ns, ar return 0;