Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > b24f4357c8479344be16703c233650c5 > files > 41

pdns-2.9.22-9.mga1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Read/write master-capable backends</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PowerDNS manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Backend writers' guide"
HREF="backend-writers-guide.html"><LINK
REL="PREVIOUS"
TITLE="Read/write slave-capable backends"
HREF="rw-backends.html"><LINK
REL="NEXT"
TITLE="Compiling PowerDNS"
HREF="compiling-powerdns.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PowerDNS manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="rw-backends.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Appendix C. Backend writers' guide</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="compiling-powerdns.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="MASTER-BACKENDS"
>C.5. Read/write master-capable backends</A
></H1
><P
>        In order to be a useful master for a domain, notifies must be sent out whenever a domain is changed. Periodically, PDNS
        queries backends for domains that may have changed, and sends out notifications for slave nameservers.
      </P
><P
>        In order to do so, PDNS calls the <CODE
CLASS="FUNCTION"
>getUpdatedMasters()</CODE
> method. Like the <CODE
CLASS="FUNCTION"
>getUnfreshSlaveInfos()</CODE
>
        function mentioned above, this should add changed domain names to the vector passed.
      </P
><P
>	The following excerpt from the DNSBackend shows the relevant functions:
      </P
><P
>	<PRE
CLASS="PROGRAMLISTING"
>	  class DNSBackend {
	  public:
           /* ... */
	   virtual void getUpdatedMasters(vector&lt;DomainInfo&gt;* domains);
	   virtual void setNotifed(int id, u_int32_t serial);
           /* ... */
	 }
	</PRE
>
      </P
><P
>	These functions all have a default implementation that returns false - which explains that these methods can be omitted in simple backends. 

	Furthermore, unlike with simple backends, a slave capable backend must make sure that the 'DNSBackend *db' field of the SOAData record is filled 
	out correctly - it is used to determine which backend will house this zone. 

	<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>void getUpdatedMasters(vector&lt;DomainInfo&gt;* domains)</DT
><DD
><P
>		When called, the backend should examine its list of master domains and add any changed ones to the DomainInfo vector
	      </P
></DD
><DT
>bool setNotified(int domain_id, u_int32_t serial)</DT
><DD
><P
>                Indicate that notifications have been queued for this domain and that it need not be considered 'updated' anymore
	      </P
></DD
></DL
></DIV
>
      </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="rw-backends.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="compiling-powerdns.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Read/write slave-capable backends</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="backend-writers-guide.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Compiling PowerDNS</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>