|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T V ┃
Length: 5254 (0x1486) Types: TextFile Names: »V«
└─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS └─ ⟦91c658230⟧ »DATA« └─⟦458657fb6⟧ └─⟦a5bbbb819⟧ └─⟦this⟧ └─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3 └─ ⟦fc9b38f02⟧ »DATA« └─⟦9b46a407a⟧ └─⟦eec0a994f⟧ └─⟦this⟧
with Byte_Defs; with Transport; with Transport_Defs; package Telnet_Protocol is pragma Subsystem (Network); pragma Module_Name (4, 2506); type Connection_Id is private; pragma Consume_Offset (5); procedure Open (Connection : out Connection_Id; Remote : Transport.Connection_Id); -- Allocate Telnet resources (including space to store -- option values), and bind them to the given Remote. -- Initially, all options for both owners are disabled. -- Does not affect the Transport connection. procedure Close (Connection : Connection_Id); -- Release Telnet resources. -- Closes the Transport connection. function Remote (Connection : Connection_Id) return Transport.Connection_Id; -- Return the ID of the associated Transport connection. function Image (Connection : Connection_Id) return String; -- Return a unique name for a connection. ---- OPTION NEGOTIATION ---- type Option is (Transmit_Binary, Echo, Suppress_Go_Ahead); type Owner is (Local, Remote); type Desired_Option_States is (On, Off, Dont_Care); subtype Current_Option_States is Desired_Option_States range On .. Off; procedure Offer (Connection : Connection_Id; For_Option : Option; For_Owner : Owner; To_State : Desired_Option_States := Off); -- Initiate negotiation of an option value. -- To_State indicates the desired option value. procedure Request (Connection : Connection_Id; For_Option : Option; For_Owner : Owner; To_State : Desired_Option_States := Off; Success : out Boolean; Max_Wait : Duration := Duration'Last); -- Initiate negotiation of an option value. -- To_State indicates the desired option value. -- Wait until the remote Telnet implementation either -- accepts or rejects the option, or Max_Wait expires. -- If the option is accepted, return Success = True, -- otherwise return Success = False. function State_Of (Connection : Connection_Id; For_Option : Option; For_Owner : Owner) return Current_Option_States; -- Return the current state of the option. ---- DATA I/O ---- type Signal_Type is (None, New_Line, Synch, Break, Interrupt_Process, Abort_Output, Are_You_There, Erase_Character, Erase_Line, Go_Ahead); procedure Transmit (Connection : Connection_Id; Status : out Transport_Defs.Status_Code; Data : Byte_Defs.Byte_String; Count : out Natural; Signal : Telnet_Protocol.Signal_Type := None; Max_Wait : Duration := Duration'Last); procedure Transmit (Connection : Connection_Id; Status : out Transport_Defs.Status_Code; Data : String; Count : out Natural; Signal : Telnet_Protocol.Signal_Type := None; Max_Wait : Duration := Duration'Last); procedure Transmit (Connection : Connection_Id; Status : out Transport_Defs.Status_Code; Signal : Telnet_Protocol.Signal_Type; Max_Wait : Duration := Duration'Last); -- Transmit the given Data, followed by the given Signal. -- Stuff NUL's after CR's, and double 255's. -- Shave off high-order bits if not transmitting binary. procedure Receive (Connection : Connection_Id; Status : out Transport_Defs.Status_Code; Data : out Byte_Defs.Byte_String; Count : out Natural; Signal : out Telnet_Protocol.Signal_Type; Max_Wait : Duration := Duration'Last); procedure Receive (Connection : Connection_Id; Status : out Transport_Defs.Status_Code; Data : out String; Count : out Natural; Signal : out Telnet_Protocol.Signal_Type; Max_Wait : Duration := Duration'Last); -- Receive some information. Stop when either -- (1) a non-OK Status is received, or -- (2) a non-None Signal is received, or -- (3) some Data are received, or -- (4) Max_Wait expires. -- Return the number of Data bytes received in Count. -- Strip NUL's after CR's, and un-double 255's. -- Echo data if the Echo option is enabled. -- Receive will not return both data (Count > 0) -- and a signal (Signal /= None) in the same call. -- NOTE: only one Receive can be made at a time and -- that at one Receive must be pending for forward -- progress. ---- EXCEPTIONS ---- Not_Connected : exception; Receive_Data_Error : exception; pragma Consume_Offset (4); procedure Caller_Will_Take_Responsibility_For_Echo (Connection : Connection_Id; Caller_Will_Take_Responsibility : Boolean := True); end Telnet_Protocol;