The OLC Programmer’s Manual

DRAFT Lucien Van Elsen

DRAFT Revision : 0.1 —July 8 1991

CONTENTS i

Contents

1 Introduction 1 2 Manual Conventions 2 3 Overview of the OLC System 3

3.1 Major Divisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4 General Concepts 4 5 Programming Standard Applications 5

5.1 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

5.1.1 Ofoo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 A Additional Examples 6 B Error Codes 7 C Function Templates 8

1. Introduction

OLC is a networked consulting serviced developed by MIT’s Project Athena starting 1985.

This manual describes the OLC library, the programmer’s interface to OLC. The OLC library consists of a collection of C language functions which allow the programmer to ask and manipulate existing questions. Additional functions are provided in the library to modify the consultant and user databases.

Because this manual is primarily concerned with describing how to write an application which uses OLC, the internal workings of the OLC system are not discussed in detail.

This manual is organized into four main sections as follows:

Overview of the OLC System. This section describes the various components of OLC, and briefly describes how they interact.

General Concepts.

Programming Standard Applications. This section describes the OLC include files, the functions available in the OLC library, and many concepts that are relevant to programming OLC applications.

Advanced Programming Topics. This section describes more advanced topics, including how to send control messages to OLC servers.

2. Manual Conventions

The following typographical conventions are used in this manual:

• A function template is written as follows:

Function template for function:

int function (arg1, arg2)

int  arg1;
char *arg2;

Prerequisite functions: Any functions that must be called before this one.

Possible errors: All possible error codes that could be returned.

• During the discussion of a function, arguments are written in bold type, like arg1.

• Explicit members of a structure are also written in bold type, like member.

• Filenames are written in slanted type, like filename.

• Symbols that are defined in an include file are written in the normal type face, like OLC SERVER.

• Strings that should be entered explicitly are written between quotes, like “lwvanels”.

Figure 1: Interaction between the various parts of a OLC system.

3. Overview of the OLC System

3.1. Major Divisions

• The clients:

• The OLC servers:

4. General Concepts

The following pages describe two concepts that may be useful to an applications programmer: The subscription paradigm for notice distribution and the user location system. The subscription paradigm is used to determine who will receive a given notice. The user location system is used to locate users.

5. Programming Standard Applications

The following sections describe the concepts involved in using the OLC library, and the function calls that would be used in a standard OLC application.

5.1. Initialization

5.1.1. Ofoo Function template for foobar:

code t foobar (port)

unsigned port;

Prerequisite functions: Ofoo Possible errors: Unix errors, foobar 6 A ADDITIONAL EXAMPLES

A. Additional Examples

7

B. Error Codes C. Function Templates

Function template for foobar:

code t foobar (port)

unsigned port;

Prerequisite functions: Ofoo Possible errors: Unix errors, foobar