This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Extract UDP protocol data

0

Hello,

on my ethernet port i am receving UDP data, i wanted to extract/captured that data and want to use for some other application.

Can anyone guide me how to extrack string of UDP data, in detail.

asked 09 Oct '16, 22:06

damaniaa's gravatar image

damaniaa
6112
accept rate: 0%


One Answer:

0
# cat < /dev/udp/127.0.0.1/<port> | <other application>

This is for a Bash prompt. Otherwise you'll need to give more context.

answered 10 Oct '16, 02:44

Jaap's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%

hi, thanks for your answer. but i couldnt understood your solution

(10 Oct '16, 03:12) damaniaa

The reason might be because your question itself is hard to understand. You haven't specified what exactly you want to do with the data, whether you mean a particular UDP stream or any UDP packet which happens to arrive to your network card..., so @Jaap has given you a correct answer which may, however, be useless for your purpose.

The part to the left from the | sign converts the payload of the UDP packets into a byte stream, and if the application to the right can read binary streams on its STDIN, it can read that stream. And it works on Linux and possibly also OS X.

If you wanted something else, say it clearly.

(10 Oct '16, 04:32) sindy

My answer was just bait; correct, but likely useless. As @sindy said: specify your setup, in detail, so there can be guidance, in detail.

(10 Oct '16, 06:19) Jaap ♦