Hi Community,
I'm looking for a way to tell an incoming IPv4 UDP unicast from incoming IPv4 UDP broadcast.
I found this howto, but I canot find 'struct mh' and function recvmsg() MQX v4.1.1:
linux - Get destination address of a received UDP packet - Stack Overflow
Is there an MQX way of getting the destination address?
Please note: recvfrom() gives me the sender's address to be able to reply the datagram, what I need is the destination address.
Thanks a lot, Martin
Solved! Go to Solution.
I helped myself with creating three sockets to the same UDP port:
one for IPv4 bound to the interface IP, one IPv4 bound to INET_ANY, one last but not leas one to IPv6.
that'll do.
I helped myself with creating three sockets to the same UDP port:
one for IPv4 bound to the interface IP, one IPv4 bound to INET_ANY, one last but not leas one to IPv6.
that'll do.