netmgt_start_trap manual page
Table of Contents

NAME

netmgt_start_trap - set context for sending traps

SYNOPSIS

bool_t
netmgt_start_trap(system, agent_prog, agent_vers, group, rendez_host, rendez_prog, rendez_vers, priority, timeout) char *system;
u_int agent_prog;
u_int agent_vers;
char *group;
char *rendez_host;
u_int rendez_prog;
u_int rendez_vers;
u_int priority;
struct timeval timeout;

DESCRIPTION

netmgt_start_trap sets the context for sending one or more trap reports. Agents must call this function once before calling netmgt_build_report(3n) and netmgt_send_report(3n) to send a trap. Agents should not call this function again to send another trap unless they need to change trap parameters such as system or group.

INPUT ARGUMENTS

system
name of the system associated with the trap.

agent_prog
RPC program number of the agent sending the trap. It may be set to zero if unknown.

agent_vers
RPC program version number of the agent sending the trap. It is set to zero if agent_prog has been set to zero.

group
group within the agent schema to which the trap attributes belong. It may be set to ``trap'' if the attributes are not defined in any agent schema.

rendez_host
name of the system where the trap should be sent.

rendez_prog
rendezvous for the trap. This should be set to specify the event dispatcher (NETMGT_EVENT_PROG).

rendez_vers
version number of the rendezvous for the trap. This should be set to specify the event dispatcher's version (NETMGT_EVENT_VERS).

priority
priority of the trap. The value must be one of NETMGT_LOW_PRIORITY, NETMGT_MEDIUM_PRIORITY, or NETMGT_HIGH_PRIORITY.

timeout
maximum time (in seconds) that netmgt_send_report(3n) is to wait for a reply from the rendezvous when sending a trap report.

RETURN VALUE

TRUE if successful, otherwise FALSE.

DIAGNOSTICS

If FALSE is returned, global variable netmgt_error indicates the error. The caller can get the reason for the error with netmgt_fetch_error(3n).

SEE ALSO

netmgt_build_report(3n), netmgt_send_report(3n)


Table of Contents