[bind10-dev] DNS message API: how to handle to-be-truncated case

Evan Hunt each at isc.org
Wed Sep 30 00:31:24 UTC 2009


> A performance-sensitive client code that must expect truncation should
> still be pretty simple:
>   message.allow_truncation();
>   message.to_wire();  // always succeed.  it may be an incomplete msg with TC
>   message.sendto(somewhere);

This seems reasonable to me.  How does the caller find out the message was
incomplete, though?

(Side note:  Doesn't "message.sendto()" kind of imply that the message has
to be converted to wire format first?  I'm not sure why it has to be two
steps.  Could the sendto() routine simply call to_wire() when it was
needed?)

                                        eh




More information about the bind10-dev mailing list