| NPI Technical SpecificationDescription: OpenSS7 Project Library Transport NPIA PDF version of this document is available here. Network Link Provider InterfaceNetwork Provider Interface SpecificationAbout This ManualThis is Edition 7.20141001, last updated 2014-10-25, of The Network Provider Interface Specification, for Version 1.1 release 7.20141001 of the OpenSS7 package. 1 IntroductionThis document specifies a STREAMS-based kernel-level instantiation of the ISO/CCITT network service definition. The Network Provider Interface (NPI) enables the user of a network layer service to access and use any of a variety of conforming network layer service providers without specific knowledge of the provider’s protocol. The service interface is designed to support any connection-mode network protocol and connectionless network protocol. This interface only specifies access to network layer service providers, and does not address issues concerning network layer management,protocol performance, and performance analysis tools. The specification assumes that the reader is familiar with the OSI reference model terminology, ISO/CCITT Network Layer Service, and STREAMS. 1.1 Related Documentation
1.1.1 RoleThis document specifies an interface that supports the service provided by the Network Services Definition for Open Systems Interconnection for CCITT Applications as described in CCITT Recommendation X.213 (see X.213) and ISO 8348 (for CONS) (see ISO8348) and ISO8348/Addendum 1 (for CLNS) (see ISO8348/AD1). These specifications are targeted for use by) and ISO 8348 (for CONS) (see ISO8348) and ISO8348/Addendum 1 (for CLNS) (see ISO8348/AD1). These specifications are targeted for use by developers and testers of protocol modules that require network layer service. 1.2 Definitions, Acronyms, and Abbreviations
2 The Network LayerThe Network Layer provides the means to manage the operation of the network. It is responsible for the routing and management of data exchange between network-user entities. 2.1 Model of the NPIThe NPI defines the services provided by the network layer to the network-user at the boundary between the network layer and the network layer user entity. The interface consists of a set of primitives defined as STREAMS messages that provide access to the network layer services, and are transferred between the NS user entity and the NS provider. These primitives are of two types; ones that originate from the NS user, and others that originate from the NS provider. The primitives that originate from the NS user make requests to the NS provider, or respond to an event of the NS provider. The primitives that originate from the NS provider are either confirmations of a request or are indications to the NS user that the event has occurred. Figure 1 shows the model of the NPI. Figure 1. Model of the NPI
The NPI allows the NS provider to be configured with any NS user
(such as the OSI Transport Layer) that also conforms to the NPI. A network layer user
can also be a user program that conforms to the NPI and accesses the NS
provider via 2.2 NPI ServicesThe features of the NPI are defined in terms of the services provided by the NS provider, and the individual primitives that may flow between the NS user and the NS provider. The services supported by the NPI are based on two distinct modes of communication, connection (CONS) and connectionless (CLNS). In addition, the NPI supports services for local management. 2.2.1 CONSThe main features of the connection mode communication are:
There are three phases to each instance of communication: Connection Establishment, Data Transfer; and Connection Termination. Units of data arrive at their destination in the same order as they departed their source and the data is protected against duplication or loss of data units within some specified quality of service. 2.2.2 CLNSThe main features of the connectionless mode communication are:
Connectionless mode communication has no separate phases. Each unit of data is transmitted from source to destination independently, appropriate addressing information is included with each unit of data. As the units of data are transmitted independently from source to destination, there are, in general, no guarantees of proper sequence and completeness of the data Stream. 2.2.3 Local ManagementThe NPI specifications also define a set of local management functions that apply to both CONS and CLNS modes of communication. These services have local significance only. Table 1 and Table 2 summarizes the NPI service primitives by their state and service. Table 1. Service Primitives for Connection Mode Data Transfer
Table 2. Service Primitives for Connectionless Mode Data Transfer
3 NPI Services DefinitionThis section describes the services of the NPI primitives. Time-sequence diagrams that illustrate the sequence of primitives are included.1 3.1 Local Management Services DefinitionThe services defined in this section are outside the scope of the international standards. These services apply to both connection-mode as well as the connection-less modes of communication. They are invoked for the initialization/de-initialization of a Stream connected to the NS provider. They are also used to manage options supported by the NS provider and to report information on the supported parameter values. 3.1.1 Network Information Reporting ServiceThis service provides information on the options supported by the NS provider.
The sequence of primitives for network information management is shown in Figure 2. Figure 2. Sequence of Primitives; Network Information Reporting Service
3.1.2 NS User Bind ServiceThis service allows a network address to be associated with a Stream. It allows the NS user to negotiate the number of connect indications that can remain unacknowledged for that NS user (a connect indication is considered unacknowledged while it is awaiting a corresponding connect response or disconnect request from the NS user). This service also defines a mechanism that allows a Stream (bound to a network address of the NS user) to be reserved to handle incoming calls only. This Stream is referred to as the listener Stream.
The sequence of primitives for NS user bind service is shown in Figure 3. Figure 3. Sequence of Primitives; NS User Bind Service
3.1.3 NS User Unbind ServiceThis service allows the NS user to be unbound from a network address.
The sequence of primitives for NS user unbind service is shown in Figure 4. Figure 4. Sequence of Primitives; NS User Unbind & Receipt Acknowledgement
3.1.4 Receipt Acknowledgement Service
An example showing the sequence of primitives for successful receipt acknowledgement is depicted in Figure 4. 3.1.5 Options Management ServiceThis service allows the NS user to manage the QOS parameter values associated with the NS provider.
Figure 5 shows the sequence of primitives for network options management. Figure 5. Sequence of Primitives; Options Management Service
3.1.6 Error Acknowledgement Service
Figure 6 shows the sequence of primitives for the error management primitive. Figure 6. Sequence of Primitives; Error Acknowledgement Service
3.2 Connection-Mode Network Services DefinitionThis section describes the required network service primitives that define the CONS interface. The queue model for CONS is discussed in more detail in CCITT X.213 (see X.213) section 9.2. The queue model represents the operation of a network connection in the abstract by a pair of queues linking the two network addresses. There is one queue for each direction of information flow. Each queue represents a flow control function in one direction of transfer. The ability of a user to add objects to a queue will be determined by the behaviour of the user removing objects from that queue, and the state of the queue. The pair of queues is considered to be available for each potential NC. Objects that are entered or removed from the queue are either as a result of interactions at the two network addresses, or as the result of NS provider initiatives.
Table 3 shows the ordering relationships among the queue model objects. Table 3. Ordering Relationships Between Queue Model Objects
3.2.1 Connection Establishment PhaseA pair of queues is associated with an NC between two network addresses when the NS provider
receives an 3.2.1.1 User Primitives for Successful Network Connection Establishment
3.2.1.2 Provider Primitives for Successful Network Connection Establishment
The sequence of primitives in a successful NC establishment is defined by the time sequence diagram as shown in Figure 7. The sequence of primitives for the NC response token value determination is shown in Figure 8 (procedures for NC response token value determination are discussed in sections 4.1.3 and 4.1.4.). Figure 7. Sequence of Primitives; Successful NC Establishment
Figure 8. Sequence of Primitives; NC Response Token Value Determination
3.2.2 Data Transfer PhaseFlow control on the NC is done by management of the queue capacity, and by allowing objects of certain types to be inserted to the queues, as shown in Table 4. Table 4. Flow Control Relationships Between Queue Model Objects
3.2.2.1 User Primitives for Data Transfer
3.2.2.2 Provider Primitives for Data Transfer
Figure 9 shows the sequence of primitives for successful normal data transfer. The sequence of
primitives may remain incomplete if a Figure 9. Sequence of Primitives; Data Transfer
The sequence of primitives in a successful confirmation of receipt is defined in the time sequence diagram as shown in Figure 10. Figure 10. Sequence of Primitives; Successful Confirmation of Receipt
The sequence of primitives as shown above may remain incomplete if an Note—The withholding of confirmation of receipt by a NS user can have an effect on the attainable throughput on the NC. The sequence of primitives for expedited data transfer is shown in the time
sequence diagram in Figure 11. This sequence of primitives may remain
incomplete if a Figure 11. Sequence of Primitives; Expedited Data Transfer
3.2.3 Reset Operation PrimitivesThe reset service is used by the NS user to resynchronize the use of the NC, or by the NS provider to report detected loss of unrecoverable data. The reset procedure involves the following interactions:
The complete sequence of primitives depends upon the origin/s of the reset action. The reset service may be:
The
3.2.3.1 User Primitives for Reset Operations
3.2.3.2 Provider Primitives for Reset Operations
The sequence of primitives as shown in
Figure 12, Figure 13, Figure 14 and Figure 15
may remain in complete if a Figure 12. Sequence of Primitives; NS User Invoked Reset
Figure 13. Sequence of Primitives; Simultaneous NS User Invoked Reset
Figure 14. Sequence of Primitives; NS Provider Invoked Reset
Figure 15. Sequence of Primitives; Simultaneous NS User & NS Provider
3.2.4 Connection Termination PhaseThe NC release procedure is initialized by the insertion of a disconnect object
(associated with a The sequence of primitives depends on the origin of the release action. The sequence may be:
3.2.4.1 User Primitives for Connection Termination
3.2.4.2 Provider Primitives for Connection Termination
The sequence of primitives are shown in the time sequence diagrams in Figure 16, Figure 17, Figure 18 and Figure 19. Figure 16. Sequence of Primitives; NS User Invoked Release
Figure 17. Sequence of Primitives; Simultaneous NS User Invoked Release
Figure 18. Sequence of Primitives; NS Provider Invoked Release
Figure 19. Sequence of Primitives; Simultaneous NS User & NS Provider
A NS user may reject an NC establishment attempt by issuing a
Figure 20. Sequence of Primitives; NS User Rejection of an NC
If the NS provider is unable to establish an NC, it indicates this to the
requester by an Figure 21. Sequence of Primitives; NS Provider Rejection of an NC
3.3 Connectionless Network Services DefinitionThe CLNS allows for the transfer of the NS user data in one or both directions simultaneously without establishing a network connection. A set of primitives are defined that carry user data and control information between the NS user and NS provider entities. The primitives are modelled as requests initiated by the NS user and indications initiated by the NS provider. Indications may be initiated by the NS provider independently from requests by the NS user. The connectionless network service consists of one phase. 3.3.1 User Request Primitives
3.3.2 Provider Response Primitives
Figure 22 shows the sequence of primitives for the connectionless mode of data transfer. Figure 22. Sequence of Primitives; Connectionless Data Transfer
Figure 23 shows the sequence of primitives for the CLNS error management primitive. Figure 23. Sequence of Primitives; CLNS Error Indication Service
4 NPI PrimitivesThis section describes the format and parameters of the NPI primitives (Mapping NPI to ISO 8348 and CCITT X.213, shows the mapping of the NPI primitives to the primitives defined in ISO 8348 (see ISO8348) and CCITT X.213 (see X.213)). In addition, it discusses the states the primitive is valid in, the resulting state, and the acknowledgement that the primitive expects. (The state/event tables for these primitives are shown in State/Event Tables. The precedence tables for the NPI primitives are shown in Primitive Precedence Tables.) Rules for OSI conformance are described in Addendum for OSI Conformance, to this document. Table 5, Table 6 and Table 7 provide a summary of the NS primitives and their parameters. Table 5. NC Establishment Network Service Primitives
Table 6. Data Transfer Network Service Primitives
Table 7. NC Release Network Service Primitives
4.1 Management PrimitivesThese primitives apply both to CONS as well as CLNS. 4.1.1 Network Information RequestN_INFO_REQThis primitive requests the NS provider to return the values of all supported protocol parameters (see N_INFO_ACK), and also the current state of the NS provider (as defined in State/Event Tables). This primitive does not affect the state of the network provider and does not appear in the state tables. FormatThe format of the message is one Parameters
Valid StatesThis primitive is valid in any state where a local acknowledgement is not pending. New StateThe new state remains unchanged. AcknowledgementsThis primitive requires the NS provider to generate one of the following acknowledgements upon receipt of the primitive:
4.1.2 Network Information AcknowledgementN_INFO_ACKThis primitive indicates to the NS user any relevant protocol-dependent parameters.2 It should be initiated in
response to the FormatThis primitive consists of one typedef struct { np_ulong PRIM_type; /* always N_INFO_ACK */ np_ulong NSDU_size; /* maximum NSDU size */ np_ulong ENSDU_size; /* maximum ENSDU size */ np_ulong CDATA_size; /* connect data size */ np_ulong DDATA_size; /* discon data size */ np_ulong ADDR_size; /* address size */ np_ulong ADDR_length; /* address length */ np_ulong ADDR_offset; /* address offset */ np_ulong QOS_length; /* QOS values length */ np_ulong QOS_offset; /* QOS values offset */ np_ulong QOS_range_length; /* length of QOS values' range */ np_ulong QOS_range_offset; /* offset of QOS values' range */ np_ulong OPTIONS_flags; /* bit masking for options supported */ np_ulong NIDU_size; /* network i/f data unit size */ np_long SERV_type; /* service type */ np_ulong CURRENT_state; /* current state */ np_ulong PROVIDER_type; /* type of NS provider */ np_ulong NODU_size; /* optimal NSDU size */ np_ulong PROTOID_length; /* length of bound protocol ids */ np_ulong PROTOID_offset; /* offset of bound protocol ids */ np_ulong NPI_version; /* version # of npi that is supported */ } N_info_ack_t; /* Flags to indicate support of NS provider options */ #define REC_CONF_OPT 0x00000001L #define EX_DATA_OPT 0x00000002L #define DEFAULT_RC_SEL 0x00000004L /* Service types supported by the NS provider */ #define N_CONS 1 #define N_CLNS 2 /* Valid provider types */ #define N_SNICFP 1 #define N_SUBNET 2 ParametersThe above fields have the following meaning:
Flags
Service Types
Valid StatesThis primitive is valid in any state in response to an New StateThe state remains unchanged. 4.1.3 Bind Protocol Address RequestN_BIND_REQThis primitive requests that the NS provider bind an NS user entity to a network address and negotiate the number of connect indications allowed to be outstanding by the NS provider for the specified NS user entity being bound. FormatThis primitive consists of one typedef struct { np_ulong PRIM_type; /* always N_BIND_REQ */ np_ulong ADDR_length; /* length of address */ np_ulong ADDR_offset; /* offset of address */ np_ulong CONIND_number; /* req # of conn-indications to be queued */ np_ulong BIND_flags; /* flags associated with N_BIND_REQ */ np_ulong PROTOID_length; /* length of the protocol id */ np_ulong PROTOID_offset; /* offset of protocol id */ } N_bind_req_t; /* Flags associated with N_BIND_REQ */ #define DEFAULT_LISTENER 0x00000001L #define TOKEN_REQUEST 0x00000002L #define DEFAULT_DEST 0x00000004L Parameters
Flags
Valid StatesThis primitive is valid in state New StateThe new state is AcknowledgementsThe NS provider will generate one of the following acknowledgements upon receipt of the
4.1.4 Bind Protocol Address AcknowledgementN_BIND_ACKThis primitive indicates to the NS user that the specified network user entity has been bound to the requested network address and that the specified number of connect indications are allowed to be queued by the NS provider for the specified network address. FormatThis primitives consists of one typedef struct { np_ulong PRIM_type; /* always N_BIND_ACK */ np_ulong ADDR_length; /* address length */ np_ulong ADDR_offset; /* offset of address */ np_ulong CONIND_number; /* connection indications */ np_ulong TOKEN_value; /* NC response token value */ np_ulong PROTOID_length; /* length of protocol id */ np_ulong PROTOID_offset; /* offset from beg. of block */ } N_bind_ack_t; Parameters
Note that the proper alignment of the address in the Bind Rules:The following rules apply to the binding of the specified network address to the Stream:
The following rules apply to negotiating CONIND_number argument:
If the above rules result in an error condition, then the NS provider must issue an
Valid StatesThis primitive is valid in response to an New StateThe new state is 4.1.5 Unbind Protocol Address RequestN_UNBIND_REQThis primitive requests that the NS provider unbind the NS user entity that was previously bound to the network address. FormatThis primitives consists of one Parameters
Valid StatesThis primitive is valid in the New StateThe new state is AcknowledgementsThis primitive requires the NS provider to generate the following acknowledgements upon receipt of the primitive:
4.1.6 Network Options Management RequestN_OPTMGMT_REQThis primitive allows the NS user to manage QOS parameter values associated with the Stream. FormatThese primitives consists of one typedef struct { np_ulong PRIM_type; /* always N_OPTMGMT_REQ */ np_ulong QOS_length; /* length of QOS values */ np_ulong QOS_offset; /* offset of QOS values */ np_ulong OPTMGMT_flags; /* default receipt conf. selection */ } N_optmgmt_req_t; Parameters
Flags
Valid StatesThis primitive is valid in the New StateThe new state is AcknowledgementsThe
4.1.7 Error AcknowledgementN_ERROR_ACKThis primitive indicates to the NS user that a non-fatal error has occurred in the last network-user-originated primitive. This may only be initiated as an acknowledgement for those primitives that require one. It also indicates to the user that no action was taken on the primitive that caused the error. FormatThis primitives consists of one typedef struct { np_ulong PRIM_type; /* always N_ERROR_ACK */ np_ulong ERROR_prim; /* primitive in error */ np_ulong NPI_error; /* NPI error code */ np_ulong UNIX_error; /* UNIX system error code */ } N_error_ack_t; Parameters
Error PrimitivesOne of the following error primitive types are allowed to be returned in the ERROR_prim field:
Also, any unrecognized primitive type may also be returned in conjunction with the
Valid Error CodesThe following error codes are allowed to be returned in the NPI_error field:
Valid StatesThis primitive is valid in all states that have a pending acknowledgement or confirmation. New StateThe new state is the same as the one from which the acknowledged request or response was issued. 4.1.8 Successful Receipt AcknowledgementN_OK_ACKThis primitive indicates to the NS user that the previous network-user-originated primitive was
received successfully by the network provider. It does not indicate to the NS user any network
protocol action taken due to the issuance of the last primitive. The FormatThis primitives consists of one typedef struct { np_ulong PRIM_type; /* always N_OK_ACK */ np_ulong CORRECT_prim; /* primitive being acknowledged */ } N_ok_ack_t; Parameters
Correct Primitives
Valid StatesThis primitive is issued in the following states:
New StateThe resulting state depends on the current state (see Table B-7, and Table B-8). 4.2 CONS Primitive Format and RulesThis section describes the format of the CONS primitives and the rules associated with these
primitives. The default values of the QOS parameters associated with an NC may be selected via the
4.2.1 Connection Establishment PrimitivesThe following network service primitives pertain to the establishment of an NC, provided the NS users exist, and are known to the NS provider. 4.2.1.1 Network Connection RequestN_CONN_REQThis primitive requests that the NS provider make a network connection to the specified destination. FormatThe format of the message is one The structure of the typedef struct { np_ulong PRIM_type; /* always N_CONN_REQ */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong CONN_flags; /* bit masking for options flags */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */ } N_conn_req_t; /* Flags to indicate if options are requested */ #define REC_CONF_OPT 0x00000001L #define EX_DATA_OPT 0x00000002L Parameters
Flags
Valid StatesThis primitive is valid in state New StateThe new state is AcknowledgementsThe following acknowledgements are valid for this primitive:
4.2.1.2 Network Connection IndicationN_CONN_INDThis primitive indicates to the destination NS user that a network connect request has been made by the user at the specified source address. FormatThe format of this message is one The structure of the typedef struct { np_ulong PRIM_type; /* always N_CONN_IND */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong SRC_length; /* source address length */ np_ulong SRC_offset; /* source address offset */ np_ulong SEQ_number; /* sequence number */ np_ulong CONN_flags; /* bit masking for options flags */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */ } N_conn_ind_t; Parameters
Flags
Valid StatesThis primitive is valid in the states New StateIn both cases the resulting state is 4.2.1.3 Network Connection ResponseN_CONN_RESThis primitive allows the destination NS user to request that the network provider accept a previous connect request. FormatThe format of this primitive is one The NS user can send any integral number of octets of data within the range supported by the NS provider. The structure of the typedef struct { np_ulong PRIM_type; /* always N_CONN_RES */ np_ulong TOKEN_value; /* NC response token value */ np_ulong RES_length; /* responding address length */ np_ulong RES_offset; /* responding address offset */ np_ulong SEQ_number; /* sequence number */ np_ulong CONN_flags; /* bit masking for options flags */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */ } N_conn_res_t; Parameters
Flags
Valid StatesThis primitive is valid in state New StateThe new state is AcknowledgementsThe NS provider should generate one of the following acknowledgements upon receipt of this primitive:
4.2.1.4 Network Connection ConfirmN_CONN_CONThis primitive indicates to the source NS user that the network connect request has been confirmed on the specified responding address. FormatThe format of the The NS user can send any integral number of octets of NS user data within a range supported by the
NS provider (see N_INFO_ACK). The NS user data will only be present if the corresponding
The structure of the typedef struct { np_ulong PRIM_type; /* always N_CONN_CON */ np_ulong RES_length; /* responding address length */ np_ulong RES_offset; /* responding address offset */ np_ulong CONN_flags; /* bit masking for options flags */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */ } N_conn_con_t; Parameters
Flags
Valid StatesThis primitive is valid in state New StateThe new state is 4.2.2 Normal Data Transfer PhaseThe data transfer service primitives provide for an exchange of NS user data known as NSDUs, in either direction or in both directions simultaneously on an NC. The network service preserves both the sequence and the boundaries of the NSDUs (when the NS provider supports NSDUs). 4.2.2.1 Normal Data Transfer RequestN_DATA_REQThis user-originated primitive specifies to the NS provider that this message contains NS user data.
It allows the transfer of NS user data between NS users without modification by the NS provider.
The NS user must send any integral number of octets of data greater than zero. In a case where the
size of the NSDU exceeds the NIDU (as specified by the size of the NIDU_size parameter of the
FormatThe format of the message is one or more
Guidelines for use of The following guidelines must be followed with respect to the use of the
The structure of the typedef struct { np_ulong PRIM_type; /* always N_DATA_REQ */ np_ulong DATA_xfer_flags; /* data transfer flags */ } N_data_req_t; /* Data Transfer Flags */ #define N_MORE_DATA_FLAG 0x00000001L #define N_RC_FLAG 0x00000002L Parameters
Flags
Valid StatesThis primitive is valid in the New StateThe resulting state remains the same ( AcknowledgementsThis primitive does not require any acknowledgements, although it may generate a fatal error. This
is indicated to the NS user with a
NOTE: If the interface is in the 4.2.2.2 Normal Data Transfer IndicationN_DATA_INDThis network-provider-originated primitive indicates to the NS user that this message contains NS
user data. As in the FormatThe format of the message is one or more The structure of the typedef struct { np_ulong PRIM_type; /* always N_DATA_IND */ np_ulong DATA_xfer_flags; /* data transfer flags */ } N_data_ind_t; /* Data Transfer Flags */ #define N_MORE_DATA_FLAG 0x00000001L #define N_RC_FLAG 0x00000002L Parameters
Flags
Valid StatesThis primitive is valid in state New StateThe resulting state remains the same ( 4.2.3 Receipt Confirmation Service PrimitivesThe receipt confirmation service is requested by the confirmation request parameter on the
The use of the receipt confirmation service must be agreed to by the two NS users of the NC and the
NS provider during the NC establishment by using the 4.2.3.1 Data Acknowledgement RequestN_DATACK_REQThis is a user-originated primitive that requests that the network provider acknowledge the
FormatThe format of the primitive is one Parameters
Valid StatesThis primitive is valid in state New StateThe resulting state remains the same ( AcknowledgementsThis primitive does not require any acknowledgements, although it may generate a fatal
(unrecoverable) error. This is indicated via an
NOTE: If the interface is in the 4.2.3.2 Data Acknowledgement IndicationN_DATACK_INDThis is a NS provider originated primitive that indicates to the network service user that the remote network service user has acknowledged the data that had previously been sent with the receipt confirmation set. FormatThe format of the primitive is one Parameters
Valid StatesThis primitive is valid in state New StateThe resulting state remains the same ( 4.2.4 Expedited Data Transfer ServiceThe expedited data transfer service provides a further means of information exchange on an NC in
both directions simultaneously. The transfer of expedited network service data unit (ENSDU) is
subject to separate flow control from that applying to NS user data. (However, a separate
STREAMS message type for expedited data is not available with UNIX®
System V Release 3.1. Until a new STREAMS message type is provided, expedited data will be
implemented via queue manipulation). The NS provider should guarantee that an expedited-NSDU will
not be delivered after any subsequently issued NSDU or expedited-NSDU on that NC. The relationship
between normal and expedited data is shown in Table 2. Expedited data can still be delivered
when the receiving NS user is not accepting normal data (however this cannot be guaranteed if there
are blockages occurring in the lower layers). The expedited data transfer service is a NS provider
option, and its use must be agreed by the two NS users of the NC and the NS provider during NC
establishment by using the 4.2.4.1 Expedited Data Transfer RequestN_EXDATA_REQThis is an NS user originated primitive and is used to indicate to the network provider that the message block contains an ENSDU. FormatThe format of the message is one The structure of the Parameters
Valid StatesThis primitive is valid in state New StateThe resulting state remains the same ( AcknowledgementsThis primitive does not require any acknowledgements, although it may generate a fatal
(unrecoverable) error. This is indicated with an
NOTE: If the interface is in the 4.2.4.2 Expedited Data Transfer IndicationN_EXDATA_INDThis is a NS provider originated primitive and is used to indicate to the NS user that this message contains an ENSDU. FormatThe format of the message is one The structure of the Parameters
Valid StatesThis primitive is valid in the state New StateThe resulting state remains the same ( 4.2.5 Reset ServiceThe reset service can be used by the NS user to resynchronize the use of the NC; or by the NS provider to report detected loss of data unrecoverable within the network service. All loss of data that does not involve loss of the NC is reported in this way. Invocation of the reset service will unblock the flow of NSDUs and ENSDUs in case of congestion of the NC; it will cause the NS provider to discard NSDUs, ENSDUs, or confirmations of receipt associated with the NC (see Table 1), and to notify any NS user or users that did not invoke reset that a reset has occurred. The service will be completed in finite time irrespective of the acceptance of the NSDUs, ENSDUs, and confirmations of receipt by the NS users. 4.2.5.1 Reset RequestN_RESET_REQThis user-originated primitive requests that the NS provider reset the network connection. FormatThe format of this primitive is one typedef struct { np_ulong PRIM_type; /* always N_RESET_REQ */ np_ulong RESET_reason; /* reason for reset */ } N_reset_req_t; Parameters
Valid StatesThis primitive is valid in the New StateThe resulting state is AcknowledgementsThe NS provider should generate one of the following acknowledgements upon receipt of this primitive:
NOTE: If the interface is in the 4.2.5.2 Reset IndicationN_RESET_INDThis network-provider-originated primitive indicates to the NS user that the network connection has been reset. FormatThe format of the message is one typedef struct { np_ulong PRIM_type; /* always N_RESET_IND */ np_ulong RESET_orig; /* reset originator */ np_ulong RESET_reason; /* reason for reset */ } N_reset_ind_t; Parameters
Valid StatesThis primitive is valid in the New StateThe new state is 4.2.5.3 Reset ResponseN_RESET_RESThis user-originated primitive indicates that the NS user has accepted a reset request. FormatThe format of the primitive is one Parameters
Valid StatesThis primitive is valid in state New StateThe new state is AcknowledgementsThe NS provider should generate one of the following acknowledgements upon receipt of this primitive:
NOTE: If the interface is in the 4.2.5.4 Reset ConfirmationN_RESET_CONThis NS provider-originated primitive indicates to the network user that initiated the reset, that
the reset request has been confirmed. The NS providers is allowed to issue the FormatThe format of the primitive is one Parameters
Valid StatesThis primitive is valid in state New StateThe resulting state is 4.2.6 Network Connection Release PhaseThe NC release service primitives are used to release a NC. The release may be performed by:
An NC release is permitted at any time regardless of the current phase of the NC. Once an NC release procedure has been invoked, the NC will be released; a request for release cannot be rejected. The network service does not guarantee delivery of any data once the NC release phase is entered (see Table 1). 4.2.6.1 Disconnect RequestN_DISCON_REQThis user-originated primitive requests that the NS provider deny a request for a network connection, or disconnect an existing connection. FormatThe format of the primitive is one The structure of the typedef struct { np_ulong PRIM_type; /* always N_DISCON_REQ */ np_ulong DISCON_reason; /* reason */ np_ulong RES_length; /* responding address length */ np_ulong RES_offset; /* responding address offset */ np_ulong SEQ_number; /* sequence number */ } N_discon_req_t; Parameters
Valid StatesThis primitive is valid in states New StateThe new state depends on the original state (see Table B-8). AcknowledgementsThe NS provider should generate one of the following acknowledgements upon receipt of this primitive:
4.2.6.2 Disconnect IndicationN_DISCON_INDThis network-provider originated primitive indicates to the NS user that either a request for connection has been denied or an existing connection has been disconnected. FormatThe format of the message is one The structure of the typedef struct { np_ulong PRIM_type; /* always N_DISCON_IND */ np_ulong DISCON_orig; /* originator */ np_ulong DISCON_reason; /* reason */ np_ulong RES_length; /* address length */ np_ulong RES_offset; /* address offset */ np_ulong SEQ_number; /* sequence number */ } N_discon_ind_t; Parameters
Valid StatesThe valid states are as follows:
New StateThe new state is 4.3 CLNS Primitive Format and RulesThis section describes the format of the CLNS primitives and the rules associated with these
primitives. The values of the QOS parameters associated with each unit data transmission are
selected with the 4.3.1 Unit Data Transfer4.3.1.1 Unit Data RequestN_UNITDATA_REQThis primitive requests that the NS provider send the specified datagram to the specified destination. FormatThe format of the primitive is one typedef struct { np_ulong PRIM_type; /* always N_UNITDATA_REQ */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong RESERVED_field[2]; /* reserved field for DLPI compatibility */ } N_unitdata_req_t; Parameters
Valid StatesThis primitive is valid in state New StateThe resulting state remains unchanged. AcknowledgementsThe NS provider should generate one of the following acknowledgements upon receipt of this primitive:
4.3.1.2 Unit Data IndicationN_UNITDATA_INDThis primitive indicates to the NS user that a datagram has been received from the specified source address. FormatThe format of the message is one typedef struct { np_ulong PRIM_type; /* always N_UNITDATA_IND */ np_ulong SRC_length; /* source address length */ np_ulong SRC_offset; /* source address offset */ np_ulong DEST_length; /* source address length */ np_ulong DEST_offset; /* source address offset */ np_ulong ERROR_type; /* reserved field for DLPI compatibility */ } N_unitdata_ind_t; Parameters
Valid StatesThis primitive is valid in state New StateThe resulting state remains unchanged. 4.3.2 Unit Data Error4.3.2.1 Unit Data Error IndicationN_UDERROR_INDThis primitive indicates to the NS user that a datagram with the specified destination address and QOS parameters has resulted in an error condition. FormatThe format of the primitive is one typedef struct { np_ulong PRIM_type; /* always N_UDERROR_IND */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong RESERVED_field; /* reserved field for DLPI compatibility */ np_ulong ERROR_type; /* error type */ } N_uderror_ind_t; Parameters
Valid StatesThis primitive is valid in state New StateThe resulting state remains unchanged. 5 Diagnostics RequirementsTwo error handling facilities should be provided to the network service user: one to handle non-fatal errors, and the other to handle fatal errors. 5.1 Non-Fatal Error Handling FacilityThese are errors that do not change the state of the network service interface as seen by the
network service user, and provide the user the option of reissuing the network service primitive
with the corrected options specification. The non-fatal error handling is provided only to those
primitives that require acknowledgements, and uses the 5.2 Fatal Error Handling FacilityThese errors are issued by the NS provider when it detects errors that are not correctable by the
network service user, or if it is unable to report a correctable error to the network service user.
Fatal errors are indicated via the STREAMS message type Addendum for OSI ConformanceThis section describes the formats and rules that are specific to OSI. The addendum must be used along with the generic NPI as defined in the main document when implementing a NS provider that will be configured with the OSI Transport Layer. Quality of Service: Model & DescriptionThe “Quality of Service” characteristics apply to both CONS as well as CLNS. QOS OverviewQOS (Quality of Service) is described in terms of QOS parameters. There are two types of QOS parameters:
Table 8 summarizes the supported parameters both for connection-mode and connectionless network service. For more details on the definition of the QOS parameters, refer to CCITT X.213 (see X.213) and ISO 8348 (see ISO8348). Table 8. Supported QoS Parameters
QOS Parameter FormatsThis section describes the formats of the QOS parameters for CONS and/or CLNS services. The requested QOS parameter values apply to complete NSDUs. NC Establishment DelayThis parameter applies to CONS only. It is defined as the maximum acceptable delay between a
Format:long nc_estab_delay; /* maximum NC establishment delay */
NC Establishment Failure ProbabilityThis parameter applies to CONS only. NC Establishment Failure Probability is the percent ratio (rounded to the nearest integer) of total NC establishment failures to total NC establishment attempts in a measurement sample. A measurement sample consists of100 NC establishment attempts. NC establishment failure occurs due to NS provider behaviour such as mis-connection, NC refusal, and excessive delay. NC establishment attempts that fail due to NS user behaviour such as error, NC refusal, or excessive delay are excluded in calculating NC establishment failure probability. Format:long nc_estab_fail_prob; /* maximum NC estab failure probability */
ThroughputThis parameter applies to CONS only, is specified separately for each direction of transfer, and has end-to-end significance. Throughput is defined in terms of at least two successfully transferred NSDUs presented continuously to the NS provider at the maximum rate the NS provider can continuously sustain, and unconstrained by flow control applied by the receiving NS user. Given a sequence of “n” NSDUs (where is greater than or equal to two; suggested value is 100), throughput is defined to be the smaller of:
Throughput should be measured and specified in bits per second. Format:
Transit DelayThis parameter applies to CONS as well as CLNS. Transit Delay is the elapsed time between a
Format:
Residual Error RateThis parameter applies to both CONS as well as CLNS. Residual Error Rate is the percent ratio (rounded to the nearest integer) of total incorrect, lost, and duplicate NSDUs to total NSDUs transferred across the NS boundary during a measurement period. The measurement period will be 3600 seconds. Format:long residual_error_rate; /* maximum acceptable residual error rate */
NC ResilienceThis parameter applies to CONS only. NC Resilience specifies the percent probability (rounded to the nearest integer) of a NS provider invoked NC release or a NS provider invoked reset during a specified time interval on an established NC. The time interval will be 3600 seconds. Format:long nc_resilience; /* maximum acceptable nc resilience */
Transfer Failure ProbabilityThis parameter applies to CONS only. It is the percent ratio (rounded to the nearest integer) of total transfer failures to total transfer samples observed during a performance measurement. A transfer sample is a discrete observation of NS provider performance in transferring NSDUs between specified sending and receiving NS user. A transfer sample will last for the duration of the NC. A transfer failure is a transfer sample in which the observed performance is worse than the specified minimum acceptable level. A transfer failure is identified by comparing the measured values for the supported performance parameters with specified transfer failure thresholds. The three supported performance parameters are throughput, transit delay, and residual error rate. Format:long xfer_fail_prob; /* maximum xfer failure prob */
NC Release DelayThis parameter applies to CONS only. NC Release Delay is defined as the maximum acceptable delay
between a NS user invoked Format:long nc_rel_delay; /* maximum nc release delay */
NC Release Failure ProbabilityThis parameter applies to CONS only. It is the percent ratio (rounded to the nearest integer) of total NC release requests resulting in release failure to total NC release requests included in a measurement sample. A measurement sample consists of a 100NC release requests. This parameter is specified independently for each NS user. A release failure is defined to occur for a particular NS user, if that user does not receive a
Format:long nc_rel_fail_prob; /* maximum nc rel fail probability */
ProtectionThis parameter applies to both CONS and CLNS. It specifies the extent to which the NS provider attempts to prevent unauthorized monitoring or manipulation of NS user originated information. /* Types of protection */ #define N_NO_PROT 0x00000000L /* no protection */ #define N_PASSIVE_PROT 0x00000001L /* protection against passive monitoring */ #define N_ACTIVE_PROT 0x00000002L /* protection against active monitoring */ #define N_ACTIVE_PASSIVE_PROT 0x00000003L /* maximum protection */ Four protection options are provided:
Format:typedef struct { long protect_targ_value; /* target protection */ long protect_min_value; /* minimum protection */ } protection_values_t;
PriorityThis parameter applies to both CONS and CLNS. It specifies the target priority of:
Format:typedef struct { long priority_targ_value; /* target priority */ long priority_min_value; /* minimum priority */ } priority_values_t;
Maximum Acceptable CostThis parameter applies to both CONS and CLNS. It specifies the maximum acceptable cost in local currency (composed of communications and end-system resource costs), or indicates to the NS provider that it should choose the least expensive means available to it. Formatlong max_accept_cost; /* acceptable cost maximum */ /* Choose least expensive means */ #define N_LEAST_EXPENSIVE 0x00000000L /* choose least expensive means */
QOS Data StructuresThe quality of services parameters are organized into six different structures for simplicity:
Structure N_QOS_CO_RANGE1Structure typedef struct { ulong n_qos_type; /* always N_QOS_CO_RANGE */ thru_values_t src_throughput_range; /* source throughput range */ thru_values_t dest_throughput_range; /* dest throughput range */ td_values_t transit_delay_range; /* transit delay range */ protection_values_t protection_range; /* protection range */ priority_values_t priority_range; /* priority target */ } N_qos_co_range1_t; This structure should be used in the QOS_length and QOS_offset fields of the following NPI primitives:
Structure N_QOS_CO_SEL1Structure typedef struct { ulong n_qos_type; /* always N_QOS_CO_SEL */ long src_throughput_sel; /* source throughput selected */ long dest_throughput_sel; /* destination throughput selected */ long transit_delay_sel; /* transit delay selected */ long protection_sel; /* NC protection selected */ long priority_sel; /* NC priority selected */ } N_qos_co_sel1_t; This structure should be used in the QOS_length and QOS_offset fields of the following NPI primitives:
Structure N_QOS_CL_RANGE1Structure typedef struct { ulong n_qos_type; /* always N_QOS_CL_RANGE */ td_values_t transit_delay_max; /* maximum transit delay */ long residual_error_rate; /* residual error rate */ protection_values_t protection_range; /* target protection */ priority_values_t priority_range; /* target priority */ long max_accept_cost; /* maximum acceptable cost */ } N_qos_cl_range1_t; This structure should be used in the:
Structure N_QOS_CL_SEL1Structure typedef struct { ulong n_qos_type; /* always N_QOS_CL_sel */ long transit_delay_max; /* maximum transit delay */ long residual_error_rate; /* residual error rate */ long protection_sel; /* protection selected */ long priority_sel; /* priority selected */ long max_accept_cost; /* maximum acceptable cost */ } N_qos_cl_sel1_t; This structure should be used in the:
Structure N_QOS_CO_OPT_RANGE1Structure typedef struct { ulong n_qos_type; /* always N_QOS_CO_OPT_RANGE */ thru_values_t src_throughput; /* source throughput values */ thru_values_t dest_throughput; /* dest throughput values */ td_values_t transit_delay; /* transit delay values */ long nc_estab_delay; /* NC establishment delay */ long nc_estab_fail_prob; /* NC estab failure probability */ long residual_error_rate; /* residual error rate */ long xfer_fail_prob; /* transfer failure probability */ long nc_resilience; /* NC resilience */ long nc_rel_delay; /* NC release delay */ long nc_rel_fail_prob; /* NC release fail probability */ protection_values_t protection_range; /* protection range */ priority_values_t priority_range; /* priority range */ long max_accept_cost; /* maximum acceptable cost */ } N_qos_co_opt_range1_t; This structure should be used in the:
Structure N_QOS_CO_OPT_SEL1Structure typedef struct { ulong n_qos_type; /* always N_QOS_CO_OPT_SEL */ thru_values_t src_throughput; /* source throughput values */ thru_values_t dest_throughput; /* dest throughput values */ td_values_t transit_delay; /* transit delay values */ long nc_estab_delay; /* NC establishment delay */ long nc_estab_fail_prob; /* NC estab failure probability */ long residual_error_rate; /* residual error rate */ long xfer_fail_prob; /* transfer failure probability */ long nc_resilience; /* NC resilience */ long nc_rel_delay; /* NC release delay */ long nc_rel_fail_prob; /* NC release failure probability */ long protection_sel; /* protection selected */ long priority_sel; /* priority selected */ long max_accept_cost; /* maximum acceptable cost */ } N_qos_co_opt_sel1_t; This structure should be used in the:
NPI Primitives Rules for OSI ConformanceThe following are the rules that apply to the NPI primitives for OSI compatibility. Local Management PrimitivesN_INFO_ACKParameters
N_OPTMGMT_REQParameters
CONS Connection Establishment Phase Rules for QOS Parameter NegotiationThe negotiation for NC throughput and NC transit-delay QOS parameters are conducted as follows:
Rules for QOS Parameter SelectionWhen a NS user/provider cannot determine the value of a QOS field, it should return a value of
#define QOS_UNKNOWN -1 Rules for Receipt Confirmation Selection
N_CONN_REQParameters
Flags
N_CONN_INDParameters
Flags
N_CONN_RESParameters
Flags
N_CONN_CONParameters
Flags
CONS Reset ServiceN_RESET_REQParameters
N_RESET_INDParameters
Rules governing the value of the RESET_reason parameterThe value conveyed in this parameter will be as follows:
CONS NC Release PhaseN_DISCON_REQParameters:
Rules governing the value of the DISCON_reason parameterThe value conveyed in the parameter will be as follows:
N_DISCON_INDParameters
Rules governing the value of the DISCON_reason parameterThe value conveyed in the parameter will be as follows:
CLNSN_UDERROR_INDParameters
Appendix A Mapping NPI to ISO 8348 and CCITT X.213Table A-1 shows a mapping of the NPI primitives to the OSI network service definition primitives. Table A-1. Mapping NPI Primitives to OSI NS
Appendix B State/Event TablesThis appendix contains tables showing the network-user’s view of the possible states that the NPI
may enter due to an event, and the possible events that may occur on the interface. The
Table B-1. Kernel Level NPI States
Table B-2 and Table B-3 describe the variables and outputs used in the state tables. Table B-2. State Table Variables
Table B-3. State Table Outputs
Table B-4 shows outgoing events that are initiated by the network-user entity. These events are either requests to the network provider or responses to an event of the network provider. Table B-4. Kernel Level NPI Outgoing Events
Table B-5 shows incoming events that are initiated by the network provider. These events are either confirmations of a request, or are indications to the NS user entity that an event has occurred. Table B-5. Kernel Level NPI Incoming Events
Table B-6 and Table B-7 describe the possible events the NPI may enter given a current state and event. The contents of each box represent the next state given the current state (column) and the current incoming or outgoing event (row). An empty box represents a state/event combination that is invalid. Along with the next state, each box may include an action. The network provider must take specific actions in the order specified in the state table. Table B-6. Data Transfer State Table for CLNS
Table B-7. Initialization State Table for CONS
Table B-8. State Table for CONS for Connection/Release/Data Transfer States
Appendix C Primitive Precedence TablesTable C-1 and Table C-2 describe the precedence of the NPI primitives for both the Stream write and read queues. In both these tables, primitive Y is already on the queue and primitive X is about to be put on the queue. The Stream write queue contains network user initiated primitives and the Stream read queue contains network provider initiated primitives. The column headings are a shorthand notation for the row headings. Table C-1. STREAM Write Queue Precedence Table
Table C-2. STREAM Read Queue Precedence Table
Appendix D NPI Header File ListingThis appendix contains a listing of the NPI header file needed by implementations. /* npi.h header for the Network Provider Interface (OSI Conforming) */ #ifndef SYS_NPI_H #define SYS_NPI_H /* mark file as included */ typedef int32_t np_long; typedef u_int32_t np_ulong; typedef u_int16_t np_ushort; #define N_CURRENT_VERSION 0x02 /* current version of NPI */ #define N_VERSION_2 0x02 /* version of npi, December 16, 1991 */ /* Primitives that are initiated by the network user. */ #define N_CONN_REQ 0 /* NC request */ #define N_CONN_RES 1 /* Accept previous connection indication */ #define N_DISCON_REQ 2 /* NC disconnection request */ #define N_DATA_REQ 3 /* Connection-Mode data transfer request */ #define N_EXDATA_REQ 4 /* Expedited data request */ #define N_INFO_REQ 5 /* Information Request */ #define N_BIND_REQ 6 /* Bind a NS user to network address */ #define N_UNBIND_REQ 7 /* Unbind NS user from network address */ #define N_UNITDATA_REQ 8 /* Connection-less data send request */ #define N_OPTMGMT_REQ 9 /* Options Management request */ /* Primitives that are initiated by the network provider. */ #define N_CONN_IND 11 /* Incoming connection indication */ #define N_CONN_CON 12 /* Connection established */ #define N_DISCON_IND 13 /* NC disconnected */ #define N_DATA_IND 14 /* Incoming connection-mode data indication */ #define N_EXDATA_IND 15 /* Incoming expedited data indication */ #define N_INFO_ACK 16 /* Information Acknowledgement */ #define N_BIND_ACK 17 /* NS User bound to network address */ #define N_ERROR_ACK 18 /* Error Acknowledgement */ #define N_OK_ACK 19 /* Success Acknowledgement */ #define N_UNITDATA_IND 20 /* Connection-less data receive indication */ #define N_UDERROR_IND 21 /* UNITDATA Error Indication */ /* Additional NPI Primitivies */ #define N_DATACK_REQ 23 /* Data acknowledgement request */ #define N_DATACK_IND 24 /* Data acknowledgement indication */ #define N_RESET_REQ 25 /* NC reset request */ #define N_RESET_IND 26 /* Incoming NC reset request indication */ #define N_RESET_RES 27 /* Reset processing accepted */ #define N_RESET_CON 28 /* Reset processing complete */ /* The following are the events that drive the state machine */ /* Initialization events */ #define NE_BIND_REQ 0 /* bind request */ #define NE_UNBIND_REQ 1 /* unbind request */ #define NE_OPTMGMT_REQ 2 /* manage options request */ #define NE_BIND_ACK 3 /* bind acknowledgement */ #define NE_ERROR_ACK 5 /* error acknowledgement */ #define NE_OK_ACK1 6 /* ok ack, outcnt == 0 */ #define NE_OK_ACK2 7 /* ok ack, outcnt == 1, q == rq */ #define NE_OK_ACK3 8 /* ok ack, outcnt == 1, q! == rq */ #define NE_OK_ACK4 9 /* ok ack, outcnt > 1 */ /* Connection-Mode events */ #define NE_CONN_REQ 10 /* connect request */ #define NE_CONN_RES 11 /* connect response */ #define NE_DISCON_REQ 12 /* disconnect request */ #define NE_DATA_REQ 13 /* data request */ #define NE_EXDATA_REQ 14 /* expedited data request */ #define NE_CONN_IND 16 /* connect indication */ #define NE_CONN_CON 17 /* connect confirm */ #define NE_DATA_IND 18 /* data indication */ #define NE_EXDATA_IND 19 /* expedited data indication */ #define NE_DISCON_IND1 21 /* disconnect indication, outcnt == 0 */ #define NE_DISCON_IND2 22 /* disconnect indication, outcnt == 1 */ #define NE_DISCON_IND3 23 /* disconnect indication, outcnt > 1 */ #define NE_PASS_CON 24 /* pass connection */ #define NE_RESET_REQ 28 /* reset request */ #define NE_RESET_RES 29 /* reset response */ #define NE_DATACK_REQ 30 /* data acknowledgement request */ #define NE_DATACK_IND 31 /* data acknowledgement indication */ #define NE_RESET_IND 32 /* reset indication */ #define NE_RESET_CON 33 /* reset confirm */ /* Connection-less events */ #define NE_UNITDATA_REQ 25 /* unitdata request */ #define NE_UNITDATA_IND 26 /* unitdata indication */ #define NE_UDERROR_IND 27 /* unitdata error indication */ #define NE_NOEVENTS 36 /* no events */ /* NPI interface states */ #define NS_UNBND 0 /* NS user not bound to network address */ #define NS_WACK_BREQ 1 /* Awaiting acknowledgement of N_BIND_REQ */ #define NS_WACK_UREQ 2 /* Pending acknowledgement for N_UNBIND_REQ */ #define NS_IDLE 3 /* Idle, no connection */ #define NS_WACK_OPTREQ 4 /* Pending acknowledgement of N_OPTMGMT_REQ */ #define NS_WACK_RRES 5 /* Pending acknowledgement of N_RESET_RES */ #define NS_WCON_CREQ 6 /* Pending confirmation of N_CONN_REQ */ #define NS_WRES_CIND 7 /* Pending response of N_CONN_REQ */ #define NS_WACK_CRES 8 /* Pending acknowledgement of N_CONN_RES */ #define NS_DATA_XFER 9 /* Connection-mode data transfer */ #define NS_WCON_RREQ 10 /* Pending confirmation of N_RESET_REQ */ #define NS_WRES_RIND 11 /* Pending response of N_RESET_IND */ #define NS_WACK_DREQ6 12 /* Waiting ack of N_DISCON_REQ */ #define NS_WACK_DREQ7 13 /* Waiting ack of N_DISCON_REQ */ #define NS_WACK_DREQ9 14 /* Waiting ack of N_DISCON_REQ */ #define NS_WACK_DREQ10 15 /* Waiting ack of N_DISCON_REQ */ #define NS_WACK_DREQ11 16 /* Waiting ack of N_DISCON_REQ */ #define NS_NOSTATES 18 /* No states */ /* N_ERROR_ACK error return code values */ #define NBADADDR 1 /* Incorrect address format/illegal address information */ #define NBADOPT 2 /* Options in incorrect format or contain illegal information */ #define NACCESS 3 /* User did not have proper permissions */ #define NNOADDR 5 /* NS Provider could not allocate address */ #define NOUTSTATE 6 /* Primitive was issues in wrong sequence */ #define NBADSEQ 7 /* Sequence number in primitive was incorrect/illegal */ #define NSYSERR 8 /* UNIX system error occurred */ #define NBADDATA 10 /* User data spec. outside range supported by NS provider */ #define NBADFLAG 16 /* Flags specified in primitive were illegal/incorrect */ #define NNOTSUPPORT 18 /* Primitive type not supported by the NS provider */ #define NBOUND 19 /* Illegal second attempt to bind listener or default listener */ #define NBADQOSPARAM 20 /* QOS values specified are outside the range supported by the NS provider */ #define NBADQOSTYPE 21 /* QOS structure type specified is not supported by the NS provider */ #define NBADTOKEN 22 /* Token used is not associated with an open stream */ #define NNOPROTOID 23 /* Protocol id could not be allocated */ /* N_UDERROR_IND reason codes */ #define N_UD_UNDEFINED 10 /* no reason specified */ #define N_UD_TD_EXCEEDED 11 /* Transit delay exceeded */ #define N_UD_CONGESTION 12 /* NS Provider congestion */ #define N_UD_QOS_UNAVAIL 13 /* Requested QOS/service characteristic unavailable */ #define N_UD_LIFE_EXCEEDED 14 /* NSDU Lifetime exceeded */ #define N_UD_ROUTE_UNAVAIL 15 /* Suitable route unavailable */ #define N_UD_SEG_REQUIRED 16 /* Segmentation reqd where none permitted */ /* NPI Originator for Resets and Disconnects */ #define N_PROVIDER 0x0100 /* provider originated reset/disconnect */ #define N_USER 0x0101 /* user originated reset/disconnect */ #define N_UNDEFINED 0x0102 /* reset/disconnect originator undefined */ /* NPI Disconnect & Reset reasons when the originator is the N_UNDEFINED */ #define N_REASON_UNDEFINED 0x0200 /* NPI Disconnect reasons when the originator is the N_PROVIDER */ #define N_DISC_P 0x0300 /* Disconnection-permanent condition */ #define N_DISC_T 0x0301 /* Disconnection-transient condition */ #define N_REJ_NSAP_UNKNOWN 0x0302 /* Connection rejection-NSAP address unknown (permanent condition) */ #define N_REJ_NSAP_UNREACH_P 0x0303 /* Connection rejection-NSAP unreachable (permanent condition) */ #define N_REJ_NSAP_UNREACH_T 0x0304 /* Connection rejection-NSAP unreachable (transient condition) */ /* NPI Disconnect reasons when the originator is the N_USER */ #define N_DISC_NORMAL 0x0400 /* Disconnection-normal condition */ #define N_DISC_ABNORMAL 0x0401 /* Disconnection-abnormal condition */ #define N_REJ_P 0x0402 /* Connection rejection-permanent condition */ #define N_REJ_T 0x0403 /* Connection rejection-transient condition */ #define N_REJ_INCOMPAT_INFO 0x0406 /* Connection rejection-incompatible information in NS-user-data */ /* NPI Disconnect reasons when the originator is the N_USER or N_PROVIDER */ #define N_REJ_QOS_UNAVAIL_P 0x0305 /* Connection rejection-QOS unavailable (permanent condition) */ #define N_REJ_QOS_UNAVAIL_T 0x0306 /* Connection rejection-QOS unavailable (transient condition) */ #define N_REJ_UNSPECIFIED 0x0307 /* Connection rejection-reason unspecified */ /* NPI Reset reasons when originator is N_PROVIDER */ #define N_CONGESTION 0x0500 /* Reset due to congestion */ #define N_RESET_UNSPECIFIED 0x0501 /* Reset-reason "unspecified" */ /* NPI Reset reasons when originator is N_USER */ #define N_USER_RESYNC 0x0600 /* Reset due to user resynchronization */ /* CONN_flags definition; (used in N_conn_req, N_conn_ind, N_conn_res, and N_conn_con primitives) Flags to indicate support of network provider options; (used with the OPTIONS_flags field of N_info_ack primitive) */ #define REC_CONF_OPT 0x00000001L /* Receipt Confirmation Selection and Support */ #define EX_DATA_OPT 0x00000002L /* Expedited Data Selection and Support */ /* This flag is used with the OPTIONS_flags field of N_info_ack as well as the OPTMGMT_flags field of the N_optmgmt_req primitive */ #define DEFAULT_RC_SEL 0x00000004L /* Indicates if default receipt confirmation is selected */ /* BIND_flags; (used with N_bind_req primitive) */ #define DEFAULT_LISTENER 0x00000001L /* indicates if this stream is the default listener */ #define TOKEN_REQUEST 0x00000002L /* indicates if "token" should be assigned to the stream */ #define DEFAULT_DEST 0x00000004L /* indicates if default dest. stream */ /* QOS Parameter Definitions */ /* Throughput This parameter is specified for both directions. */ typedef struct { np_long thru_targ_value; /* target throughput values */ np_long thru_min_value; /* minimum acceptable throughput value */ } thru_values_t; /* Transit Delay */ typedef struct { np_long td_targ_value; /* target transit delay */ np_long td_max_value; /* maximum acceptable transit delay */ } td_values_t; /* Protection Values */ typedef struct { np_long protect_targ_value; /* target protection value */ np_long protect_min_value; /* minimum or available protection */ } protection_values_t; /* Priority Values */ typedef struct { np_long priority_targ_value; /* target priority */ np_long priority_min_value; /* minimum acceptable priority */ } priority_values_t; /* Types of protection specifications */ #define N_NO_PROT 0x00000000L /* no protection */ #define N_PASSIVE_PROT 0x00000001L /* protection against passive monitoring */ #define N_ACTIVE_PROT 0x00000002L /* protection against active monitoring */ #define N_ACTIVE_PASSIVE_PROT 0x00000003L /* protection against active and passive monitoring */ /* Cost Selection */ #define N_LEAST_EXPENSIVE 0x00000000L /* choose least expensive means */ /* QOS STRUCTURE TYPES AND DEFINED VALUES */ #define N_QOS_CO_RANGE1 0x0101 #define N_QOS_CO_SEL1 0x0102 #define N_QOS_CL_RANGE1 0x0103 #define N_QOS_CL_SEL1 0x0104 #define N_QOS_CO_OPT_RANGE1 0x0105 #define N_QOS_CO_OPT_SEL1 0x0106 /* When a NS user/provider cannot determine the value of a QOS field, it should return a value of QOS_UNKNOWN. */ #define QOS_UNKNOWN -1 /* QOS range for CONS. (Used with N_CONN_REQ and N_CONN_IND.) */ typedef struct { np_ulong n_qos_type; /* always N_QOS_CO_RANGE */ thru_values_t src_throughput_range; /* source throughput range */ thru_values_t dest_throughput_range; /* destination throughput range */ td_values_t transit_delay_range; /* transit delay range */ protection_values_t protection_range; /* protection range */ priority_values_t priority_range; /* priority range */ } N_qos_co_range_t; /* QOS selected for CONS. (Used with N_CONN_RES and N_CONN_CON.) */ typedef struct { np_ulong n_qos_type; /* always N_QOS_CO_SEL */ np_long src_throughput_sel; /* source throughput selected */ np_long dest_throughput_sel; /* destination throughput selected */ np_long transit_delay_sel; /* transit delay selected */ np_long protection_sel; /* NC protection selected */ np_long priority_sel; /* NC priority selected */ } N_qos_co_sel_t; /* QOS range for CLNS options management. (Used with N_INFO_ACK.) */ typedef struct { np_ulong n_qos_type; /* always N_QOS_CL_RANGE */ td_values_t transit_delay_max; /* maximum transit delay */ np_ulong residual_error_rate; /* residual error rate */ protection_values_t protection_range; /* protection range */ priority_values_t priority_range; /* priority range */ np_long max_accept_cost; /* maximum acceptable cost */ } N_qos_cl_range_t; /* QOS selection for CLNS options management. (Used with N_OPTMGMT_REQ and N_INFO_ACK.) */ typedef struct { np_ulong n_qos_type; /* always N_QOS_CL_sel */ np_long transit_delay_max; /* maximum transit delay */ np_ulong residual_error_rate; /* residual error rate */ np_long protection_sel; /* protection selected */ np_long priority_sel; /* priority selected */ np_long max_accept_cost; /* maximum acceptable cost */ } N_qos_cl_sel_t; /* QOS range for CONS options management. (Used with N_OPTMGMT_REQ.) */ typedef struct { np_ulong n_qos_type; /* always N_QOS_CO_OPT_RANGE */ thru_values_t src_throughput; /* source throughput values */ thru_values_t dest_throughput; /* dest throughput values */ td_values_t transit_delay_t; /* transit delay values */ np_long nc_estab_delay; /* NC establishment delay */ np_ulong nc_estab_fail_prob; /* NC estab failure probability */ np_ulong residual_error_rate; /* residual error rate */ np_ulong xfer_fail_prob; /* transfer failure probability */ np_ulong nc_resilience; /* NC resilience */ np_long nc_rel_delay; /* NC release delay */ np_ulong nc_rel_fail_prob; /* NC release failure probability */ protection_values_t protection_range; /* protection range */ priority_values_t priority_range; /* priority range */ np_long max_accept_cost; /* maximum acceptable cost */ } N_qos_co_opt_range_t; /* QOS values selected for CONS options management. (Used with N_OPTMGMT_REQ and N_INFO_ACK.) */ typedef struct { np_ulong n_qos_type; /* always N_QOS_CO_OPT_SEL */ thru_values_t src_throughput; /* source throughput values */ thru_values_t dest_throughput; /* dest throughput values */ td_values_t transit_delay_t; /* transit delay values */ np_long nc_estab_delay; /* NC establishment delay */ np_ulong nc_estab_fail_prob; /* NC estab failure probability */ np_ulong residual_error_rate; /* residual error rate */ np_ulong xfer_fail_prob; /* transfer failure probability */ np_ulong nc_resilience; /* NC resilience */ np_long nc_rel_delay; /* NC release delay */ np_ulong nc_rel_fail_prob; /* NC release failure probability */ np_long protection_sel; /* protection selected */ np_long priority_sel; /* priority selected */ np_long max_accept_cost; /* maximum acceptable cost */ } N_qos_co_opt_sel_t; /* NPI Primitive Definitions */ /* Local management service primitives */ /* Information request */ typedef struct { np_ulong PRIM_type; /* always N_INFO_REQ */ } N_info_req_t; /* Information acknowledgement */ typedef struct { np_ulong PRIM_type; /* always N_INFO_ACK */ np_ulong NSDU_size; /* maximum NSDU size */ np_ulong ENSDU_size; /* maximum ENSDU size */ np_ulong CDATA_size; /* connect data size */ np_ulong DDATA_size; /* discon data size */ np_ulong ADDR_size; /* address size */ np_ulong ADDR_length; /* address length */ np_ulong ADDR_offset; /* address offset */ np_ulong QOS_length; /* QOS values length */ np_ulong QOS_offset; /* QOS values offset */ np_ulong QOS_range_length; /* length of QOS values' range */ np_ulong QOS_range_offset; /* offset of QOS values' range */ np_ulong OPTIONS_flags; /* bit masking for options supported */ np_ulong NIDU_size; /* network i/f data unit size */ np_long SERV_type; /* service type */ np_ulong CURRENT_state; /* current state */ np_ulong PROVIDER_type; /* type of NS provider */ np_ulong NODU_size; /* optimal NSDU size */ np_ulong PROTOID_length; /* length of bound protocol ids */ np_ulong PROTOID_offset; /* offset of bound protocol ids */ np_ulong NPI_version; /* version # of npi that is supported */ } N_info_ack_t; /* Service types supported by NS provider */ #define N_CONS 1 /* Connection-mode network service supported */ #define N_CLNS 2 /* Connection-less network service supported */ /* Valid provider types */ #define N_SNICFP 1 #define N_SUBNET 2 /* Bind request */ typedef struct { np_ulong PRIM_type; /* always N_BIND_REQ */ np_ulong ADDR_length; /* length of address */ np_ulong ADDR_offset; /* offset of address */ np_ulong CONIND_number; /* requested # of connect-indications to be queued */ np_ulong BIND_flags; /* bind flags */ np_ulong PROTOID_length; /* length of bound protocol ids */ np_ulong PROTOID_offset; /* offset of bound protocol ids */ } N_bind_req_t; /* Bind acknowledgement */ typedef struct { np_ulong PRIM_type; /* always N_BIND_ACK */ np_ulong ADDR_length; /* address length */ np_ulong ADDR_offset; /* offset of address */ np_ulong CONIND_number; /* connection indications */ np_ulong TOKEN_value; /* value of "token" assigned to stream */ np_ulong PROTOID_length; /* length of bound protocol ids */ np_ulong PROTOID_offset; /* offset of bound protocol ids */ } N_bind_ack_t; /* Unbind request */ typedef struct { np_ulong PRIM_type; /* always N_UNBIND_REQ */ } N_unbind_req_t; /* Options management request */ typedef struct { np_ulong PRIM_type; /* always N_OPTMGMT_REQ */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */ np_ulong OPTMGMT_flags; /* options management flags */ } N_optmgmt_req_t; /* Error acknowledgement for CONS services */ typedef struct { np_ulong PRIM_type; /* always N_ERROR_ACK */ np_ulong ERROR_prim; /* primitive in error */ np_ulong NPI_error; /* NPI error code */ np_ulong UNIX_error; /* UNIX error code */ } N_error_ack_t; /* Successful completion acknowledgement */ typedef struct { np_ulong PRIM_type; /* always N_OK_ACK */ np_ulong CORRECT_prim; /* primitive being acknowledged */ } N_ok_ack_t; /* CONS PRIMITIVES */ /* Network connection request */ typedef struct { np_ulong PRIM_type; /* always N_CONN_REQ */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong CONN_flags; /* bit masking for options flags */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */ } N_conn_req_t; /* Connection indication */ typedef struct { np_ulong PRIM_type; /* always N_CONN_IND */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong SRC_length; /* source address length */ np_ulong SRC_offset; /* source address offset */ np_ulong SEQ_number; /* sequence number */ np_ulong CONN_flags; /* bit masking for options flags */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */ } N_conn_ind_t; /* Connection response */ typedef struct { np_ulong PRIM_type; /* always N_CONN_RES */ np_ulong TOKEN_value; /* NC response token value */ np_ulong RES_length; /* responding address length */ np_ulong RES_offset; /* responding address offset */ np_ulong SEQ_number; /* sequence number */ np_ulong CONN_flags; /* bit masking for options flags */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */ } N_conn_res_t; /* Connection confirmation */ typedef struct { np_ulong PRIM_type; /* always N_CONN_CON */ np_ulong RES_length; /* responding address length */ np_ulong RES_offset; /* responding address offset */ np_ulong CONN_flags; /* bit masking for options flags */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */ } N_conn_con_t; /* Connection mode data transfer request */ typedef struct { np_ulong PRIM_type; /* always N_DATA_REQ */ np_ulong DATA_xfer_flags; /* data transfer flags */ } N_data_req_t; /* NPI MORE_DATA_FLAG for segmenting NSDU into more than 1 NIDUs */ #define N_MORE_DATA_FLAG 0x00000001L /* Indicates that the next NIDU is part of this NSDU */ /* NPI Receipt confirmation request set flag */ #define N_RC_FLAG 0x00000002L /* Indicates if receipt confirmation is required */ /* Incoming data indication for an NC */ typedef struct { np_ulong PRIM_type; /* always N_DATA_IND */ np_ulong DATA_xfer_flags; /* data transfer flags */ } N_data_ind_t; /* Data acknowledgement request */ typedef struct { np_ulong PRIM_type; /* always N_DATACK_REQ */ } N_datack_req_t; /* Data acknowledgement indication */ typedef struct { np_ulong PRIM_type; /* always N_DATACK_IND */ } N_datack_ind_t; /* Expedited data transfer request */ typedef struct { np_ulong PRIM_type; /* always N_EXDATA_REQ */ } N_exdata_req_t; /* Expedited data transfer indication */ typedef struct { np_ulong PRIM_type; /* always N_EXDATA_IND */ } N_exdata_ind_t; /* NC reset request */ typedef struct { np_ulong PRIM_type; /* always N_RESET_REQ */ np_ulong RESET_reason; /* reason for reset */ } N_reset_req_t; /* NC reset indication */ typedef struct { np_ulong PRIM_type; /* always N_RESET_IND */ np_ulong RESET_orig; /* reset originator */ np_ulong RESET_reason; /* reason for reset */ } N_reset_ind_t; /* NC reset response */ typedef struct { np_ulong PRIM_type; /* always N_RESET_RES */ } N_reset_res_t; /* NC reset confirmed */ typedef struct { np_ulong PRIM_type; /* always N_RESET_CON */ } N_reset_con_t; /* NC disconnection request */ typedef struct { np_ulong PRIM_type; /* always N_DISCON_REQ */ np_ulong DISCON_reason; /* reason */ np_ulong RES_length; /* responding address length */ np_ulong RES_offset; /* responding address offset */ np_ulong SEQ_number; /* sequence number */ } N_discon_req_t; /* NC disconnection indication */ typedef struct { np_ulong PRIM_type; /* always N_DISCON_IND */ np_ulong DISCON_orig; /* originator */ np_ulong DISCON_reason; /* reason */ np_ulong RES_length; /* address length */ np_ulong RES_offset; /* address offset */ np_ulong SEQ_number; /* sequence number */ } N_discon_ind_t; /* CLNS PRIMITIVES */ /* Unitdata transfer request */ typedef struct { np_ulong PRIM_type; /* always N_UNITDATA_REQ */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong RESERVED_field[2]; /* reserved field for DLPI compatibility */ } N_unitdata_req_t; /* Unitdata transfer indication */ typedef struct { np_ulong PRIM_type; /* always N_UNITDATA_IND */ np_ulong SRC_length; /* source address length */ np_ulong SRC_offset; /* source address offset */ np_ulong DEST_length; /* source address length */ np_ulong DEST_offset; /* source address offset */ np_ulong ERROR_type; /* reserved field for DLPI compatibility */ } N_unitdata_ind_t; /* Unitdata error indication for CLNS services */ typedef struct { np_ulong PRIM_type; /* always N_UDERROR_IND */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong RESERVED_field; /* reserved field for DLPI compatibility */ np_ulong ERROR_type; /* error type */ } N_uderror_ind_t; /* The following represents a union of all the NPI primitives */ union N_primitives { np_ulong type; N_info_req_t info_req; /* information request */ N_info_ack_t info_ack; /* information acknowledgement */ N_bind_req_t bind_req; /* bind request */ N_bind_ack_t bind_ack; /* bind acknowledgement */ N_unbind_req_t unbind_req; /* unbind request */ N_optmgmt_req_t optmgmt_req; /* options management request */ N_error_ack_t error_ack; /* error acknowledgement */ N_uderror_ind_t uderror_ind; /* unitdata error indication */ N_ok_ack_t ok_ack; /* ok acknowledgement */ N_conn_req_t conn_req; /* connect request */ N_conn_ind_t conn_ind; /* connect indication */ N_conn_res_t conn_res; /* connect response */ N_conn_con_t conn_con; /* connect confirm */ N_data_req_t data_req; /* data request */ N_data_ind_t data_ind; /* data indication */ N_datack_req_t datack_req; /* data acknowledgement request */ N_datack_ind_t datack_ind; /* data acknowledgement indication */ N_exdata_req_t exdata_req; /* expedited data request */ N_exdata_ind_t exdata_ind; /* expedited data indication */ N_reset_req_t reset_req; /* reset request */ N_reset_ind_t reset_ind; /* reset indication */ N_reset_res_t reset_res; /* reset response */ N_reset_con_t reset_con; /* reset confirm */ N_discon_req_t discon_req; /* disconnect request */ N_discon_ind_t discon_ind; /* disconnect indication */ N_unitdata_req_t unitdata_req; /* unitdata request */ N_unitdata_ind_t unitdata_ind; /* unitdata indication */ }; #endif /* SYS_NPI_H */ Glossary
Acronyms
References
Index
Short Table of Contents
Table of Contents
Footnotes(1)Conventions for the time-sequence diagrams are defined in CCITT X.210 (see X.210).) The format of the primitives will be defined later in this document. (2)In the future, this primitive will be modified such that it will allow the NPI to accept either sub-network point of attachment addresses or network addresses. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Last modified: Tue, 28 Oct 2014 22:36:23 GMT Copyright © 2014 OpenSS7 Corporation All Rights Reserved. |