Replying to my own post: Attached wireshark capture screencap:
The PC host 192.168.1.34 sends out a mDNS question. I was expecting that, the udp_recv() within /** * @ingroup mdns * Initiate MDNS responder. Will open UDP sockets on port 5353 */ void mdns_resp_init(void) would be receiving the mDNS question. But in fact, it does not, when used in a mdns_example_init() from mdns_example.c context. So, I started looking to use udp_recv outside of mdns.c, but then the udp_pcb is static. static struct udp_pcb *mdns_pcb; Is something amiss in what I have understood ? Am I going on a wrong track ? Thanks for any pointers. Manu On Sun, Aug 30, 2020 at 10:10 PM Manu Abraham <abraham.m...@gmail.com> wrote: > > Greetings, > > Trying to get mdns from lwip/apps working. > > I have the following code running: > > void netpnp_thread(void *arg) > { > struct netif *netif = arg; > > xSemaphoreTake(sem_mdns, portMAX_DELAY); > osDelay(1000); > > igmp_report_groups(netif); > mdns_example_init(); > > while (1); > } > > > With that mdns works with the mdns_example_init() shamelessly copied > from mdns_example.c, DHCP client has already created a multicast group > with address 224.0.0.1 > > This is verified from the igmp debug log. > > My question is thus; How and when should an announcement be done ? > Does the browser application request the announcement request ? > If so, how should that be handled ? > > > Thanks, > > Manu > > > (292) StartThread: > igmp_init: initializing > (257) Netif_Config: Configuring Network > igmp_start: starting IGMP processing on if 24000234 > igmp_lookup_group: allocated a new group with address 224.0.0.1 on if 24000234 > (342) dhcp_thread: > DHCP state : 132 > DHCP state : SELECTING > DHCP state : CHECKING > igmp_report_groups: sending IGMP reports on if 24000234 > DHCP state : BOUND > > IPv4 Address : 192.168.1.33 > IPv4 Subnet mask : 255.255.255.0 > IPv4 Gateway : 192.168.1.1 > > Lease period: 86400s, Renew in: 43200s, Rebind in: 75600s > > (330) print_dhcp_state: DHCP Bound > igmp_report_groups: sending IGMP reports on if 24000234 > igmp_lookup_group: allocated a new group with address 224.0.0.251 on if > 24000234 > igmp_joingroup_netif: join to new group: 224.0.0.251 > igmp_timeout: report membership for group with address 224.0.0.251 on > if 24000234 > MDNS: Responding with A record > MDNS: Responding with SRV record > MDNS: Responding with TXT record > MDNS: Sending packet, len=106, unicast=0 > MDNS: Responding with A record > MDNS: Responding with SRV record > MDNS: Responding with TXT record > MDNS: Sending packet, len=106, unicast=0 > MDNS: Responding with A record > MDNS: Responding with SRV record > MDNS: Responding with TXT record > MDNS: Sending packet, len=106, unicast=0 > MDNS: Responding with A record > MDNS: Responding with v4 PTR record > MDNS: Responding with service type PTR record > MDNS: Responding with service name PTR record > MDNS: Responding with SRV record > MDNS: Responding with TXT record > MDNS: Sending packet, len=184, unicast=0 > mdns status[netif 0]: 1 _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users