I am trying to port a process from Windows to WSL/Linux. Earlier, two Windows process were communicating through TCP connection after successful SSDP discovery. Now, I want similar communication to work from Windows to Linux (WSL). I had been using localhost/127.0.0.1 in the Windows<->Windows case, but SSDP discovery seems to work only on WSL's instance IP for Windows<->WSL .
ifconfig in WSL gives:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.26.253.18 netmask 255.255.240.0 broadcast 172.26.255.255
inet6 fe80::215:5dff:fed7:82b prefixlen 64 scopeid 0x20<link>
ether 00:15:5d:d7:08:2b txqueuelen 1000 (Ethernet)
RX packets 422 bytes 72257 (72.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 299 bytes 27676 (27.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 378 bytes 19949 (19.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 378 bytes 19949 (19.9 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
SSDP discovery works for 172.26.253.18 when I am running a process in Windows and other in WSL.
Possible reason I can think of is when we use 127.0.0.1 within WSL, it refers to the loopback interface of the WSL environment itself. SSDP packets sent to 127.0.0.1 stay within the WSL environment and aren't visible to the host Windows environment or other devices on your local network.