[Twisted-Python] Writing a simple nameserver
y.glodt at sitasoftware.lu
Wed Aug 9 11:16:05 EDT 2006
On Wednesday 09 August 2006 16:39, Jean-Paul Calderone wrote:
> On Wed, 9 Aug 2006 16:24:59 +0200, Yves Glodt <y.glodt at sitasoftware.lu>
> >I have a database which contains a list of hosts with their IP-addresses,
> > and I need to be able to connect to them by their name.
> >The plan is to write a simple daemon using twisted names which accepts the
> > dns query, looks up the requested address in the database, and answers
> > the dns query.
> >How would I do that with twisted names?
> >(I skimmed over the documentation but got blinded by "Undocumented"
> > labels.)
> You want to implement an authority. There is basically no documentation
> for this, as you discovered. You can take a look at one of the existing
> authority implementations for some hints:
thanks for your answer, I'll take a look at it, although I'm by far no expert
in python nor dns I hope I find my way through the provided examples :-)
> Once you have an authority, you just need to construct a server based on
> it. You can see an example of this in the tap module:
> This basically amounts to passing a list of authorities to a protocol
> instance and then using listenUDP with it.
> Twisted Names has never really received any polish. The API it presents
> for doing this is not necessarily well thought out or completely
> consistent. If you would like to improve it, please feel free.
More information about the Twisted-Python