when implementing a DNS client, I would like to register the same callback on several ports. I can do so, but inside of the callback I cannot distinguish which port was written to (thus I cannot verify that the remote IP, remote port, local IP, local port are a good combination of datagrams to accept).
for now, only the source IP address is checked against an expected one, is this sufficient?
there's some asymmetry in the type callback, including a src and src_port, and a dst, but no dst_port.
when implementing a DNS client, I would like to register the same callback on several ports. I can do so, but inside of the callback I cannot distinguish which port was written to (thus I cannot verify that the remote IP, remote port, local IP, local port are a good combination of datagrams to accept).
for now, only the source IP address is checked against an expected one, is this sufficient?
there's some asymmetry in the
type callback, including asrcandsrc_port, and adst, but nodst_port.