Site/SunNet/Domain Manager Reference Manual
  Cerca solo questo libro
Scarica il manuale in formato PDF

NAME

netmgt_alloc_manager_id, netmgt_free_manager_id, netmgt_set_manager_id, netmgt_get_manager_id - manipulate the manager application ID

SYNOPSIS

u_int   netmgt_alloc_manager_id()

bool_t netmgt_free_manager_id(manager_id)
u_int   manager_id;

bool_t netmgt_set_manager_id(manager_id)
u_int   manager_id;

u_int
netmgt_get_manager_id()

DESCRIPTION

A manager ID is an unsigned integer associated with a individual manager application. It is transported in SunNet Manager request and report messages and used to distinguish among requests started by a number of manager applications running on the same workstation.
netmgt_alloc_manager_id() allocates a unique ID to the calling manager application. This ID is the inode number of a temporary file in the SunNet Manager directory /etc/opt/SUNWconn/snm/snm.id for Solaris 2.x and /etc/snm/snm.id for Solaris 1.x. This function may only be called by applications that send data, event, or set requests. Manager applications should call netmgt_free_manager_id() to deallocate the manager ID when they are finished.
netmgt_set_manager_id() sets the manager ID field in data, event, and set requests to manager_id . This function may only be called by applications that send data, event, or set requests. It should only be called after a call to netmgt_set_instance(3N) and before a call to netmgt_request_data(3N), netmgt_request_event(3N), or
netmgt_request_set(3N).
netmgt_get_manager_id() returns the value of the manager ID field in data, event, set, trap and error reports. This function may only be called by applications that receive such reports.
netmgt_free_manager_id() deallocates a manager ID previously allocated by a call to netmgt_alloc_manager_id() . This function unlinks the temporary file in the SunNet Manager directory /etc/opt/SUNWconn/snm/snm.id for Solaris 2.x and /etc/snm/snm.id for Solaris 1.x. This function may only be called by applications that send data, event, or set requests.

RETURN VALUES

netmgt_alloc_manager_id() returns a positive integer if successful; otherwise, it returns zero.
netmgt_set_manager_id() and netmgt_free_manager_id() return TRUE if successful; otherwise, they return FALSE.

FILES

/etc/opt/SUNWconn/snm/snm.id (Solaris 2.x)
/etc/snm/snm.id (Solaris 1.x)

SEE ALSO

netmgt_kill_request2(3N), netmgt_set_instance(3N)

NOTES

These functions only work if the SunNet Manager activity daemon na.activity is installed on the local system since it acts as a manager ID server.
netmgt_alloc_manager_id() creates a temporary file in /etc/opt/SUNWconn/snm/snm.id on Solaris 2.x and in /etc/snm/snm.id on Solaris 1.x for each call. If applications do not call netmgt_free_manager_id() to deallocate manager IDs, unused temporary files will accumulate in /etc/opt/SUNWconn/snm/snm.id for Solaris 2.x and in /etc/snm/snm.id for Solaris 1.x which must then be removed manually.