NOTE - Agents do not know data reporting from event reporting; the facility is handled by the Agent Services library.
This "registration" is called the RPC program number, and
is the basis for communication.
NOTE - In the example program in
Section 2.7, "Sample Code," on page 2-6
, you see that the protocol parameter for netmgt_register_callback()
is set (correctly) to IPPROTO_UDP|IPPROTO_TCP. As a result
of this, UDP transport is used for messages of 6144 bytes or less; TCP transport
is used for messages longer than 6144 bytes. Because of this feature, if
you registered, for example, only with UDP, you would not receive any large
reports. If there is a possibility that you will receive reports larger than
6144 bytes, you should register with both TCP and UDP.
NOTE - Error reports can be returned
for any report request. You do not need to register for error reports. However,
your manager application must be able to handle incoming error reports.
See Chapter 3, "Getting Data, Event,
and Trap Reports
," and Chapter 6, "Handling Error Reports
," for more information.
Your application only need call svc_run (3n) (discussed below) to get data reports.
To register with the event dispatcher, call netmgt_register_rendez (3n) with the appropriate parameters to describe the type of event reports you are interested in getting. Figure 2-2 illustrates several applications registered with the event dispatcher.
To register with the event dispatcher, call netmgt_register_rendez (3n) as you would to register your application to receive event reports. Figure 2-3 illustrates several applications registered with the event dispatcher for trap reports.
NOTE - If you only want to receive
trap reports from changes in the database, specify NETMGT_DBMGR_PROG for the
agent_prog argument in the netmgt_register_rendez
(3n) call. No other event or trap reports will be sent from the event dispatcher.