8.3.1-8.3.2 类型、常量与接口定义
8.3.1 类型与常量定义
const
ZERO = 0;
max_user_data = 64512;
type
NSAP_addr_type = ...;
{ NSAP_addr_type 定义经网络服务边界传递的 NSAP 地址的数据类型。 }
NPAI_addr_type = ...;
{ NPAI_addr_type 定义 PDU 中携带的地址的数据类型。 }
SN_addr_type = ...;
{ SN_addr_type 定义本协议所使用的底层服务中地址的数据类型。 }
quality_of_service_type = ...;
{ Quality_of_service_type 定义经网络服务边界传递的 QOS 参数的数据类型。 }
SN_QOS_type = ...;
{ SN_QOS_type 定义传递给本协议所使用的底层服务的 QOS 参数(如有)的数据类型。 }
data_type = ...;
{ Data_type 定义用户数据的数据类型。从概念上讲,它等价于一个可变长度的二进制串。 }
buffer_type = ...;
{ Buffer_type 定义发送和接收用户数据时所用内存资源的数据类型。它提供分段和重组所需的能力。 }
timer_name_type = (lifetime_timer);
timer_data_type = ...;
network_layer_protocol_id_type = (ISO_8473_protocol_id);
version_id_type = (version1);
pdu_tp_type = (DT, ER);
options_type = ...;
{ Options_type 定义用于存放 PDU 头部选项部分的数据类型。 }
subnet_id_type = ...;
{ subnet_id_type 定义用于在本地标识本协议所使用的某个特定底层服务的数据类型。
通常可能存在多个底层子网(或数据链路)服务。 }
error_type = (NO_ERROR,
TOO_MUCH_USER_DATA,
PROTOCOL_PROCEDURE_ERROR,
INCORRECT_CHECKSUM, CONGESTION,
SYNTAX_ERROR,
SEG_NEEDED_AND_NOT_PERMITTED,
DESTINATION_UNREACHABLE,
DESTINATION_UNKNOWN,
UNSPECIFIED_SRC_ROUTING_ERROR,
SYNTAX_ERROR_IN_SRC_ROUTING,
UNKNOWN_ADDRESS_IN_SRC_ROUTING,
PATH_NOT_ACCEPTABLE_IN_SRC_ROUTING,
LIFETIME_EXPIRED_IN_TRANSIT,
LIFETIME_EXPIRED_IN_REASSEMBLY,
UNSUPPORTED_OPTION_NOT_SPECIFIED,
UNSUPPORTED_PADDING_OPTION,
UNSUPPORTED_SECURITY_OPTION,
UNSUPPORTED_SRC_ROUTING_OPTION,
UNSUPPORTED_RECORDING_OF_ROUTE_OPTION,
UNSUPPORTED_QOS_MAINTENANCE_OPTION);
nsdu_type = record
da : NSAP_addr_type;
sa : NSAP_addr_type;
qos : quality_of_service_type;
data : data_type;
end;
pdu_type = record
nlp_id : network_layer_protocol_id_type;
hli : integer;
vp_id : version_id_type; lifetime : integer;
sp : boolean;
ms : boolean;
er_flag : boolean;
pdu_tp : pdu_tp_type;
seg_len : integer;
checksum : integer;
da_len : integer;
da : NPAI_addr_type;
sa_len : integer;
sa : NPAI_addr_type;
du_id : optional integer;
so : optional integer;
tot_len : optional integer;
{ du_id、so 和 tot_len 仅在 sp 的值为 TRUE 时才存在。 }
options : options_type;
data : data_type;
end;
route_result_type =
record
subnet_id : subnet_id_type;
sn_da : SN_addr_type;
sn_sa : SN_addr_type;
segment_size : integer;
end;
8.3.2 接口定义
channel Network_access_point (User, Provider);
by User:
UNITDATA_request
(NS_Destination_address : NSAP_addr_type;
NS_Source_address : NSAP_addr_type;
NS_Quality_of_Service : quality_of_service_type;
NS_Userdata : data_type);
by Provider:
UNITDATA_indication
(NS_Destination_address : NSAP_addr_type;
NS_Source_address : NSAP_addr_type;
NS_Quality_of_Service : quality_of_service_type;
NS_Userdata : data_type);
channel Subnetwork_access_point (User, Provider);
by User:
UNITDATA_request
(SN_Destination_address : SN_addr_type;
SN_Source_address : SN_addr_type;
SN_Quality_of_Service : SN_QOS_type;
SN_Userdata : pdu_type);
by Provider:
UNITDATA_indication
(SN_Destination_address : SN_addr_type;
SN_Source_address : SN_addr_type;
SN_Quality_of_Service : SN_QOS_type;
SN_Userdata : pdu_type);
channel System_access_point (User, Provider);
by User:
TIMER_request
(Time : integer;
Name : timer_name_type;
Subscript : integer);
TIMER_cancel
(Name : timer_name_type;
Subscript : integer);
by Provider:
TIMER_indication
(Name : timer_name_type;
Subscript : integer);