It would depend a little on the connection you make. If its TCP based then refuse the connection based on IP, if its UDP eg connectionless then yes, each received packet would have to be ignored or used depending on wether it fits.
Network sniffing is generally frowned on as companies can be sued by employees if they havent been notified that network sniffing is being used as their private data is considered at risk, even though its company machines.
Any connection to your machine comes as part of the packet where it came from so you can reply.
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
Depends on your router, Im not aware of any routers that have databases in programming terms. They have config files, and memory, and you can access them either by ssh or telnet, run commands to return various datas such as links up/down/config/errors etc. you can then parse that and display it in anyway you see fit.
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190