Download SunNet Manager 2.2.3 Programmer`s Guide
Transcript
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 14. 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 viii SunNet Manager 2.2.3 Programmer’s Guide