Determine incoming IP address of a UDP message
Is there any way to determine the source IP address of an incoming message over UDP?
In other words, [udpreceive 1234] will listen on port 1234 but doesn't provide the source address from where the incoming message came.
from what i know... no end-to-end = no source.
the header only has the port numbers, that´s why it works so superfast for multicast and streaming.
maybe there is some kind of IP packet max external which i am not aware of?
then again, even if the receiving device has two different ethernet ports, you would need to use two different port numbers for two instances of the same service´s data stream... sorting IP packets is a router job.
No end-to-end just means that there's no guarantee of receipt of the message - there's no handshake as there is in a TCP message.
The UDP packet itself is sent over IP which has both source and destination IP addresses. For example, I sent a UDP packet from Max running on a laptop (ip address 192.168.0.4) to another laptop where I'm running Protokol (thanks, Hexler) to monitor incoming messages. As you can see from the attached image, the source IP address of that laptop is displayed

let me put it differently: both UDP and TCP do not contain info about the source (unless you write it in the data yourself) - such monitoring tools analyse the IP package, where max objects like [udpreceive] do not.
the header of the IP package otoh always contain the source (and eventually even the whole route)
if the adresses are known, multiple instances of [jit.net.recv @ip 127.0.0.1] could be used, but determining the source adress from the ip package, no idea.
such monitoring tools analyse the IP package, where max objects like udpreceive do not.
Correct - I'm looking for a way to be able to receive the UDP data along with the source IP address which would be retrieved from the owning IP packet so that I can know from where the message came.
Imagine an extended [udpreceive] object that has an extra outlet on it from which the IP address is available.
use sadam.udpReceiver
you will have to parse binary stream,but that is not a big deal
Thank you.