domain icon indicating copy to clipboard operation
domain copied to clipboard

Change `qr` bit

Open CrabNejonas opened this issue 1 year ago • 3 comments

The DNS packet header bit QR is set to 0 for queries and 1 for a response. domain::base::header::Header casts this to a bool where 0 becomes false and 1 becomes true.

This is incredibly confusing to me since qr is clearly meant to mean query, so when you use the qr() method you basically have to to the opposite of what the header field indicates.

While I agree this is technically correct (as it just describes wether the flag is set) this took me about 1hr and largely re-implementing a dns parser from scratch to figure out. Soooo maybe we should do something about that 😄

CrabNejonas avatar Apr 26 '23 22:04 CrabNejonas