[bind10-dev] [Fwd: Re: DNS message API: the message class]
Jelte Jansen
jelte at isc.org
Fri Oct 9 08:43:46 UTC 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
and i'll be so bold as to forward Jinmei's response as well
- -------- Original Message --------
Subject: Re: [bind10-dev] DNS message API: the message class
Date: Thu, 08 Oct 2009 12:04:19 -0700
From: JINMEI Tatuya / 神明達哉 <jinmei at isc.org>
To: Jelte Jansen <jelte at isc.org>
References: <m2y6nvplpp.wl%jinmei at isc.org> <4ACC889B.5000202 at isc.org>
<m24oqaiazz.wl%jinmei at isc.org> <4ACDC258.80606 at isc.org>
(I just noticed you unicasted your response to me...did you
intentionally exclude the dev list? Just in case I'm unicasting my
response to you, but I think this should be better discussed with
others)
At Thu, 08 Oct 2009 12:43:36 +0200,
Jelte Jansen <jelte at isc.org> wrote:
> Conversion rules (to/from wire/string/etc), are specific per rdata
> field type, and shared between RRs; My point was that we don't need
> to rewrite the function to convert a TXT field for every RR type
> that contains one or more text fields, regardless of the external
> API (except insofar that these might or might not actually *be* in
> the external API)
Ah, okay. If I understand this correctly, the current design follows
this principle. For example, the "NSRdata" class of the experimental
prototype is defined as follows:
class NSRdata : public Rdata {
public:
...
string to_text() const { return (_nsname.to_text(false)); }
private:
Name _nsname;
};
Likewise, if we defined the "PTRRdata" class, it would look like this:
class PTRdata : public Rdata {
public:
...
string to_text() const { return (_ptrname.to_text(false)); }
private:
Name _ptrname;
};
That is, the to_text() method of the Name class is shared by NS and
PTR (and wherever names are used in other RRs).
If this is different what you meant please point it out.
> >> Still, RdataClass and RdataType could be named better imo
[...]
> > class ISC::DNS::RDATA::IN::A;
> > etc.
> >
> > Are these better? (An obvious downside is these look lengthy)
> >
>
> I like this better, part of the name length here is the still open discussion
> about the general namespace, although still only a small part in this case,
> since both ISC and DNS are short acronyns :)
>
> My personal feeling is that RRDATA instead of RDATA would convey the
> contents better, in this approach, since we're talking about all the
> data of the rrs. But loud screaming of 'for the love of <my deity>,
> NO', or other suggestions are welcome
Hmm...I personally don't have a strong preference (I just followed the
naming convention of BIND9 and dnspython), but "RDATA" is the standard
technical term defined in RFC1035 so it sounds reasonable to me.
As for RdataClass and RdataType, on the other hand, RRClass and RRType
are probably better because class/type are attributes (fields) of an
RR, not of an RDATA. Do you feel more comfortable with RRClass and
RRType, or would you seek something even better?
- ---
JINMEI, Tatuya
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkrO978ACgkQ4nZCKsdOncUX+QCg3aCNo2+NDaQ+2BxSRKHLGSMB
Uv0An06uPgJzkTW37SKjjuzihH5veciZ
=pMGZ
-----END PGP SIGNATURE-----
More information about the bind10-dev
mailing list