troglobit / mdnsd

Jeremie Miller's original mdnsd
BSD 3-Clause "New" or "Revised" License
55 stars 35 forks source link

Clean up the multicast socket creation function. #68

Closed fzs closed 1 year ago

fzs commented 1 year ago

This is mostly readability and minor details. But it also removed the superfluous setting of SO_PKTINFO, therefore closes #67 .

fzs commented 1 year ago

I wonder if the socket creation functions couldn't be the same for mdnsd and mquery. I don't see much of a difference.

troglobit commented 1 year ago

Looks great, good of you to fix that flag vs on and unsigned char vs int ... cut-n-paste from old BSD applications.

Yeah, there's a lot that could be shared with mquery, I've just not gotten around to refactoring.

If you're happy (share w/ mquery) with the state of the PR I can merge it.

fzs commented 1 year ago

I had a stab at refactoring the socket creation out into its own file. This should also make the extension to IPv6 easier. I have added it to the branch of this PR. See if you like it.

troglobit commented 1 year ago

Awesome, thank you! Really appreciate your attention to detail <3