piping a data feed through a connectionless UDP driver - Networking
This is a discussion on piping a data feed through a connectionless UDP driver - Networking ; Hi,
~
I need to stream/convert bytes of data from a file or connection
oriented TC Protocol to connectionless UDP using Linux
~
I would like to be able to do something like going:
~
cat filename > /dev/udpdrvr
~
...
-
piping a data feed through a connectionless UDP driver
Hi,
~
I need to stream/convert bytes of data from a file or connection
oriented TC Protocol to connectionless UDP using Linux
~
I would like to be able to do something like going:
~
cat filename > /dev/udpdrvr
~
I was wondering if there exist such a utility in Linux?
~
Thanks
lbrtchx
-
Re: piping a data feed through a connectionless UDP driver
Albretch Mueller writes:
> Hi,
> ~
> I need to stream/convert bytes of data from a file or connection
> oriented TC Protocol to connectionless UDP using Linux
> ~
> I would like to be able to do something like going:
> ~
> cat filename > /dev/udpdrvr
> ~
> I was wondering if there exist such a utility in Linux?
Yes. I think netcat (nc) can do this, and I have used ttcp as well.
But do you realize that because UDP is unreliable, the OS may not even
TRANSMIT outgoing packets?
Also - the jitter may be unpredictable.
-
Re: piping a data feed through a connectionless UDP driver
Albretch Mueller wrote:
> I need to stream/convert bytes of data from a file or connection
> oriented TC Protocol to connectionless UDP using Linux
Try netcat (nc)
> I would like to be able to do something like going:
> cat filename > /dev/udpdrvr
That wouldn't make sense as it doesn't specify the destination host
or port.
Chris
-
Re: piping a data feed through a connectionless UDP driver
Chris Davies wrote:
>> I would like to be able to do something like going:
>> cat filename > /dev/udpdrvr
>
> That wouldn't make sense as it doesn't specify the destination host
> or port.
~
the destination host and port would be defined in a configuration file
~
lbrtchx
-
Re: piping a data feed through a connectionless UDP driver
Maxwell Lol wrote:
> But do you realize that because UDP is unreliable, the OS may not even
> TRANSMIT outgoing packets?
~
I just need the packets within the network segment
~
> Also - the jitter may be unpredictable.
~
Is there a way to avoid it?
~
lbrtchx
-
Re: piping a data feed through a connectionless UDP driver
Albretch Mueller writes:
> Maxwell Lol wrote:
>> But do you realize that because UDP is unreliable, the OS may not even
>> TRANSMIT outgoing packets?
> ~
> I just need the packets within the network segment
Not all will be transmitted. ONe thing that helps is to allocate extra
buffer memory for the UDP socket.
>> Also - the jitter may be unpredictable.
> ~
> Is there a way to avoid it?
There are two things that can help.
1) Use real time mode. Lock the process into memory and give it
highest priority. Don't let another process swap it out.
2) For video, the program would need to try to generate data in
a consistent manner. Having a set delay between packets would
help, but it's not a trivial programming issue. Everry time you
transmit, the delta between the derised delay and the actual
delay changes. So I have to correct the skew after
each packet.
I wrote a program that tested the quality of a MPEG decoder years ago.
I'm not sure what your application needs. I'm just trying to point out
some pitfalls I hit.
-
Re: piping a data feed through a connectionless UDP driver
Albretch Mueller writes:
>>> I would like to be able to do something like going:
>>> cat filename > /dev/udpdrvr
>>
>> That wouldn't make sense as it doesn't specify the destination host
>> or port.
> ~
> the destination host and port would be defined in a configuration file
That's what netcat can do
NC(1) NC(1)
NAME
nc - TCP/IP swiss army knife
SYNOPSIS
nc [-options] hostname port[s] [ports] ...
nc -l -p port [-options] [hostname] [port]
-u is UDP mode. so the sender would send to port 12345 using:
nc -u remotehost 12345