RDI target via UDP and router (don't)

Grant Edwards grante@visi.com
Thu Sep 7 09:50:00 GMT 2000

On Thu, Sep 07, 2000 at 10:01:56AM -0600, Shaun Jackman wrote:

> The Jeeni really should be using Angel over TCP. Why they
> decided on UDP is beyond me.

There are a couple reasons I can think of:

 1) The serial protocol uses STX/ETX for framing and an
    escaping mechanism to prevent STX/ETX from appearing inside
    a frame.  UDP does framing for you, so you don't have to
    worry about it.  TCP doesn't do framing, so you've got to
    reassemble fragmented frames and do the whole STX/ETX

    But, since both the Jeeni and the hosts involved do serial
    ADP, they've already got the code in there to do STX/ETX
    framing, so this is not a very good reason.

    Aside: I still can't believe that there isn't a reliable
           datagram service available for use over IP.  I've
           seen _so_ many applications that needed one and had
           to kludge stuff on top of either UDP or TCP.  Or in
           some cases they just assume that each TCP write()
           shows up as exactly one read() and ignore the whole
           framing problem -- which will often work fine until
           the thing gets into the field.

 2) UDP is lighter-weight than TCP which requires a lot more
    RAM for buffers and a lot more complicated processing for
    the retry mechanism and re-ordering IP packets.  With the
    price of RAM and processing power these days, that's not a
    very good reason either, though it may have been more of a
    factor when the decision was made.

> As far as I understand it, Angel over UDP is identical to Angel
> over serial, with the serial chunks broken up to datagrams.

Yup.  Except for the part where the serial version does the
ETX/STX framing stuff.

> TCP would provide a reliable streamed connection identical to
> the original serial transport method.

Exactly.  Just run the TCP stream data through the same STX/ETX
framing routines and Bob's your uncle.

> Like you said, Angel has to run over a reliable transport
> medium. If they haven't built reliability (ie lost packet
> sense, out of order, etc...) into their Angel over UDP
> protocol, it's seriously broken.

UDP/IP over a local Ethernet segment is, in practice, reliable
enough to be usable.  Still, it's a hole waiting to be fallen
into, and the symptoms are random enough that it can take a
while to figure out what's going on.

> I wonder if we could convince them to do an Angel over TCP
> firmware version?

I doubt it.  I get the impression that the main engineering
effort is going into the next generation of products (which
won't use ADP), rather than major enhancements to the ADP

But, it's lunch time and I'm going to hit a bucket of balls...

Grant Edwards

More information about the Gdb mailing list