Skip to main content

8.3.3 Formal Machine Definition (Primitives, Part 2)

   function get_NPAI
        (addr : NSAP_addr_type) : NPAI_addr_type;
   primitive;

    { This function returns the network address as used in the protocol
    header, or "Network Protocol Addressing Information", corresponding
    to the specified NSAP address. }

   function get_NPAI_len
        (addr : NSAP_addr_type) : integer;
   primitive;

    { This function returns the length of the network address
    corresponding to a specified NSAP address. }

   function get_NSAP_addr
        (addr : NPAI_addr_type;
         len  : integer) : NSAP_addr_type;
   primitive;

    { This function returns the NSAP address corresponding to the
    network protocol addressing information (as it appears in the
    protocol header) of the specified length. }

   function get_options
        (da  : NSAP_addr_type;
         qos : quality_of_service_type) : options_type;
   primitive;

    { This function returns the options field for a PDU, based on the
    requested destination address and quality of service. }

   function get_seg_permitted
        (da : NSAP_addr_type;
         qos : quality_of_service_type) : boolean;
   primitive;

    { This function returns the boolean value to be used in the
    segmentation permitted field of a PDU.  This value may depend upon
    the destination address, requested quality of service, and the
    length of the user data. }

   function get_sn_qos
        (subnet_id : subnet_id_type;

          options   : options_type) : SN_QOS_type;
   primitive;

    { This function returns the quality of service to be used on the
    specified subnetwork, in order to obtain the quality of service (if
    any) and other parameters requested in the options part of the PDU.
    }

   function get_qos
        (options : options_type) : quality_of_service_type;
   primitive;

    { This function determines, to the extent possible, the quality of
    service that was obtained for a particular PDU, based upon the
    quality of service and other information contained in the options
    part of the PDU header. }

   function make_buffer
        (data : data_type) : buffer_type;
   primitive;

    { This function places the specified data in a newly created buffer.
    The precise manner of handling buffers is implementation specific.
    This newly created buffer is returned as the function value. }

   procedure merge_seg
        (buf   : buffer_type;
         so    : integer;
         data  : data_type);
   primitive;

    { This procedure merges the specified data into the specified
    buffer, based on the specified segment offset of the data. }

   function NPAI_addr_local
        (addr : NPAI_addr_type) : boolean;
   primitive;

    { This function returns the boolean value TRUE only if the specified
    network protocol addressing information specifies a local address. }

   function NSAP_addr_local
        (addr : NSAP_addr_type) : boolean;
   primitive;

    { This function returns the boolean value TRUE only if the specified
    NSAP address specifies a local address. }

   procedure post_error_report
        (er_pdu : pdu_type);
   primitive;

    { This procedure posts the specified error report (ER) type PDU to
    the appropriate local entity that handles error reports. }

   function route
        (hli     : integer;
         sp      : boolean;
         da      : NPAI_addr_type;
         options : options_type;
         datalen : integer) : route_result_type;
   primitive;

    { This function determines the route to be followed by a PDU
    segment, as well as the segment size.  Note that in general, the
    segment size and route may be mutually dependent.  This
    determination is made on the basis of the header length, the
    segmentation permitted flag, the destination address, several
    parameters (such as source routing) contained in the options part of
    the PDU header, and the length of data.  This function returns a
    structure that specifies the subnetwork on which the segment should
    be transmitted, the source and destination addresses to be used on
    the subnetwork, and the segment size.  This routine may only be
    called if the primitive function check_parameters has already
    determined that an error will not occur. }

   function send_er_on_congestion
       (pdu : pdu_type) : boolean;
   primitive;

    { This function returns the boolean value true if an error report
    should be sent when the indicated data unit is discarded due to
    congestion.  Note that if the value true is returned, then the
    er_flag field of the discarded data unit must still be checked
    before an error report can be sent. }

   function size
       (data : data_type) : integer;
   primitive;

    { This function returns the length, in octets, of the specified
    data. }

   function size_buf
       (buf : buffer_type) : integer;
   primitive;

    { This function returns the length, in octets, of the data contained
    in the specified buffer. }

   initialize

    begin
        state to INITIAL;
    end;