You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After parsing a packet and looping through the resource records in the answers, I'm trying to access the Rdata as a vector of [u8] bytes. But being new to Rust, I can't figure this out.
RData::A(Record(ip))
Gives me an IPv4Addr and I can do similar things for other record types but I just want the raw [u8] for caching and duplicate detection.
The text was updated successfully, but these errors were encountered:
We don't have such field for now. But also our record types are bad for caches in the following ways:
Non-static lifetimes
Records should be order-independent. E.g. 127.0.0.1, 127.0.0.2 should be same as 127.0.0.2, 127.0.0.1 (for A record)
Also raw bytes are bad. Because depending on implementation on the other side, bytes here may refer to bytes outside of the resource record range byte (there is kind of dns names compression in the packet which may refer to any other name declared within packet boundaries).
So it's better to make your own type which can be cached safely (and it should probably be enum too)
After parsing a packet and looping through the resource records in the answers, I'm trying to access the Rdata as a vector of [u8] bytes. But being new to Rust, I can't figure this out.
Gives me an IPv4Addr and I can do similar things for other record types but I just want the raw [u8] for caching and duplicate detection.
The text was updated successfully, but these errors were encountered: