JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Remote Administration Daemon Developer Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Introduction

2.  Concepts

3.  Abstract Data Representation

4.  libadr

5.  Client Libraries

6.  Module Development

7.  rad Best Practices

A.  rad Binary Protocol

Overview

Common Data Formats

Operations

Errors

Time

Object Names

ADR Data

ADR types

Interface Definitions

Connection Initialization

Messages

Operations

INVOKE Operation

GETATTR Operation

SETATTR Operation

LOOKUP Operation

DEFINE Operation

LIST Operation

SUB and UNSUB Operations

Operations

Each operation that a client can perform against a rad server has its own request and response payloads. To facilitate processing without needing to fully decode the payload, these payloads are communicated as variable-lengthed opaque data in the REQUEST and RESPONSE.

For consistency and flexibility, all ADR data referenced by these payloads is communicated as OPTIONAL-DATA, which in turn is wrapped as opaque data.

Table A-39 PAYLOAD-DATA

Field Name
Length
Type
Description
data
Varies
opaque<>
Encapsulated OPTIONAL-DATA

INVOKE Operation

INVOKE makes a method call against a rad object, identified by its object ID.

Table A-40 INVOKE-REQUEST

Field Name
Length
Type
Description
objectid
8
hyper
Object ID, returned by lookup
mname
Varies
string<>
The method to invoke
arguments
Varies
PAYLOAD-DATA<>
Array of method arguments

Table A-41 INVOKE-RESPONSE

Field Name
Length
Type
Description
result
Varies
PAYLOAD-DATA
The return value of method call, if any

INVOKE can fail for the following reasons:

EC-OBJECT

The method call was made but failed for an object-specific reason.

EC-NOTFOUND

objectid is not a known object ID or the object does not have the method mname.

EC-MISMATCH

The wrong number of arguments were provided, or a non-nullable argument was missing.

EC-NOMEM

The server had insufficient resources to complete the operation.

EC-SYSTEM

An unexpected internal error occurred.

GETATTR Operation

GETATTR reads an attribute of a rad object identified by its object ID.

Table A-42 GETATTR-REQUEST

Field Name
Length
Type
Description
objectid
8
hyper
Object ID, returned by lookup
aname
Varies
string<>
The attribute to read

Table A-43 GETATTR-RESPONSE

Field Name
Length
Type
Description
result
Varies
PAYLOAD-DATA
The value of the attribute

GETATTR can fail for the following reasons:

EC-OBJECT

An attempt to read the attribute was made, but failed for an object-specific reason.

EC-NOTFOUND

objectid is not a known object ID or the object does not have the attribute aname.

EC-ILLEGAL

aname refers to a write-only attribute.

EC-NOMEM

The server had insufficient resources to complete the operation.

EC-SYSTEM

An unexpected internal error occurred.

SETATTR Operation

SETATTR reads an attribute of a rad object identified by its object ID. The response payload for a SETATTR request is empty.

Table A-44 SETATTR-REQUEST

Field Name
Length
Type
Description
objectid
8
hyper
Object ID, returned by lookup
aname
Varies
string<>
The attribute to write
value
Varies
PAYLOAD-DATA
The new value of the attribute

SETATTR can fail for the following reasons:

EC-OBJECT

An attempt to write the attribute was made, but failed for an object-specific reason.

EC-NOTFOUND

objectid is not a known object ID or the object does not have the attribute aname.

EC-MISMATCH

aname has a non-nullable value and value was NULL.

EC-ILLEGAL

aname refers to a read-only attribute.

EC-NOMEM

The server had insufficient resources to complete the operation.

EC-SYSTEM

An unexpected internal error occurred.

LOOKUP Operation

LOOKUP attempts to find the named object in the server's namespace, returning the object and interface IDs of the object if it exists. Because an object is not usable until its interface has been defined, the client may request the interface definition be provided as part of the LOOKUP response. For the same reason, the server may unilaterally decide to provide the interface definition if it believes the client has not seen it yet.

Table A-45 LOOKUP-REQUEST

Field Name
Length
Type
Description
name
Varies
NAME-DATA
Object name
define
4
boolean
Include object definition?

Table A-46 LOOKUP-RESPONSE

Field Name
Length
Type
Description
objectid
8
hyper
ID of the object
interfaceid
8
hyper
ID of the object's interface
definition
Varies
INTERFACE-TYPE *
The definition of the object's interface

LOOKUP can fail for the following reasons:

EC-NOTFOUND

name does not exist.

EC-NOMEM

The server had insufficient resources to complete the operation.

EC-SYSTEM

An unexpected internal error occurred.

DEFINE Operation

DEFINE requests a definition of the specified interface ID.

Table A-47 DEFINE-REQUEST

Field Name
Length
Type
Description
interfaceid
8
hyper
Interface ID

Table A-48 DEFINE-RESPONSE

Field Name
Length
Type
Description
definition
varies
INTERFACE-TYPE
The definition of the interface

DEFINE can fail for the following reasons:

EC-NOTFOUND

interfaceid isn't a known interface ID.

EC-NOMEM

The server had insufficient resources to complete the operation.

EC-SYSTEM

An unexpected internal error occurred.

LIST Operation

LIST requests an enumeration of all objects present in the server that match the specified object name pattern. The empty string matches all server objects.

Table A-49 LIST-REQUEST

Field Name
Length
Type
Description
pattern
Varies
NAME-DATA
Object name pattern

Table A-50 LIST-RESPONSE

Field Name
Length
Type
Description
names
Varies
NAME-DATA<>
The definition of the interface

LIST can fail for the following reasons:

EC-NOMEM

The server had insufficient resources to complete the operation.

EC-SYSTEM

An unexpected internal error occurred.

.

SUB and UNSUB Operations

SUB and UNSUB subscribe and unsubscribe, respectively, to the named event of the specified object. The response payload for a successful SUB or UNSUB is empty.

Note that it is possible to receive an EVENT that has been unsubscribed even after a successful UNSUB operation.

Table A-51 SUB-REQUEST

Field Name
Length
Type
Description
objectid
8
hyper
ID of the object
event
Varies
string<>
Event name

Table A-52 UNSUB-RESPONSE

Field Name
Length
Type
Description
objectid
8
hyper
ID of the object
event
Varies
string<>
Event name

SUB can fail for the following reasons:

EC-NOTFOUND

objectid is not a known object ID or the object does not have the event event.

EC-EXISTS

The client is already subscribed to event.

EC-NOMEM

The server had insufficient resources to complete the operation.

EC-SYSTEM

An unexpected internal error occurred.

UNSUB can fail for the following reasons:

EC-NOTFOUND

objectid is not a known object ID the object does not have the event event, or the client isn't subscribed to event.

EC-NOMEM

The server had insufficient resources to complete the operation.

EC-SYSTEM

An unexpected internal error occurred.