8.3.3 Formal Machine Definition (Primitives, Part 1)
procedure allocate_reassembly_resources
(pdu_tot_len : integer);
primitive;
{ This procedure allocates resources required for reassembly of a
PDU of the specified total length. If this requires discarding of a
PDU in which the ER flag is set, then an error report is returned to
the source of the discarded data unit. }
function check_parameters
(hli : integer;
sp : boolean;
da : NPAI_addr_type;
options : options_type;
datalen : integer) : error_type;
primitive;
{ This function examines various parameters associated with a PDU,
to determine whether forwarding of the PDU can continue. If a
result of NO_ERROR is returned, then the primitive route can be
called to specify the route and segment size. Otherwise this
function specifies the reason that an error has occurred. }
function data_unit_complete
(buf : buffer_type) : boolean;
primitive;
{ This function returns a boolean value specifying whether the PDU
stored in the specified buffer has been completely received. }
function elapsed_time : integer;
primitive;
{ This function returns an estimate of the time elapsed, in 500
microsecond increments, since the PDU was transmitted by the
previous peer network entity. This estimate includes both time
spent in transit, and any time to be spent in buffers within the
local system. Although this estimate need not be precise,
overestimates are preferable to underestimates, as underestimating
the time elapsed may defeat the intent of the lifetime function. }
procedure empty_buffer
(buf : buffer_type);
primitive;
{ This procedure empties the specified buffer. }
function extract
(buf : buffer_type;
amount : integer) : data_type;
primitive;
{ This function removes the specified amount of data from
the specified buffer, and returns this data as the function
value. }
procedure free_reassembly_resources;
primitive;
{ This procedure releases the resources that had been previously
allocated by the procedure allocate_reassembly_resources. }
function get_checksum
(pdu : pdu_type) : integer;
primitive;
{ This function returns the 16 bit integer value to be placed in the
checksum field of the PDU. If the checksum facility is not being
used, then this function returns the value zero. The algorithm for
producing a correct checksum value is specified in Annex A. }
function get_data_unit_id
(da : NPAI_addr_type) : integer;
primitive;
{ This function returns a data unit identifier which is unique for
the specified destination address. }
function get_er_data_field
(error : error_type;
pdu : pdu_type) : data_type;
primitive;
{ This function returns the correct data field for an error report,
based on the information that the specified PDU is being discarded
due to the specified error. The data field of an error report must
include the header of the discarded PDU, and may optionally contain
additional user data. }
function get_er_flag
(nsdu : nsdu_type) : boolean;
primitive;
{ This function returns a boolean value to be used as the error
report flag in a PDU which transmits the specified nsdu. If the PDU
must be discarded at some future time, an error report can be
returned only if this value is set to TRUE. }
function get_er_lifetime
(da : NPAI_addr_type) : integer;
primitive;
{ This function returns the lifetime value to be used for an error
report being sent to the specified destination address. }
function get_er_options
(error : error_type;
da : NPAI_addr_type;
options : options_type) : options_type;
primitive;
{ This function returns the options field of an error report, based
on the reason for discard, and the destination address and options
field of the discarded PDU. The options field contains the reason
for discard option, and may contain other optional fields. }
function get_er_seg_per
(pdu : pdu_type) : boolean;
primitive;
{ This function returns the boolean value which will be used for the
segmentation permitted flag of an error report. }
function get_header_len
(da_len : integer;
sa_len : integer;
sp : boolean;
options : options_type) : integer;
primitive;
{ This function returns the header length, in octets. This depends
upon the lengths of the source and destination addresses, whether
the segmentation part of the header is present, and the length of
the options part. }
function get_lifetime
(da : NSAP_addr_type;
qos : quality_of_service_type) : lifetime_type;
primitive;
{ This function returns the lifetime value to be used for a PDU,
based upon the destination address and requested quality of service.
}
function get_local_NPAI_addr : NPAI_addr_type;
primitive;
{ This functions returns the local address as used in the protocol
header. }
function get_local_NPAI_addr_len : integer;
primitive;
{ This functions returns the length of the local address as used in
the protocol header. }