|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 26624 (0x6800)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package Tcp, seg_02538f
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Io_Exceptions;
with Mac_Types;
package Tcp is
type B_16 is range 0 .. 65535;
subtype B_32 is Mac_Types.Longint;
subtype Ip_Addr is B_32; -- IP address is 32-bits
type Wdsentry is
record
Length : B_16; -- length of buffer
Ptr : Mac_Types.Ptr; -- pointer to buffer
end record;
type Rdsentry is
record
Length : B_16; -- length of buffer
Ptr : Mac_Types.Ptr; -- pointer to buffer
end record;
type Stream_Ptr is private;
subtype Ip_Port is B_16;
-- ICMPMsgType
Netunreach : constant := 0;
Hostunreach : constant := 1;
Protocolunreach : constant := 2;
Portunreach : constant := 3;
Fragreqd : constant := 4;
Sourceroutefailed : constant := 5;
Timeexceeded : constant := 6;
Parmproblem : constant := 7;
Missingoption : constant := 8;
Lasticmpmsgtype : constant := 65535;
type Icmpreport is
record
Streamptr : Stream_Ptr;
Localhost : Ip_Addr;
Localport : Ip_Port;
Remotehost : Ip_Addr;
Remoteport : Ip_Port;
Reporttype : B_32; -- ICMPMsgType
Optionaladdlinfo : B_16;
Optionaladdlinfoptr : B_32;
end record;
-- typedef OSErr (*OSErrProcPtr)(...);
-- typedef Ptr (*PtrProcPtr)();
-- typedef Boolean (*BooleanProcPtr)();
-- typedef void (*voidProcPtr)();
-- TCPEventCode
Tcpclosing : constant := 1;
Tcpulptimeout : constant := 2;
Tcpterminate : constant := 3;
Tcpdataarrival : constant := 4;
Tcpurgent : constant := 5;
Tcpicmpreceived : constant := 6;
Lastevent : constant := 65535;
-- TCPTerminationReason
Tcpremoteabort : constant := 2;
Tcpnetworkfailure : constant := 3;
Tcpsecprecmismatch : constant := 4;
Tcpulptimeoutterminate : constant := 5;
Tcpulpabort : constant := 6;
Tcpulpclose : constant := 7;
Tcpserviceerror : constant := 8;
Lastreason : constant := 65535;
-- typedef pascal void (*TCPNotifyProc) (
-- stream_ptr tcpStream,
-- unsigned short eventCode,
-- Ptr userDataPtr,
-- unsigned short terminReason,
-- struct ICMPReport *icmpMsg);
-- typedef void (*TCPIOCompletionProc) (struct TCPiopb *iopb);
subtype Tcp_Port is B_16;
-- ValidityFlags
Timeoutvalue : constant := 16#80#;
Timeoutaction : constant := 16#40#;
Typeofservice : constant := 16#20#;
Precedence : constant := 16#10#;
-- TOSFlags
Lowdelay : constant := 16#01#;
Throughput : constant := 16#02#;
Reliability : constant := 16#04#;
type Other_Options is array (1 .. 40) of Mac_Types.Byte;
type Tcpopenpb is
record
Fill1 : Mac_Types.Longint;
Fill2 : Mac_Types.Longint;
Fill3 : Mac_Types.Longint;
Iocompletion : Mac_Types.Procptr; -- TCPIOCompletionProc;
Ioresult : Mac_Types.Integer;
Ionameptr : Mac_Types.Stringptr;
Iovrefnum : Mac_Types.Integer;
Iocrefnum : Mac_Types.Integer;
Cscode : Mac_Types.Integer;
Tcpstream : Stream_Ptr;
Ulptimeoutvalue : Mac_Types.Byte;
Ulptimeoutaction : Mac_Types.Byte;
Validityflags : Mac_Types.Byte;
Commandtimeoutvalue : Mac_Types.Byte;
Remotehost : Ip_Addr;
Remoteport : Tcp_Port;
Localhost : Ip_Addr;
Localport : Tcp_Port;
Tosflags : Mac_Types.Byte;
Precedence : Mac_Types.Byte;
Dontfrag : Boolean;
Timetolive : Mac_Types.Byte;
Security : Mac_Types.Byte;
Optioncnt : Mac_Types.Byte;
Options : Other_Options;
Userdataptr : Mac_Types.Ptr;
end record;
type Tcpopenpbptr is access Tcpopenpb;
type Tcpsendpb is
record
Fill1 : Mac_Types.Longint;
Fill2 : Mac_Types.Longint;
Fill3 : Mac_Types.Longint;
Iocompletion : Mac_Types.Procptr; -- TCPIOCompletionProc;
Ioresult : Mac_Types.Integer;
Ionameptr : Mac_Types.Stringptr;
Iovrefnum : Mac_Types.Integer;
Iocrefnum : Mac_Types.Integer;
Cscode : Mac_Types.Integer;
Tcpstream : Stream_Ptr;
Ulptimeoutvalue : Mac_Types.Byte;
Ulptimeoutaction : Mac_Types.Byte;
Validityflags : Mac_Types.Byte;
Pushflag : Boolean;
Urgentflag : Boolean;
Wdsptr : Mac_Types.Ptr;
Sendfree : Mac_Types.Longint;
Sendlength : B_16;
Userdataptr : Mac_Types.Ptr;
end record;
type Tcpsendpbptr is access Tcpsendpb;
type Tcpreceivepb is
record -- for receive and return rcv buff calls
Fill1 : Mac_Types.Longint;
Fill2 : Mac_Types.Longint;
Fill3 : Mac_Types.Longint;
Iocompletion : Mac_Types.Procptr; -- TCPIOCompletionProc;
Ioresult : Mac_Types.Integer;
Ionameptr : Mac_Types.Stringptr;
Iovrefnum : Mac_Types.Integer;
Iocrefnum : Mac_Types.Integer;
Cscode : Mac_Types.Integer;
Tcpstream : Stream_Ptr;
Commandtimeoutvalue : Mac_Types.Byte;
Filler : Mac_Types.Byte;
Markflag : Boolean;
Urgentflag : Boolean;
Rcvbuff : Mac_Types.Ptr;
Rcvbufflen : B_16;
Rdsptr : Mac_Types.Ptr;
Rdslength : B_16;
Secondtimestamp : B_16;
Userdataptr : Mac_Types.Ptr;
end record;
type Tcpreceivepbptr is access Tcpreceivepb;
type Histobucket is
record
Value : B_16;
Counter : Mac_Types.Longint;
end record;
Numofhistobuckets : constant := 7;
type Histobuckets is array (1 .. Numofhistobuckets) of Histobucket;
type Tcpconnectionstats is
record
Datapktsrcvd : Mac_Types.Longint;
Datapktssent : Mac_Types.Longint;
Datapktsresent : Mac_Types.Longint;
Bytesrcvd : Mac_Types.Longint;
Bytesrcvddup : Mac_Types.Longint;
Bytesrcvdpastwindow : Mac_Types.Longint;
Bytessent : Mac_Types.Longint;
Bytesresent : Mac_Types.Longint;
Numhistobuckets : B_16;
Sentsizehisto : Histobuckets;
Lastrtt : B_16;
Tmrsrtt : B_16;
Rttvariance : B_16;
Tmrrto : B_16;
Sendtries : Mac_Types.Byte;
Sourchquenchrcvd : Mac_Types.Byte;
end record;
type Tcpconnectionstatsptr is access Tcpconnectionstats;
type Tcpstatuspb is
record
Fill1 : Mac_Types.Longint;
Fill2 : Mac_Types.Longint;
Fill3 : Mac_Types.Longint;
Iocompletion : Mac_Types.Procptr; -- TCPIOCompletionProc;
Ioresult : Mac_Types.Integer;
Ionameptr : Mac_Types.Stringptr;
Iovrefnum : Mac_Types.Integer;
Iocrefnum : Mac_Types.Integer;
Cscode : Mac_Types.Integer;
Tcpstream : Stream_Ptr;
Ulptimeoutvalue : Mac_Types.Byte;
Ulptimeoutaction : Mac_Types.Byte;
Unused : Mac_Types.Longint;
Remotehost : Ip_Addr;
Remoteport : Tcp_Port;
Localhost : Ip_Addr;
Localport : Tcp_Port;
Tosflags : Mac_Types.Byte;
Precedence : Mac_Types.Byte;
Connectionstate : Mac_Types.Byte;
Sendwindow : B_16;
Rcvwindow : B_16;
Amtunackeddata : B_16;
Amtunreaddata : B_16;
Securitylevelptr : Mac_Types.Ptr;
-- HEMS-HEMP stats
Sendunacked : Mac_Types.Longint;
Sendnext : Mac_Types.Longint;
Congestionwindow : Mac_Types.Longint;
Rcvnext : Mac_Types.Longint;
Srtt : Mac_Types.Longint;
Lastrtt : Mac_Types.Longint;
Sendmaxsegsize : Mac_Types.Longint;
Connstatptr : Tcpconnectionstatsptr;
Userdataptr : Mac_Types.Ptr;
end record;
type Tcpstatuspbptr is access Tcpstatuspb;
type Tcpparam is
record
Tcprtoa : Mac_Types.Longint;
Tcprtomin : Mac_Types.Longint;
Tcprtomax : Mac_Types.Longint;
Tcpmaxsegsize : Mac_Types.Longint;
Tcpmaxconn : Mac_Types.Longint;
Tcpmaxwindow : Mac_Types.Longint;
end record;
type Tcpparamptr is access Tcpparam;
type Tcpstats is
record
Tcpconnattempts : Mac_Types.Longint;
Tcpconnopened : Mac_Types.Longint;
Tcpconnaccepted : Mac_Types.Longint;
Tcpconnclosed : Mac_Types.Longint;
Tcpconnaborted : Mac_Types.Longint;
Tcpoctetsin : Mac_Types.Longint;
Tcpoctetsout : Mac_Types.Longint;
Tcpoctetsindup : Mac_Types.Longint;
Tcpoctetsretrans : Mac_Types.Longint;
Tcpinputpkts : Mac_Types.Longint;
Tcpoutputpkts : Mac_Types.Longint;
Tcpduppkts : Mac_Types.Longint;
Tcpretranspkts : Mac_Types.Longint;
end record;
type Tcpstatsptr is access Tcpstats;
-- Opens the MacTCP driver.
-- Can raise Device_Error, Timeout_Error
procedure Open_Tcp_Driver;
-- Creates a new TCP stream in preparation for initiating a connection.
-- A buffer must be provided for storing incoming data waiting to be processed
-- Can raise Device_Error, Timeout_Error
procedure Low_Tcp_Create_Stream (A_Stream : out Stream_Ptr;
Connectionbuffer : Mac_Types.Ptr;
Connbufferlen : Natural;
Notify_Proc : Mac_Types.Procptr;
Userdataptr : Mac_Types.Ptr);
-- If TCPWaitForConnection is called asynchronously, this command retrieves the
-- result of the call. It should be called when the above command completes.
-- Can raise Device_Error, Timeout_Error
procedure Low_Finish_Tcp_Wait_For_Connection (Pb : in out Tcpopenpbptr;
Remotehost : out Ip_Addr;
Remoteport : out Tcp_Port;
Localhost : out Ip_Addr;
Localport : out Tcp_Port);
-- Waits for a connection to be opened on a specified port from a specified address.
-- It completes when a connection is made, or a timeout value is reached. This call
-- may be made asynchronously.
-- Can raise Device_Error, Timeout_Error
procedure Low_Tcp_Wait_For_Connection (A_Stream : Stream_Ptr;
Timeout : Mac_Types.Byte;
Remotehost : in out Ip_Addr;
Remoteport : in out Tcp_Port;
Localhost : out Ip_Addr;
Localport : in out Tcp_Port;
Async : Boolean;
Userdataptr : Mac_Types.Ptr;
Returnblock : out Tcpopenpbptr);
-- Attempts to initiate a connection with a host specified by host and port.
-- Can raise Device_Error, Timeout_Error
procedure Low_Tcp_Open_Connection (A_Stream : Stream_Ptr;
Timeout : Mac_Types.Byte;
Remotehost : Ip_Addr;
Remoteport : Tcp_Port;
Localhost : out Ip_Addr;
Localport : in out Tcp_Port;
Userdataptr : Mac_Types.Ptr);
-- This routine should be called when a TCPSendData call completes. It returns the
-- error code generated upon completion of the CallTCPSend.
-- Can raise Device_Error, Timeout_Error
procedure Low_Finish_Tcp_Send (Pb : in out Tcpsendpbptr);
-- Sends data through an open connection stream. Note that the connection must be
-- open before any data is sent. This call may be made asynchronously.
-- Can raise Device_Error, Timeout_Error
procedure Low_Tcp_Send_Data (A_Stream : Stream_Ptr;
Timeout : Mac_Types.Byte;
Push : Boolean;
Urgent : Boolean;
Wdsptr : Mac_Types.Ptr;
Async : Boolean;
Userdataptr : Mac_Types.Ptr;
Returnblock : out Tcpsendpbptr);
--
-- Can raise Device_Error, Timeout_Error
procedure Low_Finish_Tcp_No_Copy_Rcv (Pb : in out Tcpreceivepbptr;
Urgent : out Boolean;
Mark : out Boolean);
--
-- Can raise Device_Error, Timeout_Error
procedure Low_Tcp_No_Copy_Rcv (A_Stream : Stream_Ptr;
Timeout : Mac_Types.Byte;
Urgent : out Boolean;
Mark : out Boolean;
Rdsptr : Mac_Types.Ptr;
Numentry : B_16;
Async : Boolean;
Userdataptr : Mac_Types.Ptr;
Returnblock : out Tcpreceivepbptr);
--
-- Can raise Device_Error, Timeout_Error
procedure Low_Tcp_Bfr_Return
(A_Stream : Stream_Ptr; Rdsptr : Mac_Types.Ptr);
-- If the below is called asynchronously, this routine returns the data that was
-- received from the remote host.
-- Can raise Device_Error, Timeout_Error
procedure Low_Finish_Tcp_Recv (Pb : in out Tcpreceivepbptr;
Urgent : out Boolean;
Mark : out Boolean;
Rcvlen : out B_16);
-- Attempts to pull data out of the incoming stream for a connection. If data is
-- not present, the routine waits a specified amout of time before returning with
-- a timeout error. This call may be made asynchronously.
-- Can raise Device_Error, Timeout_Error
procedure Low_Tcp_Recv_Data (A_Stream : Stream_Ptr;
Timeout : Mac_Types.Byte;
Urgent : out Boolean;
Mark : out Boolean;
Rcvbuff : Mac_Types.Ptr;
Rcvlen : in out B_16;
Async : Boolean;
Userdataptr : Mac_Types.Ptr;
Returnblock : out Tcpreceivepbptr);
-- Gracefully closes a connection with a remote host. This is not always possible,
-- and the programmer might have to resort to CallTCPAbort, described next.
-- Can raise Device_Error, Timeout_Error
procedure Low_Tcp_Close (A_Stream : Stream_Ptr; Timeout : Mac_Types.Byte);
-- Should be called if a CallTCPClose fails to close a connection properly.
-- This call should not normally be used to terminate connections.
-- Can raise Device_Error, Timeout_Error
procedure Low_Tcp_Abort (A_Stream : Stream_Ptr);
--
-- Can raise Device_Error, Timeout_Error
procedure Low_Tcp_Status (A_Stream : Stream_Ptr;
Thestatus : out Tcpstatuspb);
-- Deallocates internal buffers used to hold connection data. This should be
-- called after a connection has been closed.
-- Can raise Device_Error, Timeout_Error
procedure Low_Tcp_Release (A_Stream : Stream_Ptr;
Recvptr : out Mac_Types.Ptr;
Recvlen : out Mac_Types.Longint);
--
-- Can raise Device_Error, Timeout_Error
procedure Low_Tcp_Global_Info
(Tcpparam : out Tcpparamptr; Tcpstat : out Tcpstatsptr);
-- Returns the IP address of the local computer.
-- Can raise Device_Error, Timeout_Error
procedure Get_My_Ip (Ipnum : out Ip_Addr);
-- Kills any pending calls to the TCP driver
-- Can raise Device_Error, Timeout_Error
procedure Low_Kill_Tcp (Pb : Tcpopenpbptr);
procedure Low_Kill_Tcp (Pb : Tcpsendpbptr);
procedure Low_Kill_Tcp (Pb : Tcpreceivepbptr);
Device_Error : exception renames Io_Exceptions.Device_Error;
Timeout_Error : exception;
private
type Stream_Ptr is new Mac_Types.Longint;
end Tcp;
nblk1=19
nid=16
hdr6=24
[0x00] rec0=26 rec1=00 rec2=01 rec3=04e
[0x01] rec0=23 rec1=00 rec2=12 rec3=056
[0x02] rec0=23 rec1=00 rec2=02 rec3=01e
[0x03] rec0=18 rec1=00 rec2=03 rec3=016
[0x04] rec0=1b rec1=00 rec2=04 rec3=01c
[0x05] rec0=1a rec1=00 rec2=06 rec3=018
[0x06] rec0=1a rec1=00 rec2=05 rec3=078
[0x07] rec0=1a rec1=00 rec2=07 rec3=044
[0x08] rec0=1c rec1=00 rec2=09 rec3=00c
[0x09] rec0=18 rec1=00 rec2=13 rec3=03e
[0x0a] rec0=10 rec1=00 rec2=14 rec3=076
[0x0b] rec0=10 rec1=00 rec2=0b rec3=06e
[0x0c] rec0=12 rec1=00 rec2=08 rec3=034
[0x0d] rec0=15 rec1=00 rec2=10 rec3=048
[0x0e] rec0=15 rec1=00 rec2=11 rec3=038
[0x0f] rec0=12 rec1=00 rec2=0f rec3=034
[0x10] rec0=1a rec1=00 rec2=15 rec3=014
[0x11] rec0=0b rec1=00 rec2=0e rec3=000
[0x12] rec0=08 rec1=08 rec2=08 rec3=040
[0x13] rec0=40 rec1=40 rec2=40 rec3=202
[0x14] rec0=02 rec1=02 rec2=02 rec3=010
[0x15] rec0=10 rec1=10 rec2=10 rec3=080
[0x16] rec0=80 rec1=80 rec2=80 rec3=404
[0x17] rec0=04 rec1=04 rec2=04 rec3=020
[0x18] rec0=20 rec1=20 rec2=20 rec3=101
tail 0x217202d6a83a23ec6eda1 0x42a00088462060003
Free Block Chain:
0x16: 0000 00 0d 00 1f 00 1c 20 20 20 20 20 20 20 20 20 20 ┆ ┆
0xd: 0000 00 17 03 fb 00 3c 20 20 20 20 20 20 20 20 20 20 ┆ < ┆
0x17: 0000 00 0c 00 1f 80 1c 20 20 20 54 69 6d 65 6f 75 74 ┆ Timeout┆
0xc: 0000 00 18 03 fc 80 43 68 65 6e 20 61 20 63 6f 6e 6e ┆ Chen a conn┆
0x18: 0000 00 0a 00 12 80 0f 20 49 74 20 63 6f 6d 70 6c 65 ┆ It comple┆
0xa: 0000 00 19 03 fc 80 2d 54 63 70 5f 43 72 65 61 74 65 ┆ -Tcp_Create┆
0x19: 0000 00 00 00 21 80 09 6f 75 74 5f 45 72 72 6f 72 09 ┆ ! out_Error ┆