How to ignore your own broadcast udp packets
问题 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've implemented a solution where whenever the program starts up (and periodically afterwards) it sends a broadcast to INADDR_BROADCAST - whoever listens on the required port will remember where it came from for later use. The problem with this is that I don't want to remember my own broadcasts. I thought that in theory this would be