Skip to content
Related Articles

Related Articles

Service Primitives

View Discussion
Improve Article
Save Article
  • Difficulty Level : Medium
  • Last Updated : 24 Jul, 2020

Service generally includes set of various primitives. A primitive simply means Operations.

A Service is specified by set of primitives that are available and given to user or other various entities to access the service. All these primitives simply tell the service to perform some action or to report on action that is taken by peer entity. Each of the protocol that communicates in layered architecture also communicates in peer-to-peer manner with some of its remote protocol entity.

Primitives are called calling functions between the layers that are used to manage communication among the adjacent protocol layers i.e., among the same communication node. The set of primitives that are available generally depends upon the nature of the service that is being provided.

Classification of Service Primitives :

RequestIt represent entity that wants or request service to perform some action or do some work (requesting for connection to remote computer).
IndicationIt represent entity that is to be informed about event (receiver just have received request of connection).
ResponseIt represents entity that is responding to event (receiver is simply sending the permission or allowing to connect).
ConfirmIt represent entity that acknowledges the response to earlier request that has come back (sender just acknowledge the permission to get connected to the remote host).

In the above diagram, these four primitives work as following :

  • Request –
    This primitive is transferred or sent to Layer N by Layer (N+1) to just request for service.

  • Indication –
    This primitive is returned by Layer N to Layer (N+1) to just advise of activation of service that is being requested or of action that is initiated by the service of Layer N.

  • Response –
    This primitive is simply provided by Layer (N+1) in reply to indication primitive. It might acknowledge or complete action that is previously invoked by indication primitive.

  • Confirm –
    This primitive is returned by the Nth layer to the requesting (N+1)st layer to simply acknowledge or complete action that is previously invoked by request primitive.

Parameters of Service Primitives :
Some of the Service Primitives need parameters. These are given below :

  • Connect. Request –
    The initiating entity does this Connect.Request. It just specifies and determines machine that we want to get connected to, type of service that is being desired, and maximum size of packet or message that is used on connection.

  • Connect. Indication –
    The receiver gets this Connect.Indication. It just specifies caller’s identity service that we want to use like FTP and Telnet, etc., and maximum size of packets that are exchanged.

  • Connect. Response –
    It just specifies whether or not it wants to accept or simply reject connection that is being requested.

  • Connect. Confirm –
    It just finds out or determines what happened using the entity that is issuing the initial Connect. Request.

Primitives of Connection-Oriented Service :

ListenWhen server is ready to accept request of incoming connection, it simply put this primitive into action. Listen primitive simply waiting for incoming connection request.
ConnectThis primitive is used to connect the server simply by creating or establishing connection with waiting peer.
AcceptThis primitive simply accepts incoming connection form peer.
ReceiveThese primitive afterwards block the server. Receive primitive simply waits for incoming message.
SendThis primitive is put into action by the client to transmit its request that is followed by putting receive primitive into action to get the reply. Send primitive simply sends or transfer the message to the peer.
DisconnectThis primitive is simply used to terminate or end the connection after which no one will be able to send any of the message.

Primitives of Connectionless Service :

UnitdataUnitdata primitive is simply required to send packet of data or information.
Facility, ReportThis primitive is required for getting details about the performance and working of the network such as delivery statistics or report.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!