[Twisted-Python] simple dns server with twisted.names
y.glodt at sitasoftware.lu
Tue Jan 17 03:24:19 EST 2006
Nathaniel Haggard wrote:
> On 1/13/06, *Yves Glodt* <y.glodt at sitasoftware.lu
> <mailto:y.glodt at sitasoftware.lu>> wrote:
> I have read about twisted.names and I guess it can help me in what I
> have to achieve..
> I have a database which contains a list of ip-addresses and
> corresponding hostnames.
> Now, how could I do to, e.g., write a daemon which would, on dns
> queries, query the database to resolve the name?
> You could subclass twisted.names.client.Resolver to lookup the names
> from the db or from some structure generated from the db.
I went through the available documentation and I have to say that I did
not advance... is there a list of classes and methods available somewhere?
Otherwise, I guess I could advance if I could have some examplecode
which does only 1 thing:
in my python program I have a variable myhost = '22.214.171.124'
Now, I would be perfectly happy if I launch my python program, and if
the following would work:
dig myhost @127.0.0.1
thanks in advance,
More information about the Twisted-Python