When called, res_query must be passed the base address of a buffer (`answer'), and the maximum length of that buffer (`anslen'). Upon return, res_query returns the count of bytes bytes actually used in the target buffer (i.e. the response packet size) or else -1 for errors.
Assuming that one wishes to call res_query in a manner that allows for the largest possible response packet size, what size should the `answer' buffer have, and what value should `anslen' have? I'm sorry to bother you all with this trivia question, but I have not found any place where this value (max DNS packet size) is documented. Of course, at the dawn of DNS, the answer... for UDP response packets, at least... was 512. But it appears to me that response packets sent via TCP can be up to 1<<16 (64KB) in length, and I have no idea what, if any limits might apply to EDNS packets sent via UDP. Regards, rfg _______________________________________________ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users