Reputation: 11
I'm trying to catch every UDP packet coming from a device ( a camera), which is located on my local network.
The problem is the following: - I know source IP/port and my computer IP, but when I receive the stream, the destination port is unknown.
I want something to bind UDP coming socket to every port, but this method does not exist.
My question is: Do you know how to catch every UDP packet coming from a source, with only source Port and source IP ( and my computer IP, of course).
Thank you
Upvotes: 1
Views: 1774
Reputation: 2886
Your camera should have a destination IP address and UDP port in its configuration.
That is, the camera will send UDP datagrams to that specific IP address and port. It may also support broadcast / multicast (sending to all the nodes in your subnet), in which case one or more bits of the destination address are set to 1 (e.g. 192.168.1.255 which is the broadcast address for the network 192.168.1.x).
You should ensure these conditions are met:
Upvotes: 1