1 /* 2 * protocol.h -- communications protocols 3 * $Id: protocol.h 4767 2012-06-16 20:48:51Z sezero $ 4 * 5 * Copyright (C) 1996-1997 Id Software, Inc. 6 * Copyright (C) 1997-1998 Raven Software Corp. 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or (at 11 * your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, but 14 * WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 * 17 * See the GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License along 20 * with this program; if not, write to the Free Software Foundation, Inc., 21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 */ 23 24 #ifndef __HWM_PROTOCOL_H 25 #define __HWM_PROTOCOL_H 26 27 #define PORT_MASTER 26900 28 #define PORT_SERVER 26950 29 30 //========================================= 31 32 // out of band message id bytes 33 34 // M = master, S = server, C = client, A = any 35 // the second character will always be \n if the message isn't a single 36 // byte long (?? not true anymore?) 37 38 #define A2S_ECHO 'g' // echo back a message 39 40 #define S2C_CHALLENGE 'c' 41 42 #define S2C_CONNECTION 'j' 43 #define A2A_PING 'k' // respond with an A2A_ACK 44 #define A2A_ACK 'l' // general acknowledgement without info 45 #define A2A_NACK 'm' // [+ comment] general failure 46 #define A2C_PRINT 'n' // print a message on client 47 48 #define S2M_HEARTBEAT 'a' // + serverinfo + userlist + fraglist 49 #define A2C_CLIENT_COMMAND 'B' // + command line 50 #define S2M_SHUTDOWN 'C' 51 52 #define M2C_SERVERLST 'd' // + \n + hw server port list 53 54 #endif /* __HWM_PROTOCOL_H */ 55 56