0
I have a program with a Send an UDP packet to port xyz
and I will reply with some UDP packets! interface.
I've found out that I can send a UDP packet with
echo <packetContent> | socat - udp:<dstIP>:<dstPort>,sp=<srcPort>
and listen (= just dump their content to stdout) for UDP packets with
socat - udp-listen:<srcPortFromPreviousLine>
But how can I bring those two together? When I start the listening part in one window at first, the port is already in use and I cannot send anything from there in another window.
1Isn't
udp:
already bidirectional? – user1686 – 2019-08-21T15:55:46.877Thanks a lot! Brought me to the solution. =) – Bowi – 2019-08-22T09:38:05.153