[bind10-dev] python bindings
JINMEI Tatuya / 神明達哉
jinmei at isc.org
Tue Dec 15 19:53:34 UTC 2009
Francis,
Thanks for the comment. And I'm glad that the pythong bindings
project seems to be launched:-)
At Tue, 15 Dec 2009 16:16:40 +0000,
Francis Dupont <fdupont at isc.org> wrote:
>
> I looked at python bindings for BIND 10 (the Name class from parkinglot),
> I have some comments:
> - there is a dependency on *recent* versions of automake:
> old versions of automake (i.e., the version you should get on most
> distribs per default) fail to recognize python 3
I'm not sure about the point...are you suggesting something specific?
> - to build a dynamic object (i.e., xxx.so) as needed for a python
> extension the code must be compiled with -fPIC. As it has a low
> impact I suggest to make this option the default for libraries.
Will do in the dnsmessageapi and get it reviewed as part of the
branch.
> - a hash method is really needed (not only for python but I can't see
> a DNS tool without a hashtable with names as keys)
Adding a name hash is easy. The question is which hash algorithm we
should use. In BIND9, we needed to make it unpredictable to avoid a
certain kind of DoS attacks and ended up implementing a universal hash
in libisc. My understanding is that we generally want to avoid this
type of wheel reinvention in BIND10, but I don't know which algorithm
we should use this time and whether there's a reasonable existing
wheel (boost::hash?).
> - for DNSSEC we need a canonize/specialized toWire/..., at least something!
Could you be more specific? Are you talking about name.toWire or
rr(set).toWire? BTW, if you mean name.toWire with downcasing
upper-case characters, we could do this with the simple toWire() +
specific "downcase" method (the latter is not yet implemented).
> - for using the C++ class in dnspython, set/get methods to labels
> (a vector of labels?) is required. (Note dnspython is python 2.6,
> not python 3).
I'm not sure about the implication...are you thinking about making our
python bindings compatible with dnsypython?
> - the parkinglot code is not complete, what code I should use?
> I need something I can easily compile (i.e., generate libdns.a)
> and where no interesting function returns an unresolved reference
> on (late) linking. It seems branches/jinmei-dnsmessageapi is
> better than parkinglot, Jinmei?
Please refer to branches/jinmei-dnsmessageapi. It's what I'm going to
get reviewed (and mostly ready for that).
> - the bug exists for parkinglot but I am afraid it is shared:
> Name::Name("") raises a runtime error.
It's by design (BIND9's dns_name_fromtext() rejects an empty string,
too, and the name class follows that convention). We should
explicitly note that in the documentation though.
---
JINMEI, Tatuya
More information about the bind10-dev
mailing list