
 CONST
    nlc$sl_successful = 0,
    nlc$sl_failed = 1,
    nlc$sl_variable_locked = 2,
    nlc$sl_call_type = 0,
    nlc$sl_call_ok_type = 1,
    nlc$sl_clear_type = 2,
    nlc$sl_data_type = 3,
    nlc$sl_synch_request_type = 4,
    nlc$sl_mark_type = 5,
    nlc$sl_interrupt_type = 6,
    nlc$sl_max_accounting_length = 0ffff(16),
    nlc$sl_max_blocksize = osc$max_segment_length,
    nlc$sl_max_call_message = 512,
    nlc$sl_max_clear_message = 512,
    nlc$sl_max_clear_wait = 0ffff(16),
    nlc$sl_max_interrupt_message = 14,
    nlc$sl_max_interrupt_size = 14,
    nlc$sl_max_sap_value = 0ffff(16),
    nlc$sl_max_synch_message = 14,
    nlc$sl_max_unique_value = 03fffffff(16),
    nlc$sl_max_validation_length = 0ffff(16),
    nlc$sl_min_accounting_length = 0,
    nlc$sl_min_interrupt_message = 1,
    nlc$sl_min_synch_message = 1,
    nlc$sl_min_validation_length = 0,
    nlc$sl_version_no = 1,
    nlc$sl_unexpected_disconnect = 0,
    nlc$sl_max_connection_value = 0ffff(16),
    nlc$sl_title =  'SESSION LAYER SERVER';

  TYPE

    nlt$sl_clear_reason = (nlc$sl_user_clear, nlc$sl_layer_clear),

    nlt$sl_connection_descriptor = record
      lock: ALIGNED [0 MOD 8] integer,
      connection_id: ALIGNED [0 MOD 8] nlt$sl_connection_id,
      user_connection_id: nat$user_connection_id,
      transport_connection_id: nlt$gt_connection_id,
      transport_user_connection_id: nlt$user_connection_id,
      current_state: nlt$sl_machine_state,
      receive_sequence_active: boolean,
      qbit_receive_sequence: boolean,
      send_sequence_active: boolean,
      qbit_send_sequence: boolean,
      source: nat$gt_address,
      mark_count: integer,
      call_pdu_message_id: nlt$bm_message_id,
      clear_timer_task_id: pmt$task_id,
      valid_clear_timer: boolean,
      complete_data_pdu: boolean,
      sap_id: nlt$sl_sap_id,
      transport_end_of_message: boolean,
      event_processor: nlt$sl_event_processor,
    recend,

    nlt$sl_connection_id = nlt$sl_validation_key,

    nlt$sl_discard_options = (nlc$sl_discard_send_receive, nlc$sl_discard_send,
      nlc$sl_discard_receive),

    nlt$sl_max_offset = 0 .. osc$maximum_offset,

    nlt$sl_machine_state = (nlc$sl_closed, nlc$sl_connect_confirm_wait,
      nlc$sl_call_wait, nlc$sl_call_ok_wait, nlc$sl_call_response_wait,
      nlc$sl_data_transfer, nlc$sl_m_r_fr_wait, nlc$sl_fwd_mark_wait,
      nlc$sl_synch_response_wait, nlc$sl_rev_mark_wait,
      nlc$sl_synch_collision_fr, nlc$sl_disconnect_wait),

    nlt$sl_pdu_types = 0 .. 0f(16),

    nlt$sl_pdu_header = packed record
      version_no: 0 .. 0f(16),
      case pdu_type: nlt$sl_pdu_types of
      = nlc$sl_data_type =
        data_six_bit_fill: 0 .. 03f(16),
        qualified_data: boolean,
        more_data: boolean,
      = nlc$sl_synch_request_type =
        synch_six_bit_fill: 0 .. 03f(16),
        discard_option: nlt$sl_discard_options,
      = nlc$sl_call_type, nlc$sl_call_ok_type, nlc$sl_clear_type,
        nlc$sl_mark_type, nlc$sl_interrupt_type =
        one_byte_fill: 0 .. 0ff(16),
      casend,
    recend,

    nlt$sl_sap_descriptor = record
      lock: ALIGNED [0 MOD 8] integer,
      sap_id: ALIGNED [0 MOD 8] nlt$sl_sap_id,
      user_sap_id: nlt$user_sap_id,
      transport_sap_id: nlt$gt_sap_id,
      transport_user_sap_id: nlt$user_sap_id,
      event_processor: nlt$sl_event_processor,
    recend,

    nlt$sl_sap_id = nlt$sl_validation_key,

    nlt$sl_sap_list = record
      lock: ost$signature_lock,
      first_sap: ^nlt$sl_sap_descriptor,
      sap_count: nlt$sl_sap_value,
    recend,

    nlt$sl_sap_value = 0 .. nlc$sl_max_sap_value,

    nlt$sl_unique_value = 0 .. nlc$sl_max_unique_value,

    nlt$sl_validation_key = packed record
      identifier: nat$validation_identifier,
      unique_value: nlt$sl_unique_value,
      locked: boolean,
      offset: nlt$sl_max_offset,
    recend,

    nlt$sl_version_number = 0 .. 0ff(16);

?? PUSH (LISTEXT := ON) ??
*copyc osd$virtual_address
*copyc nlt$user_interface
*copyc nlt$ta_event
*copyc nlt$sl_event
*copyc nlt$bm_message_id
*copyc ost$signature_lock
*copyc ost$global_task_id
*copyc pmt$task_id
?? POP ??

