For the following I\'m assuming one network card.
I have a component of my program which is designed to let others in the subnet know of its existence. For this, I\
getsockname (function documentation) can discover the local IP address associated with a particular socket. If you call this on the socket you're using to send the broadcast, you should see the same IP address you'll see returned by recvfrom.
getsockname
recvfrom