/* * led-protocol.h - LED protocol numbers */ /* * This file is part of ledclient, tools for controlling LEDs remotely. * ledclient is Copyright 2002 Ian Jackson. * * ledclient is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This program and documentation is distributed in the hope that it * will be useful, but without any warranty; without even the implied * warranty of merchantability or fitness for a particular * purpose. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with ledclient; if not, write to the Free Software * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA, or email grond-maint@chiark.greenend.org.uk. */ /* * This file is dual-licensed, as an alternative to distribution under the * GPL v2 or later as above: * * This file is Copyright 2002 Ian Jackson. * * You may redistribute and use this file in source and binary forms, * with or without modification, provided that the following * conditions are met: * * 1. Redistributions of source code must retain this copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LED_PROTO_H #define LED_PROTO_H #define LED_PROTO_VERSION 0 #define LED_PROTO_RPFLAG 0200 #define LED_PROTO_REQ_SET 0001 #define LED_PROTO_REP_VALUES 0201 #define LED_PROTO_REP_ERROR 0202 #define LED_PROTO_SECUR_PASSWORD32 1 #define LED_PROTO_ERRCODE_FAILED 0 #define LED_PROTO_ERRCODE_UNSUPP_VER 1 #define LED_PROTO_ERRCODE_UNSUPP_OPCODE 2 #define LED_PROTO_ERRCODE_UNSUPP_SECUR 3 #define LED_PROTO_ERRCODE_DENIED 4 #define LED_PROTO_ERRCODE_OUTOFRANGE 5 #define LED_PROTO_ERRCODE_UNSUPP_VALCODE 6 #define LED_PROTO_ERRCODE_MALFORMED 7 #define LED_PROTO_ERRCODE_UNSUPP_FLASH 8 #define LED_PROTO_ERRCODE_UNSUPP_MONOONLY 9 #define LED_PROTO_ERRCODE_UNSUPP_BIONLY 10 #define LED_PROTO_ERRCODE_NOTNZCOOKIE 11 #define LED_PROTO_VALUE_IS_SPECCODE(v) (((v) & 0300) == 0300) #define LED_PROTO_VALUE_ALLOCATE 0300 #define LED_PROTO_VALUE_NOOP 0301 #define LED_PROTO_VALUE_BADCOOKIE 0302 #endif /*LED_PROTO_H*/