DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦74e365561⟧ Ada Source

    Length: 12288 (0x3000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Transport, seg_00fea8

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Byte_Defs;
with Transport_Defs;

package Transport is

    type Connection_Id is private;
    -- Identifies the local resources associated with a connection.

    Null_Connection_Id : constant Connection_Id;


    function Local_Host (Network : Transport_Defs.Network_Name)
                        return Transport_Defs.Host_Id;
    -- The ID which identifies your machine in the given NETWORK.


    -- All defined network_names can be scanned:

    type Network_Name_Iterator is limited private;
    procedure Init (Iter : in out Network_Name_Iterator);
    procedure Next (Iter : in out Network_Name_Iterator);
    function Done (Iter : Network_Name_Iterator) return Boolean;
    function Value (Iter : Network_Name_Iterator)
                   return Transport_Defs.Network_Name;


    -- All open connection_id's can be scanned:

    type Connection_Id_Iterator is limited private;
    procedure Init (Iter : in out Connection_Id_Iterator);
    procedure Next (Iter : in out Connection_Id_Iterator);
    function Done (Iter : Connection_Id_Iterator) return Boolean;
    function Value (Iter : Connection_Id_Iterator) return Connection_Id;


    procedure Open (Connection : out Transport.Connection_Id;
                    Status : out Transport_Defs.Status_Code;
                    Network : Transport_Defs.Network_Name;
                    Local_Socket : Transport_Defs.Socket_Id :=
                       Transport_Defs.Null_Socket_Id);

    -- Allocate the local resources required to establish a
    -- connection.  Any subsequent connection which may be
    -- established will be via the given NETWORK, using the given
    -- LOCAL_SOCKET.  If LOCAL_SOCKET = NULL_SOCKET_ID, the
    -- transport service will invent a socket_id which is not
    -- currently in use, and assign it to this connection.


    procedure Close (Connection : Transport.Connection_Id);

    -- Deallocate local resources.
    -- If the connection is connected, disconnect it.
    -- If the connection is not open, do nothing.


    procedure Connect (Connection : Transport.Connection_Id;
                       Status : out Transport_Defs.Status_Code;
                       Remote_Host : Transport_Defs.Host_Id;
                       Remote_Socket : Transport_Defs.Socket_Id;
                       Max_Wait : Duration := Duration'Last);

    -- Initiate a connection to the specified remote host and socket.
    -- The CONNECTION must be open.


    procedure Connect (Connection : Transport.Connection_Id;
                       Status : out Transport_Defs.Status_Code;
                       Max_Wait : Duration := Duration'Last);

    -- Wait for a connection initiated by some other task.
    -- The CONNECTION must be open.


    procedure Disconnect (Connection : Transport.Connection_Id);

    -- Break a connection.
    -- If the CONNECTION is not connected, do nothing.


    function Is_Open (Connection : Transport.Connection_Id) return Boolean;
    function Is_Connected (Connection : Transport.Connection_Id) return Boolean;
    --  function is_connecting_passive
    --                        (connection : transport.connection_id)
    --                          return Boolean;
    --  function is_connecting_active
    --                        (connection : transport.connection_id)
    --                          return Boolean;
    function Network (Connection : Transport.Connection_Id)
                     return Transport_Defs.Network_Name;
    function Local_Host (Connection : Transport.Connection_Id)
                        return Transport_Defs.Host_Id;
    function Local_Socket (Connection : Transport.Connection_Id)
                          return Transport_Defs.Socket_Id;
    function Remote_Host (Connection : Transport.Connection_Id)
                         return Transport_Defs.Host_Id;
    function Remote_Socket (Connection : Transport.Connection_Id)
                           return Transport_Defs.Socket_Id;


    procedure Transmit (Connection : Transport.Connection_Id;
                        Status : out Transport_Defs.Status_Code;
                        Data : Byte_Defs.Byte_String;
                        Count : out Natural;
                        Max_Wait : Duration := Duration'Last;
                        More : Boolean := False);

    -- Transmit some data.  The CONNECTION must be connected.
    -- STATUS is returned OK, unless the connection is broken.
    -- DATA is the data to be transmitted.  COUNT is returned the
    -- number of bytes actually transmitted.  This may differ
    -- from DATA'LENGTH if the connection breaks, or if the
    -- operation times out.

    -- MAX_WAIT is the maximum amount of time to spend trying to
    -- transmit the data.  The operation completes when all the
    -- DATA bytes have been transmitted, or when MAX_WAIT
    -- expires, whichever comes first.

    -- MORE indicates that the service may hold the data in its
    -- local buffers, to be combined with more data which the
    -- client is about to transmit.  This is a performance hint
    -- only: the service is free to ignore it and transmit all
    -- data as soon as it gets it.

    -- This operation may simply store data in a local buffer,
    -- and actually transmit it at some future opportunity.  If
    -- buffering is involved, the service assumes responsibility
    -- for transmitting the buffered data.


    procedure Receive (Connection : Transport.Connection_Id;
                       Status : out Transport_Defs.Status_Code;
                       Data : out Byte_Defs.Byte_String;
                       Count : out Natural;
                       Max_Wait : Duration := Duration'Last);

    -- Receive some data.  The CONNECTION must be connected.
    -- STATUS is returned OK, unless the connection is broken.
    -- DATA is the buffer into which to store received data.
    -- COUNT is returned the number of bytes actually stored.
    -- This may be less than DATA'LENGTH.

    -- MAX_WAIT is the maximum amount of time to spend waiting
    -- to receive some data.  The operation completes when one
    -- or more DATA bytes have been received, or when MAX_WAIT
    -- expires, whichever comes first.

    -- This procedure does not wait to fill up the DATA buffer.
    -- As soon as ANY data are received, it returns them.


    function Hash (Connection : Transport.Connection_Id) return Natural;
    -- Calculate a value suitable for hashing.


    -- Each connection is owned by some job.
    -- By default, a connection is owned by the job which opens it.
    -- Whenever a job terminates, all connections owned by it are
    -- automatically closed.


    function Is_Connecting_Passive
                (Connection : Transport.Connection_Id) return Boolean;
    function Is_Connecting_Active
                (Connection : Transport.Connection_Id) return Boolean;


    -- The following 3 operations were invented to support AX25.
    -- Set_ and Get_Options allow the user to select values of
    -- various protocol parameters (for example, packet size,
    -- window size, timeouts).  Get_Statistics allows the user
    -- to monitor the operation of the protocol.

    -- For AX25, the Context string is the 'image (ASCII decimal)
    -- of the port number of a port used for AX25 communication.

    function Set_Options (Network : Transport_Defs.Network_Name;
                          Context : String := "";
                          Options : String := "") -- new option values
                         return String;
    -- The Options string is a sequence of option name/value
    -- pairs, using the option parser syntax "<name>=<value>,...".
    -- The return value is "" if the operation succeeded.
    -- A non-null value is an error message, which may contain
    -- ASCII.LF's to indicate line breaks.

    function Get_Options (Network : Transport_Defs.Network_Name;
                          Context : String := "")
                         return String; -- all option values
    -- The return value is a list of all current options
    -- and their current values, in the same syntax as
    -- Set_Options.Options.  A null value indicates that
    -- the Network/Context pair is not defined or has no
    -- options.

    function Get_Statistics
                (Network : Transport_Defs.Network_Name; Context : String := "")
                return String;
    -- The return value is a list of all current statistics and
    -- their values, in a syntax similar to Set_Options.Options.
    -- A null value indicates that the Network/Context pair is
    -- not defined or has no statistics.

    package Route is
        -- A table of 4-tuples, used for Transport level routing.
        -- See package Transport_Route for background information.

        procedure Define (Network : Transport_Defs.Network_Name;
                          Destination : Transport_Defs.Host_Id;
                          Subnet_Mask : Transport_Defs.Host_Id;
                          Route : Transport_Defs.Host_Id;
                          Status : out Transport_Defs.Status_Code);

        procedure Undefine (Network : Transport_Defs.Network_Name;
                            Destination : Transport_Defs.Host_Id;
                            Subnet_Mask : Transport_Defs.Host_Id;
                            Route : Transport_Defs.Host_Id;
                            Status : out Transport_Defs.Status_Code);

        type Iterator is private;
        procedure Init (Iter : out Iterator);
        procedure Next (Iter : in out Iterator);
        function Done (Iter : Iterator) return Boolean;
        function Network (Iter : Iterator) return Transport_Defs.Network_Name;
        function Destination (Iter : Iterator) return Transport_Defs.Host_Id;
        function Subnet_Mask (Iter : Iterator) return Transport_Defs.Host_Id;
        function Route (Iter : Iterator) return Transport_Defs.Host_Id;

    private
        type Iterator is new Natural;

    end Route;

private
    type Connection_Id is new Natural;
    Null_Connection_Id : constant Connection_Id := 0;
    type Network_Name_Iterator is new Natural;
    type Connection_Id_Iterator is new Natural;
end Transport;

E3 Meta Data

    nblk1=b
    nid=0
    hdr6=16
        [0x00] rec0=20 rec1=00 rec2=01 rec3=006
        [0x01] rec0=16 rec1=00 rec2=02 rec3=016
        [0x02] rec0=1c rec1=00 rec2=03 rec3=012
        [0x03] rec0=10 rec1=00 rec2=04 rec3=05e
        [0x04] rec0=15 rec1=00 rec2=05 rec3=034
        [0x05] rec0=16 rec1=00 rec2=06 rec3=028
        [0x06] rec0=19 rec1=00 rec2=07 rec3=03c
        [0x07] rec0=14 rec1=00 rec2=08 rec3=06a
        [0x08] rec0=16 rec1=00 rec2=09 rec3=050
        [0x09] rec0=13 rec1=00 rec2=0a rec3=04a
        [0x0a] rec0=0f rec1=00 rec2=0b rec3=001
    tail 0x2170c1d2a822f63d2fb5f 0x42a00088462060003