This chapter does not discuss high-level topics such as user-interface strategies, data reduction, analysis and presentation, and so on.
When a request is sent to an agent, the agent examines the request for the group and attribute names it understands so it can do the requested operation. If it does not understand the names in the request, it will reply with an error message.
The agent schema is contained in a regular UNIX file in ASCII format. The format is straightforward so manager applications--whether standard UNIX tools or custom applications--can spend as little time as possible parsing this file. The format of the agent schema is listed in snm_schema (5).
snm_parser(1) is an example application that parses schema files; the parser program is provided in source form. See the source program for more information.
The Manager Services library function netmgt_request_agent_ID (3n) sends a request to the agent for any identifying information it can provide. The information returned includes the name of the agent, agent schema serial number, and the architecture of the machine where it is running. Not all data is always returned. For instance, the host architecture information may not be available.
The manager application can use this information to compare the agent schema serial number with the serial number the agent says represents its information base.
If you are writing a manager that runs under XView, you can request that the XView notifier handle all the incoming RPC dispatching for you. To do this, call the XView procedure as follows:
notify_enable_rpc_svc(TRUE);
before you call xv_main_loop. Then, any incoming RPC calls will be dispatched to your code by the XView notifier. Note that the function notify_enable_rpc_svc(TRUE) is not documented in the XView Programming Manual.
If you are not writing an XView application and svc_run is too restrictive, you can use a select(2) loop to "wait for work." To use the select loop, you must build a mask consisting of the interesting file descriptors: both yours and any used by the incoming RPCs. To aid in building this mask, the RPC libraries export a global variable that has all the incoming RPC file descriptors set. The global variable is: