title: Getting information about received UDP message is broadcast or unicast
body: <p>Good day, everyone!</p>
  
  <p>I'm developing a Python module that allows client devices to be discovered and configured over local IP network using UDP socket.
  I'm building my solution based on an existing protocol so it can be used with already existing software, but which enables the use of only one port.
  Thus I can't solve the problem by using different ports for different message types.
  But the protocol's security greatly depends on which request should be accepted or denied, based on whether the request was addressed to broadcast or to the device directly.</p>
  
  <p><strong>My main problem is: I can't find a way (in Python) to differ broadcast messages from unicast ones (received on the same port/socket).</strong></p>
  
  <p>In addition I'm looking for solutions for both Linux and Windows.
  Furthermore on some (embedded, OpenWrt) devices that have to run this service, installing modules written in cPython is difficult, so I strongly prefer to using only built-in resources on the Linux side.
  I am also stuck in using Python but if it cannot be helped, I can utilize external tools too.</p>
  
  <p>I'd be glad for any help or guidance.
  (This is my first post on stackoverflow)</p>