Open
Conversation
mdns_init_reply set the flags to indique a reply to a question. To populate correctly the other kinds of packets like answer or announce, the flage must be 0000. mdns_init_pkt does that, and mdns_init_reply uses mdns_init_pkt to reduce the code.
parse_rr may be use for any kind of rr (answer, authority or additionnal), but needs to indique which list to populate. parse_qn is an uncompleted parse_rr and it is useful only for rr_qn list. But to have the same arguments on the both functions, we pass the rr_qn list like parse_rr instead the message.
This code will parse information about SRV entry found inside the message.
mds_parse_rr is compatible with rr_auth, and rr_add, and mdns_parse_pkt uses it.
for PTR the name should be in the name's field or inside the PTR entry. Before to try the PTR entry, the validity of the entry must be checked.
There is any reason to forbidde the rr_qn list inside the packet. The mdnsd server doesn't add qn then, rr_qn should be empty. Currently the qn list is not correctly encoded a part must be deleted.
display_mdns_segment allows to display the rr's lists of messages. This is useful for debuging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request allows to have a complete parsing of messages and the announcement.
It populates all fields of mdns_pkt on packet reception, and displays each entry in debug mode.
This a first step to activate a function on a specific answer.