1 /* netcmds.h - upsd support structure details
3 Copyright (C) 2001 Russell Kroll <rkroll@exploits.org>
4 2005 Arnaud Quette <arnaud.quette@free.fr>
5 2007 Peter Selinger <selinger@users.sourceforge.net>
6 2010 Arjen de Korte <adkorte-guest@alioth.debian.org>
7 2012 Emilien Kia <kiae.dev@gmail.com>
8 2020 Jim Klimov <jimklimov@gmail.com>
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #ifndef NUT_NETCMDS_H_SEEN
26 #define NUT_NETCMDS_H_SEEN 1
28 #include "nut_ctype.h"
36 #include "netinstcmd.h"
38 #define FLAG_USER 0x0001 /* username and password must be set */
48 void (*func
)(nut_ctype_t
*client
, size_t numargs
, const char **arg
);
51 { "VER", net_ver
, 0 },
52 { "NETVER", net_netver
, 0 },
53 { "PROTVER", net_netver
, 0 }, /* aliased since NUT 2.8.0 */
54 { "HELP", net_help
, 0 },
55 { "STARTTLS", net_starttls
, 0 },
57 { "GET", net_get
, 0 },
58 { "LIST", net_list
, 0 },
60 { "USERNAME", net_username
, 0 },
61 { "PASSWORD", net_password
, 0 },
63 { "LOGIN", net_login
, FLAG_USER
},
64 { "LOGOUT", net_logout
, 0 },
65 /* NOTE: Protocol in NUT 2.8.0 allows to handle
66 * master/primary to rename/alias the routine.
68 { "PRIMARY", net_primary
, FLAG_USER
},
69 { "MASTER", net_master
, FLAG_USER
},
71 { "FSD", net_fsd
, FLAG_USER
},
73 { "SET", net_set
, FLAG_USER
},
74 { "INSTCMD", net_instcmd
, FLAG_USER
},
76 { NULL
, (void(*)(struct nut_ctype_s
*, size_t, const char **))(NULL
), 0 }
85 #endif /* NUT_NETCMDS_H_SEEN */