[Top] [Prev] [Next] [Bottom]

Solstice Site/SunNet/Domain Manager
Application and Agent Development Guide


Part No: 802-6109-10
Revision A, June 1996

Contents

Credits

List of Figures

List of Tables

Preface

1. Overview of Writing Management Applications


1.1 Manager/Agent Model

1.2 Manager Services

1.3 Default File Locations

1.3.1 API Examples Source Code

1.3.2 Header Files

1.3.3 Default Locations for Various Files

2. Registering for Data, Event, and Trap Reports


2.1 Background

2.2 Data Reports

2.3 Event Reports

2.4 Trap Reports

2.5 Waiting for Reports

2.6 Summary

2.7 Sample Code

3. Getting Data, Event, and Trap Reports


3.1 Message Information

3.2 Data Reports

3.3 Event Reports

3.4 Trap Reports

3.5 Printing Data

3.6 Summary

3.7 Sample Code

4. Requesting Data and Event Reports


4.1 Formulating a Request

4.2 Optional Arguments

4.3 Count and Interval

4.4 Request Flags

4.5 Setting Thresholds

4.6 Sending the Request

4.7 Stopping Requests

4.8 Summary

4.9 Sample Code

5. Setting Attribute Values


5.1 Specify Target System

5.2 Set Optional Arguments

5.3 Specify Attribute Values

5.4 Register to Receive Results

5.5 Send Set Request

5.6 Get Set Results

5.7 Sample Code

6. Handling Error Reports


6.1 Agent-Specific Errors

6.2 Generic Errors

6.3 Sample Code

7. Unregistering the Application


7.1 Unregistering from the Event Dispatcher

7.2 Unregistering the Transient RPC

7.3 Sample Code

8. Using the Database API Functions


8.1 Building Your Program

8.2 Static and Dynamic Linking

8.2.1 Dynamic Linking

8.2.2 Static Linking

8.3 Error Handling

8.4 Opening the Database

8.5 Locking and Unlocking the Database

8.6 Retrieving Element Information from the Database

8.6.1 Retrieving Information for a Single Element

8.6.2 Retrieving Elements of a Given Type

8.7 Adding a New Element Instance into the Database

8.8 Deleting an Element Instance from the Database

8.9 Modifying an Element in the Database

8.10 Saving Database Records to an ASCII File

8.11 Loading a Database File into the Console

8.12 Saving the Runtime Database to an ASCII File

9. Miscellaneous Topics


9.1 The Agent Schema

9.2 Agent Identification

9.3 Security

9.4 Dispatching Incoming RPC Calls

9.5 Blocking RPCs in XView

9.6 Agents and Managers that Generate Traps

9.7 Summary

10. Overview of Writing Agents


10.1 Manager-Agent Model

10.2 Types of Agents

10.3 Steps for Writing an Agent

11. Writing an Agent Schema


11.1 What is an Agent Schema?

11.2 Agent Schema Attributes

11.3 Agent Schema Syntax

11.3.1 Syntax Rules

11.3.2 Conventions

11.3.3 Defining an Agent

11.3.4 Defining an Agent Enumeration

11.3.5 Defining a Group and Table

11.3.6 Defining an Attribute

11.3.7 Defining an Agent Error

11.4 Schema File Conventions

11.5 An Example Agent Schema

11.6 Mapping Feature

12. Procedure for Writing an Agent


12.1 Agent Initialization and Startup

12.2 Agent Shutdown

12.3 Request Verification and Dispatching

12.3.1 Verification and Dispatching Routine Parameters

12.4 Sending Reports

12.5 Handling Set Requests

12.5.1 Verifying the Request

12.5.2 Set Attribute Values

12.5.3 Send a Status Report

12.5.4 Sample Code

12.6 Error Reporting

12.7 Generating and Sending Asynchronous Reports (Traps)

12.7.1 Sample Code

12.8 Summary

13. Testing and Integration


13.1 Building Your Program

13.1.1 Header Files

13.1.2 Static and Dynamic Linking

13.1.3 Static Linking

13.1.4 API Differences from the 2.0 Release

13.1.9 Assign an Agent Name

13.1.10 Register the Agent RPC Program Number

13.2 Test the Agent

13.2.1 snm_cmd

13.2.2 Verifying the Agent Schema

13.2.3 Test the Agent

13.3 Console Integration

13.3.1 Install the Agent

13.3.2 Update the MDB

13.4 Summary

14. Converting an Existing Application to an Agent


14.1 Write and Test the Standalone Program

14.2 Organize the Information and Write a Schema File

14.3 isGroup() Function

14.4 Rewrite with the Reporting Interface

14.4.1 Modify the Application

14.4.2 Build with Report Interface

14.4.3 Test with Report Interface

14.5 Build the Agent and Test with snm_cmd

14.6 Test the Agent with the Console

A. Man Page Summary for Writers of Manager Applications


A.1 Setting the MANPATH Variable

A.1.1 MANPATH Setting for Solaris 2.4

A.1.2 MANPATH Setting for Solaris 1.1.1

A.2 Utilities

A.3 Manager Services Library Routines

A.4 Database Library Routines

B. Man Page Summary for Writers of Agent Software


B.1 Setting the MANPATH Variable

B.1.1 MANPATH Setting for Solaris 2.4

B.1.2 MANPATH Setting for Solaris 1.1.1

B.2 Utilities

B.3 Agent Services Routines

B.4 File Format

Index


[Top] [Prev] [Next] [Bottom]

Copyright 1996 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA 94043-1100 USA. All Rights Reserved