1UPSCLI_FD(3) NUT Manual UPSCLI_FD(3)
2
3
4
6 upscli_fd - Get file descriptor for connection
7
9 #include <upsclient.h>
10
11 int upscli_fd(UPSCONN_t *ups);
12
14 The upscli_fd() function takes the pointer ups to a UPSCONN_t state
15 structure and returns the value of the file descriptor for that
16 connection, if any.
17
18 This may be useful for determining if the connection to upsd(8) has
19 been lost.
20
22 The upscli_fd() function returns the file descriptor, which may be any
23 non-negative number. It returns -1 if an error occurs.
24
26 upscli_connect(3), upscli_strerror(3), upscli_upserror(3)
27
28
29
30Network UPS Tools 09/15/2011 UPSCLI_FD(3)