OISCP:
DEFINITIONS
IMPORTS BufferDefs =
BEGIN
OPEN BufferDefs;
Constants describing addresses and connections.
unknownNetID: NSAddress.NetworkNumber = [0, 0];
unknownHostID: NSAddress.HostNumber = NSAddress.nullHostNumber; -- all zeros
allHostIDs: NSAddress.HostNumber = NSAddress.broadcastHostNumber; -- all ones
unknownSocketID: NSAddress.SocketNumber = [0];
uniqueAddress: NSAddress.NetworkAddress = [unknownNetID, unknownHostID, unknownSocketID];
unknownConnID: OISCPTypes.ConnectionID = [0];
uniqueConnID: OISCPTypes.ConnectionID = [0];
interface
Buffer/Queue procedures from the queue package modules
EnqueueOis: PROCEDURE [q: Queue, b: OisBuffer];
DequeueOis: PROCEDURE [q: Queue] RETURNS [OisBuffer];
ExtractOisFromQueue: PROCEDURE [q: Queue, b: OisBuffer] RETURNS [OisBuffer];
GetFreeOisBuffer:
PROCEDURE
RETURNS [OisBuffer] =
INLINE {
RETURN[
LOOPHOLE[BufferDefs.GetFreeBuffer[
ois, BufferDefs.systemAccessHandle, systemUse], OisBuffer]]};
ReturnFreeOisBuffer: PROCEDURE [b: OisBuffer];
GetFreeSendOisBufferFromPool:
PROCEDURE [pool: BufferAccessHandle]
RETURNS [OisBuffer] = INLINE {
RETURN[LOOPHOLE[BufferDefs.GetFreeBuffer[ois, pool, send], OisBuffer]]};
GetFreeReceiveOisBufferFromPool:
PROCEDURE [pool: BufferAccessHandle]
RETURNS [OisBuffer] = INLINE {
RETURN[LOOPHOLE[BufferDefs.GetFreeBuffer[ois, pool, receive], OisBuffer]]};
MaybeGetFreeSendOisBufferFromPool:
PROCEDURE [pool: BufferAccessHandle]
RETURNS [OisBuffer] = INLINE {
RETURN[LOOPHOLE[BufferDefs.MaybeGetFreeBuffer[ois, pool, send], OisBuffer]]};
MaybeGetFreeReceiveOisBufferFromPool:
PROCEDURE [pool: BufferAccessHandle]
RETURNS [OisBuffer] = INLINE {
RETURN[
LOOPHOLE[BufferDefs.MaybeGetFreeBuffer[ois, pool, receive], OisBuffer]]};
CreditReceiveOisBuffer:
PROCEDURE [aH: BufferAccessHandle, b: OisBuffer]
RETURNS [gotCreadit: BOOLEAN];
EnqueueSpp: PROCEDURE [q: Queue, b: SppBuffer];
DequeueSpp: PROCEDURE [q: Queue] RETURNS [SppBuffer];
ExtractSppFromQueue: PROCEDURE [q: Queue, b: SppBuffer] RETURNS [SppBuffer];
GetFreeSendSppBufferFromPool:
PROCEDURE [pool: BufferAccessHandle]
RETURNS [SppBuffer] = INLINE {
RETURN[LOOPHOLE[BufferDefs.GetFreeBuffer[oisSpp, pool, send], SppBuffer]]};
GetFreeReceiveSppBufferFromPool:
PROCEDURE [pool: BufferAccessHandle]
RETURNS [SppBuffer] = INLINE {
RETURN[LOOPHOLE[BufferDefs.GetFreeBuffer[oisSpp, pool, receive], SppBuffer]]};
MaybeGetFreeSendSppBufferFromPool:
PROCEDURE [pool: BufferAccessHandle]
RETURNS [SppBuffer] = INLINE {
RETURN[
LOOPHOLE[BufferDefs.MaybeGetFreeBuffer[oisSpp, pool, send], SppBuffer]]};
MaybeGetFreeReceiveSppBufferFromPool:
PROCEDURE [pool: BufferAccessHandle]
RETURNS [SppBuffer] = INLINE {
RETURN[
LOOPHOLE[BufferDefs.MaybeGetFreeBuffer[oisSpp, pool, receive], SppBuffer]]};
length setting
GetOisPacketTextLength: PROCEDURE [OisBuffer] RETURNS [CARDINAL];
SetOisPacketTextLength: PROCEDURE [OisBuffer, CARDINAL];
SetOisPacketLength: PROCEDURE [OisBuffer, CARDINAL];
whether internal statistics is on or not
GetDoStats: PROCEDURE RETURNS [BOOLEAN];
start procedures from CommunicationControl
OiscpPackageMake: PROCEDURE;
OiscpPackageReady: PROCEDURE;
OiscpPackageDestroy: PROCEDURE;
END. -- OISCP