| |
| ..2.6 Summary | 2-6 |
| ..2.7 Sample Code | 2-6 |
4. Getting Data, Event, and Trap Reports | 3-1 |
| ..3.1 Message Information | 3-2 |
| ..3.2 Data Reports | 3-2 |
| ..3.3 Event Reports | 3-3 |
| ..3.4 Trap Reports | 3-4 |
| ..3.5 Printing Data | 3-4 |
| ..3.6 Summary | 3-5 |
| ..3.7 Sample Code | 3-5 |
5. Requesting Data and Event Reports | 4-1 |
| ..4.1 Formulating a Request | 4-1 |
| ..4.2 Optional Arguments | 4-2 |
| ..4.3 Count and Interval | 4-5 |
| ..4.4 Request Flags | 4-6 |
| ..4.5 Setting Thresholds | 4-7 |
| ..4.6 Sending the Request | 4-7 |
| ..4.7 Stopping Requests | 4-8 |
| ..4.8 Summary | 4-9 |
| ..4.9 Sample Code | 4-9 |
6. Setting Attribute Values | 5-1 |
| ..5.1 Specify Target System | 5-1 |
| ..5.2 Set Optional Arguments | 5-2 |
| ..5.3 Specify Attribute Values | 5-3 |
| |
| ..5.4 Register to Receive Results | 5-3 |
| ..5.5 Send Set Request | 5-3 |
| ..5.6 Get Set Results | 5-4 |
| ..5.7 Sample Code | 5-4 |
7. Handling Error Reports | 6-1 |
| ..6.1 Agent-Specific Errors | 6-1 |
| ..6.2 Generic Errors | 6-2 |
| ..6.3 Sample Code | 6-2 |
8. Unregistering the Application | 7-1 |
| ..7.1 Unregistering from the Event Dispatcher | 7-1 |
| ..7.2 Unregistering the Transient RPC | 7-1 |
| ..7.3 Sample Code | 7-2 |
9. Using the Database API Functions | 8-1 |
| ..8.1 Building Your Program | 8-1 |
| ..8.2 Static and Dynamic Linking | 8-2 |
| .....8.2.1 Dynamic Linking | 8-2 |
| .....8.2.2 Static Linking | 8-3 |
| ..8.3 Error Handling | 8-4 |
| ..8.4 Opening the Database | 8-5 |
| ..8.5 Locking and Unlocking the Database | 8-5 |
| ..8.6 Retrieving Element Information from the Database | 8-6 |
| .....8.6.1 Retrieving Information for a Single Element | 8-7 |
| .....8.6.2 Retrieving Elements of a Given Type | 8-11 |
| ..8.7 Adding a New Element Instance into the Database | 8-13 |
| |
| ...8.8 Deleting an Element Instance from the Database | 8-15 |
| ...8.9 Modifying an Element in the Database | 8-16 |
| ..8.10 Saving Database Records to an ASCII File | 8-19 |
| ...8.11 Loading a Database File into the Console | 8-20 |
| ..8.12 Saving the Runtime Database to an ASCII File | 8-20 |
10. Miscellaneous Topics | 9-1 |
| ...9.1 The Agent Schema | 9-1 |
| ...9.2 Agent Identification | 9-2 |
| ...9.3 Security | 9-2 |
| ...9.4 Dispatching Incoming RPC Calls | 9-3 |
| ...9.5 Blocking RPCs in XView | 9-4 |
| ...9.6 Agents and Managers that Generate Traps | 9-4 |
| ...9.7 Summary | 9-4 |
11. Writing Agents | 5 |
12. Overview of Writing Agents | 10-1 |
| ..10.1 Manager-Agent Model | 10-1 |
| ..10.2 Types of Agents | 10-3 |
| ..10.3 Steps for Writing an Agent | 10-4 |
13. Writing an Agent Schema | 11-1 |
| ...11.1 What is an Agent Schema? | 11-2 |
| ...11.2 Agent Schema Attributes | 11-2 |
| ...11.3 Agent Schema Syntax | 11-4 |
| .....11.3.1 Syntax Rules | 11-4 |
| .....11.3.2 Conventions | 11-4 |
| |
| .....11.3.3 Defining an Agent | 11-5 |
| .....11.3.4 Defining an Agent Enumeration | 11-7 |
| .....11.3.5 Defining a Group and Table | 11-8 |
| .....11.3.6 Defining an Attribute | 11-9 |
| .....11.3.7 Defining an Agent Error | 11-11 |
| ...11.4 Schema File Conventions | 11-12 |
| ...11.5 An Example Agent Schema | 11-12 |
| ...11.6 Mapping Feature | 11-15 |
14. Procedure for Writing an Agent | 12-1 |
| ..12.1 Agent Initialization and Startup | 12-3 |
| ..12.2 Agent Shutdown | 12-3 |
| ..12.3 Request Verification and Dispatching | 12-4 |
| .....12.3.1 Verification and Dispatching Routine Parameters . | 12-6 |
| ..12.4 Sending Reports | 12-10 |
| ..12.5 Handling Set Requests | 12-11 |
| .....12.5.1 Verifying the Request | 12-12 |
| .....12.5.2 Set Attribute Values | 12-13 |
| .....12.5.3 Send a Status Report | 12-13 |
| .....12.5.4 Sample Code | 12-13 |
| ..12.6 Error Reporting | 12-16 |
| ..12.7 Generating and Sending Asynchronous Reports (Traps) | 12-17 |
| .....12.7.1 Sample Code | 12-19 |
| ..12.8 Summary | 12-21 |
15. Testing and Integration | 13-1 |
| |
| ..13.1 Building Your Program | 13-1 |
| .....13.1.1 Header Files | 13-1 |
| .....13.1.2 Static and Dynamic Linking | 13-2 |
| .....13.1.3 Static Linking | 13-3 |
| .....13.1.4 API Differences from the 2.0 Release | 13-4 |
| .....13.1.9 Assign an Agent Name | 13-6 |
| ....13.1.10 Register the Agent RPC Program Number | 13-6 |
| ..13.2 Test the Agent | 13-7 |
| .....13.2.1 snm_cmd | 13-8 |
| .....13.2.2 Verifying the Agent Schema | 13-9 |
| .....13.2.3 Test the Agent | 13-9 |
| ..13.3 Console Integration | 13-10 |
| .....13.3.1 Install the Agent | 13-10 |
| .....13.3.2 Update the MDB | 13-11 |
| ..13.4 Summary | 13-11 |
16. Converting an Existing |
| ..Application to an Agent | 14-1 |
| ..14.1 Write and Test the Standalone Program | 14-2 |
| ..14.2 Organize the Information and Write a Schema File | 14-7 |
| ..14.3 isGroup() Function | 14-9 |
| ..14.4 Rewrite with the Reporting Interface | 14-11 |
| .....14.4.1 Modify the Application | 14-17 |
| .....14.4.2 Build with Report Interface | 14-22 |
| .....14.4.3 Test with Report Interface | 14-22 |
| |
| ..14.5 Build the Agent and Test with snm_cmd | 14-23 |
| ..14.6 Test the Agent with the Console | 14-25 |
17. Man Page Summaries | 27 |
A. Man Page Summary for Writers of Manager Applications | A-1 |
| ...A.1 Setting the MANPATH Variable | A-1 |
| .....A.1.1 MANPATH Setting for Solaris 2.4 | A-1 |
| .....A.1.2 MANPATH Setting for Solaris 1.1.1 | A-2 |
| ...A.2 Utilities | A-2 |
| ...A.3 Manager Services Library Routines | A-3 |
| ...A.4 Database Library Routines | A-7 |
B. Man Page Summary for Writers of Agent Software | B-1 |
| ...B.1 Setting the MANPATH Variable | B-1 |
| ......B.1.1 MANPATH Setting for Solaris 2.4 | B-1 |
| ......B.1.2 MANPATH Setting for Solaris 1.1.1 | B-2 |
| ...B.2 Utilities | B-2 |
| ...B.3 Agent Services Routines | B-2 |
| ...B.4 File Format | B-4 |
| ..Index | Index-1 |