This is likely to be more of a networking question than a C++ question, but I have an iOS app communicating via UDP with a networked PC. Both are using some UDP socket classes that I wrote in C. Here are my symptoms:
- When the PC app sends out broadcast traffic, Wireshark on the PC itself sees it, as does the iOS app. A third PC on the same network also sees the packets via Wireshark.
- When the iOS app sends out broadcast traffic, the PC running the app doesn't even see the packets in Wireshark. However, the third PC does.
Additional information:
- The PC in question is running Windows 7.
- It has an ethernet port that is being used for a camera.
- It has a wireless network card in it that is both joined to a network and is also using a tricky little app called Connectify to separately create its own wireless network. It is across the Connectify network that I am trying to send data. However, I have tried sending the data over the other non-Connectify wireless network, and it still fails (though the third PC on the network still sees the traffic). UPDATE Disregard the last sentence. It is false. If I change wireless networks, it works.
What I've tried:
- I first assumed this was a routing table issue, so I added persistent routes with low metric numbers for any entries relating to that interface. The routing table is here:
IPv4 Route Table =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 10.1.11.1 10.1.11.169 25 10.1.11.0 255.255.255.0 On-link 10.1.11.169 281 10.1.11.169 255.255.255.255 On-link 10.1.11.169 281 10.1.11.255 255.255.255.255 On-link 10.1.11.169 281 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306 192.168.190.0 255.255.255.0 On-link 192.168.190.1 6 192.168.190.1 255.255.255.255 On-link 192.168.190.1 6 192.168.190.255 255.255.255.255 On-link 192.168.190.1 6 224.0.0.0 240.0.0.0 On-link 127.0.0.1 306 224.0.0.0 240.0.0.0 On-link 10.1.11.169 281 224.0.0.0 240.0.0.0 On-link 192.168.190.1 257 255.255.255.255 255.255.255.255 On-link 192.168.190.1 6 =========================================================================== Persistent Routes: Network Address Netmask Gateway Address Metric 255.255.255.255 255.255.255.255 192.168.190.1 5 192.168.190.0 255.255.255.0 192.168.190.1 5 192.168.190.1 255.255.255.255 192.168.190.1 5 192.168.190.255 255.255.255.255 192.168.190.1 5 ===========================================================================
- I then assumed that there was something strange going on with this Connectify program, so I tried broadcasting over the 10.1.11 network (after undoing my persistent routes). As noted above, this succeeds.
Any ideas? I'm stumped. I suppose it could be a limitation of the network card, but then why can it see its own broadcast packets going out? Could it be that the packet sizes being output by iOS are too large for the PC NIC?