
{ NOTE:
{   The pdu types are in logical order i.e. an nlt$tm_negotiate_protocol_req
{   is received then a nlt$tm_negotiate_protocol_res is sent.

  CONST
    nlc$tm_outgoing_pdu_base = 1800(16), { Host to the device.
    nlc$tm_incoming_pdu_base = 1880(16), { Device to the host.

{ Outgoing PDU kinds.

    nlc$tm_negotiate_protocol_res = nlc$tm_outgoing_pdu_base + 0,
    nlc$tm_device_config_confirm = nlc$tm_outgoing_pdu_base + 1,
    nlc$tm_enable_host_routing_req = nlc$tm_outgoing_pdu_base + 2,
    nlc$tm_address_accessible_req = nlc$tm_outgoing_pdu_base + 3,
    nlc$tm_release_request = nlc$tm_outgoing_pdu_base + 4,

{ Incoming PDU kinds.

    nlc$tm_negotiate_protocol_req = nlc$tm_incoming_pdu_base + 0,
    nlc$tm_device_config_request = nlc$tm_incoming_pdu_base + 1,
    nlc$tm_address_accessible_res = nlc$tm_incoming_pdu_base + 2,
    nlc$tm_subnet_available_ind = nlc$tm_incoming_pdu_base + 3,
    nlc$tm_subnet_unavailable_ind = nlc$tm_incoming_pdu_base + 4,
    nlc$tm_route_unavailable_ind = nlc$tm_incoming_pdu_base + 5,
    nlc$tm_release_indication = nlc$tm_incoming_pdu_base + 6;

  TYPE

    nlt$tm_pdu_kind = 0 .. 0ffff(16),

    nlt$tm_pdu_header = record
      length: 0 .. 0ffff(16),
      kind: nlt$tm_pdu_kind,
    recend,

    nlt$tm_negotiate_protocol_req = record
      header: nlt$tm_pdu_header,
      version: nlt$tm_version,
    recend,

    nlt$tm_negotiate_protocol_res = record
      header: nlt$tm_pdu_header,
      version: nlt$tm_version,
    recend,

    nlt$tm_device_config_request = record
      host_internet_address: nlt$tcpip_address,
      udp_access_enabled: boolean,
      tcp_access_enabled: boolean,
    recend,

    nlt$tm_device_config_confirm = record
      header: nlt$tm_pdu_header,
    recend,

    nlt$tm_enable_host_routing_req = record
      header: nlt$tm_pdu_header,
    recend,

    nlt$tm_address_accessible_req = record
      header: nlt$tm_pdu_header,
      request_id: nlt$tm_request_identifier,
      internet_address: nlt$tcpip_address,
    recend,

    nlt$tm_address_accessible_res = record
      request_id: nlt$tm_request_identifier,
      route_cost: 0 .. 0ffffffff(16),
      route_status: nlt$tm_route_status,
    recend,

    nlt$tm_subnet_available_ind = record
      internet_address: nlt$tcpip_address,
      subnet_mask: nlt$tm_mask,
      route_cost: 0 .. 0ffffffff(16),
      subnet_id: nlt$tm_subnet_identifier,
    recend,

    nlt$tm_subnet_unavailable_ind = record
      subnet_id: nlt$tm_subnet_identifier,
    recend,

    nlt$tm_route_unavailable_ind = record
      internet_address: nlt$tcpip_address,
      reason_code: nlt$tm_route_unavail_reason,
    recend,

    nlt$tm_release_request = record
      header: nlt$tm_pdu_header,
      reason: nlt$tm_release_reason,
    recend,

    nlt$tm_release_indication = record
      header: nlt$tm_pdu_header,
      reason: nlt$tm_release_reason,
    recend;

*copyc nlt$tcpip_address
*copyc nlt$tm_mask
*copyc nlt$tm_release_reason
*copyc nlt$tm_request_identifier
*copyc nlt$tm_route_status
*copyc nlt$tm_route_unavail_reason
*copyc nlt$tm_subnet_identifier
*copyc nlt$tm_version
