Previous PageNext Page

Chapter 7 - VINES Session and Presentation Layer Protocols

Introduction

Overview of NetRPC
How applications use NetRPC
NetRPC data types
Remote procedure definitions
NetRPC protocol specification
NetRPC protocol implementation notes
NetRPC at runtime

Overview of NetRPC

Example Client/Service Interaction

Figure 7-1. Client/Service Interaction

The protocol specifies how remote procedures are invoked and how parameters and results of various data types are transmitted.
The specification language provides a simple way of defining the remote interfaces of distributed programs.

A specification language that defines remote interfaces of distributed programs, including the data types of all arguments
A compiler that translates a NetRPC specification into C source code for both the service and client components
A standard library for each machine supported by VINES

Interprocess communications between service and client or service and service. NetRPC transparently converts RPCs into IPC reliable messages on the VINES transport layer.
A rendezvous mechanism with other processes. Services can register on the network by setting up a NetRPC listening port known to the StreetTalk naming service. Client programs and other services can then find the service by name through StreetTalk and initiate communication.
A tasking system that listens for incoming RPCs and distributes them to the appropriate procedures within the service. The tasking system also allows multiple incoming RPCs at any one time.
Reliable data typing for arguments to and from RPCs.
An RPC interface to the StreetTalk naming service and the Server Service.
The ability to handle architectural differences between platforms, such as byte-alignment.

How Applications Use NetRPC

Part One - The specification, written in the NetRPC language, is contained in a specification file and must declare all procedures of the program that are called remotely (the service procedures).

Part Two - The implementation of the service procedures.

Part Three - The client portion of the program that calls the service procedures.

One for the client program
One for the service program

A formal specification of the service procedures using NetRPC data types
The processor class of the service and client machines (such as IBM PC)

General information (for example, the name of the service).
Definitions of the data types used for all data elements passed between the client and the service.
Definitions of each procedure that can be invoked remotely. These definitions include the parameters, in terms of the data types declared, that each procedure requires. These parameters are marked as inputs, outputs, or both to the remote procedure.

Figure 7-2. NetRPC Functions

NetRPC Data Types

Simple types
Constructed types
Constants
Pointer data types

Simple Data Types

Table 7-1. NetRPC Simple Data Types and C Equivalents

Constructed Data Types

Table 7-2. NetRPC Constructed Data Types and C Equivalents


Constants

MAXBUFFERSIZE: CARDINAL = 1024;

#define MAXBUFFERSIZE 1024

Pointer Data Types

Remote Procedure Definitions

IN - The argument passes from client to service.

OUT - The argument passes from service to client.

INOUT - The same argument passes in both directions.

NetRPC Protocol Specification

Figure 7-3. NetRPC Header in a VINES IPC Reliable Message

Call message
Reject message
Abort message
Return message
Search message
Search-all message
Return address message

Call Message

Table 7-3. Call Message Type Parameters

Reject Message

Table 7-4. Reject Message Type Parameters

0x0 - Unknown program number.

0x1 - Unknown version number.

0x2 - No such procedure number.

0x3 - Bad data type. For example, the procedure receives a LONG CARDINAL when it expects an integer.

0x4 to 0xFFFE - Reserved by Banyan.

0xFFFF - UNSPECIFIED error. 0xFFFF in NetRPC language is equivalent to -1.

Abort Message

Table 7-5. Abort Message Type Parameters

Return Message

Table 7-6. Return Message Type Parameters

Search Message

Table 7-7. Search Message Type Parameters

Search-All Message

Table 7-8. Search-All Message Type Parameters

Return Address Message

Table 7-9. Return Address Message Type Parameters

NetRPC Protocol Implementation Notes

Figure 7-4. NetRPC Interaction with IPC

Pointers to objects are not passed. All pointers are not referenced and the associated objects are passed.
Objects of data type string are packed with a 2-byte prefix. The prefix indicates the length of the string and is followed by the elements of the string. The value of the length field is equal to the number of relevant byte positions of the string, not including the null terminator. The packed string within the message is terminated by a null byte only when the number of relevant characters of the string is an odd-numbered value.
Only the relevant number of elements for variable-length data types (for example, sequence types) are packed in the NetRPC message.

NetRPC at Runtime

status = <procedure> (<remoteport>, <arg2>, ... <argn>);

Status of the actual remote procedure
Status of the NetRPC runtime system when it attempts to perform the functions

VINES SMB Protocol

VINES SMB Specification

Note: The Banyan word size is 2 bytes.

Figure 7-5. SMB Header

VINES SMB Protocol Implementation Notes

Core Commands

Table 7-10. Core SMB Support as of VINES 5.5


Extended Commands

Table 7-11. Extended SMB Support as of VINES 5.5

VINES SMB Commands

Table 7-12. VINES SMB Commands as of VINES 5.5


Error Codes

Previous PageTop Of PageNext Page