完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
在我的应用程序中,我尝试使用MNS来为我的服务做广告。我按预期工作了。然而,我的应用程序必须做广告,超过1的服务,我知道,TCPIP栈不支持同时超过1个服务的广告。所以我尝试取消我的第一服务并注册下一个服务。我看到的问题是,我的第一个服务根本没有广告。我可以从Bojjor浏览器看到我的第二个服务,但第一个从来没有出现,虽然它最初是广告。即使在WiReSARK,我也看不到第一的服务广告。我认为这可能是一个时间问题,我甚至在完全广告之前取消了第一项服务。我试图在取消登记之前引入一些延迟,但没有运气。你能建议我能在一个接一个地发布我的服务吗?
以上来自于百度翻译 以下为原文 In my application, I'm trying to use MDNS to advertise my service. I got it working as expected. However my application has to advertise more than 1 service and I learnt that the TCPIP stack doesn't support advertising more than 1 service concurrently. So I tried deregistering my 1st service and register the next. The problem I see is, my 1st service never gets advertised at all. I can see my 2nd service from a Bonjour browser but the 1st one never shows up though it was advertised initially. Even in Wireshark, I don't see the 1st service advertisement. I thought this could be a timing issue and I was deregistering the 1st service even before it was completely advertised. I tried introducing some delays before the deregister but no luck. Can you suggest a workaround where I would be able to publish my services one after the other? |
|
相关推荐
13个回答
|
|
现在,是的,每个接口只能注册一个服务。为了改变这一点,我没有看到一个即时的解决方案,因为您需要创建一个DNSRESUT的数组,每个都有自己的状态。不管怎样,你不是最好的主意。但是我想你的问题有一个解决方案:启用别名接口并在同一条线上创建另一个虚拟接口(我假设你运行以太网)。这个新的接口将有自己的IP地址,可以运行自己的MNS服务,为您提供您所需要的。
以上来自于百度翻译 以下为原文 Currently yes, there is only one service that can be registered per interface. To change this I don't see an immediate workaround because you'd need to create an array of DNSDesc_t, each with its own state, etc. While this is not difficult to do, it still needs a lot of messing with the code, probably not the best idea anyway. But there is a solution to your problem, I think: enable the alias interfaces and create another virtual interface on the same wire (I assume you run Ethernet). This new interface will have its own IP address and can run its own mDNS service, providing you what you need. Give it a try and let us know. |
|
|
|
我应该在我的第一个帖子里提到这个。我在我的应用程序中使用IPv6,并且我还发现IPv6的接口别名是不支持的。你的建议是什么?
以上来自于百度翻译 以下为原文 I should have mentioned this in my initial post. I'm using IPv6 in my application and I see that interface aliasing is not supported for IPv6, yet. What would be your suggestion? |
|
|
|
MDNS只在IPv4之上,没有IPv6支持。也许您可以同时运行?
以上来自于百度翻译 以下为原文 mDNS is only over IPv4, no IPv6 support. Maybe you can run both? |
|
|
|
是啊。进一步分析,我注意到,MDNS只是IPv4。你对我的申请是正确的,包括IPv4和IPv6。但是,在所有的事务中,我只在应用程序中使用IPv6地址。我会尝试混淆和宣传我的第二服务,让你知道它是怎么回事。谢谢你一直以来的帮助。
以上来自于百度翻译 以下为原文 Yeah. Analyzing further, I did notice that mDNS is only IPv4. You were right about my application including both IPv4 & IPv6. However, I use only IPv6 addresses in my application for all the transactions. I'll try the aliasing and advertise my 2nd service and let you know how it goes. Thank you for helping out all along. |
|
|
|
嗨,Runad,我试过你建议的工作环境,它正在工作。我只使用了MNS的IPv4,所有其他事务都在IPv6上发生。Microchip是否计划为MNS发布IPv6支持?你认为通过将IPv4相关的数据结构和功能更改为相应的IPv6结构和功能,可以对ZooOnSuffuleStudioDNS.C进行更改吗?
以上来自于百度翻译 以下为原文 Hi rainad, I tried the workaround you had suggested and it is working. I'm using IPv4 only for mDNS and all my other transactions happen over IPv6. Does Microchip plan on releasing support for IPv6 for mDNS? P.S. Do you think making changes to zero_conf_multicast_dns.c by changing IPv4 related datastructures and functions to corresponding IPv6 structures and functions would work? |
|
|
|
是的,向所有模块添加IPv6支持是我们的路线图。对MNS源文件切换到IPv6的更改不应该太难实现,实际上是相当简单的工作。但是,这将是不同于标准的分布,直到IPv6更新完成之前,您必须一直保持。而且,最有可能的是,官方版本将略有不同,因为它必须同时提供IPv4/IPv6选择等。
以上来自于百度翻译 以下为原文 Yes, adding IPv6 support to all modules is on our roadmap. Changes to mDNS source file to switch to IPv6 shouldn't be too difficult to implement, fairly straightforward work actually. But it will be just something that's different from the standard distribution that you'll have to maintain until the IPv6 update is done. And, most likely, the official version will be slightly different, because it will have to offer both IPv4/IPv6 selections, etc. |
|
|
|
我确实尝试改变源代码来支持IPv6并使它能够工作。但是,我注意到没有用IPv4显示的警告消息。我有日志文件和WiRESHARK捕获附加。你能看一下它,看我是否应该关心警告信息?同样,当我尝试在DNS SD命令行(Windows)上浏览MNS服务时,该工具总是在IPv4上寻找服务,而不是在IPv6上寻找服务。有什么具体的方法可以浏览IPv6的MNS服务吗?
IPv6M.NNS.PCCANG.TXT(92.99 KB)-下载47次 以上来自于百度翻译 以下为原文 I did try changing the source code to support IPv6 and could get it to work. However, I noticed warning messages that didn't show up with IPv4. I have the log file and Wireshark capture attached. Can you a take a look at it to see if I should be concerned about the warning messages? Also, I don't see the text records in the wireshark logs. Also, when I tried browsing for mDNS services on dns-sd command line(Windows), the tool always looked for services on IPv4 and not on IPv6. Is there a specific way I could browse for IPv6 mDNS services? Attachment(s) IPv6_mDns.txt (1.58 KB) - downloaded 68 times IPv6_mDNS.pcapng.txt (92.99 KB) - downloaded 47 times |
|
|
|
如果服务被正确地广告,那些警告不重要。我认为有一个命令“DNS SD-G V6”或允许使用IPv6的东西。或者尝试一些苹果工具。
以上来自于百度翻译 以下为原文 If the service is advertised properly, those warnings shouldn't matter. I think there is a command "dns-sd -G v6" or something that allows the use of IPv6. Or try some Apple tools for this. |
|
|
|
我不确定服务广告是否已完成。我没有看到TXT记录,我的WiReSARK包显示目的端口为0而不是5353。我不明白为什么我的TXT记录丢失了。我将文件附加到IPv6的更改中。更新:我修复了MDNS端口的远程绑定。我仍然看不到我的TXT唱片。
以上来自于百度翻译 以下为原文 I'm not sure if the service advertisement is complete. I don't see the TXT record and my Wireshark packets show the destination port as 0 instead of 5353. I don't understand why my TXT record was missing. I'm attaching the file with my changes for IPv6. Update: I fixed the remote binding of MDNS port. I still couldn't see my TXT record. Attachment(s) mdnsv6.txt (93.36 KB) - downloaded 73 times |
|
|
|
我没有注意到端口到IPv6的任何明显的问题。我会尝试一个简单的测试:在Socket被正确初始化之后,尝试发送一些消息到多播地址,并检查是否使用WiReSARK。这将告诉我们,如果有什么插座的配置或问题是WiDNS。
以上来自于百度翻译 以下为原文 I haven't noticed any obvious issues with the port to IPv6. I'd try a simple test: after the socket is properly initialized, try to send some message to the multicast address, and check if that one goes out, using Wireshark. That will tell us if there's something with the socket configuration or the issue is withing mDNS. |
|
|
|
我可以看到消息被发送到多播地址。我没有发送我的PTR和SRV记录的问题。我可以在WiReSARK上看到他们。我现在唯一的问题是丢失的TXT记录。我不知道为什么我看不到THT TXT记录,而其他记录在WiReSARK上看到。
以上来自于百度翻译 以下为原文 I could see messages being sent to the multicast address. I don't have issues with sending out my PTR and SRV records. I could see them on Wireshark. The only issue I have now is the missing TXT record. I'm not sure why I don't see just t he TXT record while other records are seen on Wireshark. |
|
|
|
我建议设置一个断点,其中需要发送TXT记录(或SysSoSeleSyRead)并查看代码是否到达该点。如果是,则检查ARARYPUT函数的返回值。
以上来自于百度翻译 以下为原文 I'd suggest putting a breakpoint where the TXT record needs to be transmitted (or a SYS_CONSOLE_PRINT) and see if the code reaches that point. If it does, than check the return of the ArrayPut function. |
|
|
|
通过进一步调试,我发现TXT记录根本没有被发送。我点击了函数MDSNSENDRR(),发现只有A、PTR和SRV记录被发送,而不是TXT记录。TXT记录填充在函数MdnSSDFILRESReCordSO()中,但未被发送。我为txt记录添加了一个调用toMtnSnDrrRE(),现在它工作了。感谢你的帮助!
以上来自于百度翻译 以下为原文 With further debugging, I found that the TXT record was not being sent at all. I tapped the function _mDNSSendRR() and found that only A, PTR and SRV records were being sent and not the TXT record. The TXT records were populated in the function _mDNSSDFillResRecords() but not sent. I added a call to _mDNSSendRR() for the TXT record and it works now. Appreciate your help! |
|
|
|
只有小组成员才能发言,加入小组>>
5184 浏览 9 评论
2005 浏览 8 评论
1932 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3179 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2229 浏览 5 评论
739浏览 1评论
626浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
511浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
637浏览 0评论
535浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-28 06:14 , Processed in 1.228604 second(s), Total 69, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号