netmgt_fetch_error manual page
Table of Contents

NAME

netmgt_fetch_error - fetch a network management error buffer

SYNOPSIS

bool_t
netmgt_fetch_error(error)
Netmgt_error *error;

DESCRIPTION

netmgt_fetch_error copies the relevant portions of the global netmgt_error structure into the user buffer pointed to by error. The caller should free the memory pointed by error upon return.

Two kinds of errors are possible: generic errors, defined in include file netmgt_errno.h, and errors specific to the agent, defined in the agent schema agentErrors record.

Agent-specific errors can be warnings or fatal errors. Generic errors are always fatal.

INPUT ARGUMENTS

error
pointer to a local error structure that gets filled in with the following:

service_error
generic error code from Netmgt_stat, listed in the include file netmgt_errno.h. Non-generic (agentspecific) errors will use NETMGT_WARNING or NETMGT_FATAL and list the agent error code in the agent_error parameter.
NETMGT_WARNING indicates an agent-specific nonfatal error. The agent will continue to process the request.
NETMGT_FATAL indicates an agent-specific fatal error. The agent will terminate the request.

agent_error
agent-specific error code corresponding to the agentErrors record in the agent schema. For generic errors, this field should be ignored.

message
optional null-terminated string containing additional information about the error. This field is used for information that cannot be included in the agent schema such as the device name involved in the error.

RETURN VALUE

TRUE if successful, else FALSE.

DIAGNOSTICS

FALSE is returned when a NULL error buffer was passed. The old value of netmgt_error is clobbered; it is replaced by the error code from netmgt_fetch_error.

FILES

netmgt_errno.h

SEE ALSO

netmgt_send_error(3n)


Table of Contents