{ NLT$CC_CONNECTION }

TYPE
  nlt$cc_connection_state = (nlc$cc_closed, nlc$cc_connect_confirm_wait,
    nlc$cc_connect_response_wait, nlc$cc_open, nlc$cc_closing),

  nlt$cc_connection = record
    accumulated_message_buffers: integer,
    event_processor: nat$network_procedure,
    connection_id: nlt$cl_connection_id,
    peer_reference_number: nlt$cl_reference_number,
    class: nlt$cc_connection_class,
    device_specific_attributes: nlt$cc_device_specific_attr,
    buffers_per_credit: nlt$bm_buffer_count,
    next_deliverable_sequence#: nlt$cc_sequence_number,
    receive_buffer: ^nlt$cc_received_pdu,
    receive_credits: nlt$cc_credits,
    send_credits: nlt$cc_credits,
    send_buffer: nlt$cc_send_buffer,
    sub_connection_count: 0 .. 0ff(16),
    sub_connections: ^array [1 .. *] of nlt$cc_device_specific_attr,
    no_buffers_for_peer_credit: nlt$timer,
    no_buffers_for_user_capacity: nlt$timer,
  recend,

  nlt$cc_device_specific_attr = record
    device_id: nlt$device_identifier,
    maximum_data_length: nlt$cc_pdu_size,
    state: nlt$cc_connection_state,
  recend,

  nlt$cc_received_pdu = record
    next_cc_pdu: ^nlt$cc_received_pdu,
    device_id: nlt$device_identifier,
    sequence_number: nlt$cc_sequence_number,
    cc_header: nlt$cc_protocol_header,
    data: nlt$bm_message_id,
  recend,

  nlt$cc_send_buffer = record
    inn: nlt$cc_send_buffer_limit,
    out: nlt$cc_send_buffer_limit,
    cc_pdu: array [0 .. (nlc$cc_send_buffer_limit - 1)] of nlt$cc_outgoing_pdu,
    extension: ^nlt$cc_send_buffer_extension,
  recend,

  nlt$cc_send_buffer_extension = record
    nextt: ^nlt$cc_send_buffer_extension,
    cc_pdu: nlt$cc_outgoing_pdu,
  recend,

  nlt$cc_outgoing_pdu = record
    data: nlt$bm_message_id,
  recend,

  nlt$cc_send_buffer_limit = 0 .. nlc$cc_send_buffer_limit;

CONST
  nlc$cc_send_buffer_limit = 8,
  nlc$lower_layer_overhead = 24; {Max TAA, TCPAA, UDPAA PDU header size.

*copyc nat$network_procedure
*copyc nlt$bm_buffer_count
*copyc nlt$bm_message_id
*copyc nlt$cc_connection_class
*copyc nlt$cc_credits
*copyc nlt$cc_pdu_size
*copyc nlt$cc_protocol_data_unit
*copyc nlt$cc_sequence_number
*copyc nlt$cl_connection
*copyc nlt$device_identifier
*copyc nlt$timer
