An oddness of BSD sockets (not winsock) is that binding to INADDR_ANY will receive unicast and broadcast, but binding to a specific interface address receives only unicast. The trick is to bind a second socket to the interface broadcast address, which will then receive only broadcasts.