Download SunNet Manager 2.2.3 Programmer`s Guide

Transcript
12
/* build the report */
if (!netmgt_build_report(data, &event))
fprintf(stderr, "Cannot build report: %s\n", netmgt_sperror());
/* Finally send the trap report to the rendezvous specified by
netmgt_start_trap. */
struct timeval delta_time;
delta_time.tv_sec = delta_time.tv_usec = 0;
if (!netmgt_send_report(delta_time, 0, 0))
fprintf(stderr, "Cannot send report: %s\n", netmgt_sperror());
12.8 Summary
Now that you know how to initialize and shut down your agent, handle
requests and report errors, you’re ready to integrate your agent into the
SunNet Manager environment.
Procedure for Writing an Agent
12-21