[BEEPwg] Tuning reset and buffered data

Darren New dnew@san.rr.com
Sat, 22 Sep 2001 21:27:36 -0700


If a BEEP library takes in buffers of data read from the socket, it
needs to either make sure it processes frames as they arrive while
awaiting a tuning reset, or it needs to be able to return unconsumed
data.

Think about TUNNEL. 

Outside        firewall           Inside
  ......... ..... .... ... ... .. ...
                   <------ ok -------
   <------ ok ------
   <------------new greeting-------->

If the beep library on "outside" gets both the OK from the firewall and
the start of the new greeting from "inside" in the same buffer, it needs
to deal with this. TLS is OK, because the machine sending "proceed"
waits to get data from the remote machine. TUNNEL is different, becaue
Inside can send the greeting before the OK has made it all the way to
Outside, and it may even wind up in the same IP datagram.

The solution is to either have "Outside" only read precisely to the end
of the frame when it knows a tuning profile is running, or to be able to
return the unused portions of any buffers that the socket handling
threads may have already read, so they can be passed on to the greeting
parser.

Just something I thought of.
-- 
Darren New 
San Diego, CA, USA (PST). Cryptokeys on demand.
                   Who is this Dr. Ibid anyway, 
                  and how does he know so much?