<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Backend developer HOWTO</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="HOWTO & Frequently Asked Questions" HREF="faq.html"><LINK REL="PREVIOUS" TITLE="Using and Compiling PowerDNS FAQ" HREF="pdns-users-faq.html"><LINK REL="NEXT" TITLE="About PowerDNS.COM BV, 'the company'" HREF="powerdns-company-faq.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="pdns-users-faq.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 18. HOWTO & Frequently Asked Questions</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="powerdns-company-faq.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="PDNS-DEVEL-FAQ" >18.3. Backend developer HOWTO</A ></H1 ><P > Writing backends without access to the full PDNS source means that you need to write code that can be loaded by PDNS at runtime. This in turn means that you need to use the same compiler that we do. </P ><P > Furthermore, your pdns_server executable must be dynamically linked. The default .rpm PDNS contains a static binary so you need to retrieve the dynamic rpm or the dynamic tar.gz or the Debian unstable ('Woody') deb. FreeBSD dynamic releases are forthcoming. </P ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT >Q: Will PDNS drivers work with other PDNS versions than they were compiled for?</DT ><DD ><P > A: 'Probably'. We make no guarantees. Efforts have been made to keep the interface between the backend and PDNS as thin as possible. For example, a backend compiled with the 1.99.11 backend development kit works with 1.99.10. But don't count on it. We will notify when we think an incompatible API change has occured but you are best off recompiling your driver for each new PDNS release. </P ></DD ><DT >Q: What is in that DNSPacket * pointer passed to lookup!</DT ><DD ><P > A: For reasons outlined above, you should treat that pointer as opaque and only access it via the <CODE CLASS="FUNCTION" >getRemote()</CODE > functions made available and documented above. The DNSPacket class changes a lot and this level of indirection allows for greater changes to be made without changing the API to the backend coder. </P ></DD ><DT >Q: How is the PowerDNS Open Source Backend Development Kit licensed?</DT ><DD ><P > A: MIT X11, a very liberal license permitting basically everything. </P ></DD ><DT >Q: Can I release the backend I wrote?</DT ><DD ><P > A: Please do! If you tell us about it we will list you on our page. </P ></DD ><DT >Q: Can I sell backends I wrote?</DT ><DD ><P > A: You can. Again, if you tell us about them we will list your backend on the site. You can keep the source of your backend secret if you want, or you can share it with the world under any license of your chosing. </P ></DD ><DT >Q: Will PowerDNS use my code in the PDNS distribution?</DT ><DD ><P > A: If your license permits it and we like your backend, we sure will. If your license does not permit it but we like your backend anyway we may contact you. </P ></DD ><DT >Q: My backend compiles but when I try to load it, it says 'undefined symbol: BackendMakers__Fv'</DT ><DD ><P > A: You compiled with the wrong GCC. Use GCC 3.x for Linux, 2.95.x for FreeBSD. You may want to change g++ to g++-3.0 in the Makefile, or change your path so that 3.x is used. </P ></DD ><DT >Q: I downloaded a dynamic copy of pdns_server but it doesn't run, even without my backend</DT ><DD ><P > A: Run 'ldd' on the pdns_server binary and figure out what libraries you are missing. Most likely you need to install gcc 3.0 libraries, RedHat 7.1 and 7.2 have packages available, Debian installs these by default if you use the 'unstable deb' of PDNS. </P ></DD ><DT >Q: What is this 'AhuException' I keep reading about?</DT ><DD ><P > A: This name has historical reasons and has <A HREF="http://ds9a.nl" TARGET="_top" >no significance</A >. </P ></DD ><DT >Q: I need a backend but I can't write it, can you help?</DT ><DD ><P > A: Yes, we also do custom development. Contact us at pdns.bd@trilab.com. </P ></DD ></DL ></DIV ></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="pdns-users-faq.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="powerdns-company-faq.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Using and Compiling PowerDNS FAQ</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="faq.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >About PowerDNS.COM BV, 'the company'</TD ></TR ></TABLE ></DIV ></BODY ></HTML >