~ubuntu-branches/ubuntu/saucy/nut/saucy

« back to all changes in this revision

Viewing changes to server/upsd.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2005-07-20 19:48:50 UTC
  • mto: (16.1.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20050720194850-oo61wjr33rrx2mre
Tags: upstream-2.0.2
ImportĀ upstreamĀ versionĀ 2.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#ifndef UPSD_H_SEEN
28
28
#define UPSD_H_SEEN
29
29
 
 
30
#include "attribute.h"
 
31
 
30
32
#include "common.h"
31
 
#include "shared.h"
32
33
 
33
34
#include <sys/socket.h>
34
35
#include <netinet/in.h>
47
48
 
48
49
/* prototypes from upsd.c */
49
50
 
50
 
void addups(const char *fn, const char *name, const char *desc);
51
 
 
52
51
upstype *get_ups_ptr(const char *upsname);
53
 
upstype *findups(const char *upsname);
54
52
int ups_available(const upstype *ups, ctype *client);
55
53
 
56
 
void redefine_ups(const char *fn, const char *name, const char *desc);
57
 
void kick_login_clients(char *upsname);
58
 
int sendback(ctype *client, const char *fmt, ...);
 
54
void kick_login_clients(const char *upsname);
 
55
int sendback(ctype *client, const char *fmt, ...)
 
56
        __attribute__ ((__format__ (__printf__, 2, 3)));
59
57
int send_err(ctype *client, const char *errtype);
60
58
 
61
59
void check_perms(const char *fn);
62
60
 
63
 
extern int upslog_flags;
64
 
 
65
61
/* map commands onto signals */
66
62
 
67
63
#define SIGCMD_STOP     SIGTERM
68
64
#define SIGCMD_RELOAD   SIGHUP
69
65
 
 
66
#ifdef SHUT_RDWR
 
67
#define shutdown_how SHUT_RDWR
 
68
#else
 
69
#define shutdown_how 2
 
70
#endif
 
71
 
70
72
#endif  /* UPSD_H_SEEN */
71