-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add print of MDNS detail from UDP packet #2
base: master
Are you sure you want to change the base?
Conversation
src/utility/NetDump.cpp
Outdated
if ((netDump_getDstPort(ethdata) == 53) || (netDump_getSrcPort(ethdata) == 53)) | ||
{ | ||
out.print(F(" DNS ")); | ||
netDumpDNS(out, ethdata + ETH_HDR_LEN + netDump_getIpHdrLen(ethdata) + 8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks !
What do you think of factorizing ?
bool mdns = netDump_getDstPort(ethdata) == 5353) || (netDump_getSrcPort(ethdata) == 5353;
bool dns = netDump_getDstPort(ethdata) == 53) || (netDump_getSrcPort(ethdata) == 53;
if (mdns || dns)
{
if (mdns) out.print(F(" MDNS ")); else out.print(F(" DNS "));
...
}
Yes, Is better and less duplication of code. |
@d-a-v : All is one file for now, easier for me to develop. Application should able to : netdump.setcallback([](NetworkPacket np){ .....} PS : untested runtime just now, compiles OK |
Updates and first tests. To use this version.
np.fileDump works also, not very much tested and needs work for better handling of open/close/write files. tcpDump : Need to include the code from your I am on a short trip to France until next thursday or friday -> silence from my side 😄 |
Where that ? :) |
https://www.vaugouard.com |
@d-a-v |
Thanks! I will test asap |
@hreintke I had a look - You changed pretty everything ! - and I'm fine with that, the functional way fits nicely. I propose several things, you tell me what you think about them:
|
@d-a-v
I tried to make it as easy as possible for others to use/integrate. in that way it is possible to ask issue submitters to include netdump and report without much trouble
Sure, no problem. Do you have an astyle config for your preference. I have the windows version working and can pass everything through that.
I just added my code in a way to evaluate.
I learned this week that there is a difference between the two.
Yes will do, I wanted to wait until you agreed to the implementation, |
Sure, no problem. Do you have an astyle config for your preference. I have the windows version working and can pass everything through that.
I took the style we want to be able to integrate in the arduino core.
I did not push its results, but you can and push them if that's OK with you.
Did my reading and indeed think it is good to update. Will do
nice. TBH I'm a less than 1y user of lambas/::bind.
Yes will do, I wanted to wait until you agreed to the implementation,
I'll have a second look (I mainly agree anyway)
Will make .ino examples, please test on your config if they work OK for you too.
I will test that today.
|
Again, this is a complete rewrite. Why it can't be accepted as is:
What I propose:
What do you think ? |
It's the right way forward., I will make the updates as you proposed. Will not be next week, I'll be off to France again (Jura). |
As used in debugging of MDNS issue