2013-11-24 15:00:12 +00:00
|
|
|
LIBNUTCLIENT_MISC(3)
|
|
|
|
====================
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
|
2022-06-29 10:37:36 +00:00
|
|
|
libnutclient_misc, nutclient_authenticate, nutclient_logout,
|
|
|
|
nutclient_device_login, nutclient_get_device_num_logins,
|
2013-11-24 15:00:12 +00:00
|
|
|
nutclient_device_master, nutclient_device_forced_shutdown -
|
2022-06-29 10:37:36 +00:00
|
|
|
Miscellaneous functions in Network UPS Tools high-level client access library
|
2013-11-24 15:00:12 +00:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
|
|
|
|
|
|
|
#include <nutclient.h>
|
|
|
|
|
|
|
|
typedef void* NUTCLIENT_t;
|
|
|
|
|
2022-06-29 10:37:36 +00:00
|
|
|
void nutclient_authenticate(
|
|
|
|
NUTCLIENT_t client,
|
|
|
|
const char* login, const char* passwd);
|
|
|
|
|
2013-11-24 15:00:12 +00:00
|
|
|
void nutclient_logout(NUTCLIENT_t client);
|
2022-06-29 10:37:36 +00:00
|
|
|
|
2013-11-24 15:00:12 +00:00
|
|
|
void nutclient_device_login(NUTCLIENT_t client, const char* dev);
|
2022-06-29 10:37:36 +00:00
|
|
|
|
2013-11-24 15:00:12 +00:00
|
|
|
int nutclient_get_device_num_logins(NUTCLIENT_t client, const char* dev);
|
2022-06-29 10:37:36 +00:00
|
|
|
|
|
|
|
void nutclient_device_primary(NUTCLIENT_t client, const char* dev);
|
|
|
|
/* OBSOLETED name: */
|
2013-11-24 15:00:12 +00:00
|
|
|
void nutclient_device_master(NUTCLIENT_t client, const char* dev);
|
2022-06-29 10:37:36 +00:00
|
|
|
|
2013-11-24 15:00:12 +00:00
|
|
|
void nutclient_device_forced_shutdown(NUTCLIENT_t client, const char* dev);
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
|
2022-06-29 10:37:36 +00:00
|
|
|
The *nutclient_authenticate()* function authenticates the user.
|
2013-11-24 15:00:12 +00:00
|
|
|
|
2022-06-29 10:37:36 +00:00
|
|
|
* 'login' is the user name.
|
2013-11-24 15:00:12 +00:00
|
|
|
|
2022-06-29 10:37:36 +00:00
|
|
|
* 'passwd' is the user password.
|
2013-11-24 15:00:12 +00:00
|
|
|
|
2022-06-29 10:37:36 +00:00
|
|
|
The *nutclient_logout()* function disconnects gracefully from the server.
|
2013-11-24 15:00:12 +00:00
|
|
|
|
2022-06-29 10:37:36 +00:00
|
|
|
The *nutclient_device_login()* function logs the fact that a system
|
2013-11-24 15:00:12 +00:00
|
|
|
is drawing power from this UPS.
|
|
|
|
|
2022-06-29 10:37:36 +00:00
|
|
|
The *nutclient_get_device_num_logins()* function retrieves the number of
|
|
|
|
clients which have been logged for this device.
|
2013-11-24 15:00:12 +00:00
|
|
|
|
2022-06-29 10:37:36 +00:00
|
|
|
The *nutclient_device_master()* and *nutclient_device_primary()* (note:
|
|
|
|
the former is obsoleted since NUT v2.8.0 in favor of the latter) functions
|
|
|
|
make sure that primary-mode functions like FSD are available if necessary.
|
2013-11-24 15:00:12 +00:00
|
|
|
|
2022-06-29 10:37:36 +00:00
|
|
|
The *nutclient_device_forced_shutdown()* function sets the "forced shutdown"
|
|
|
|
flag on the device.
|
2013-11-24 15:00:12 +00:00
|
|
|
|
|
|
|
'dev' is the device name.
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
2022-06-29 10:37:36 +00:00
|
|
|
|
2013-11-24 15:00:12 +00:00
|
|
|
linkman:libnutclient[3]
|