| 1 | /* |
| 2 | * Copyright (C) 1998 Mark Baysinger ([email protected]) |
| 3 | * Copyright (C) 1998,1999,2000,2001 Ross Combs ([email protected]) |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; either version 2 |
| 8 | * of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 18 | */ |
| 19 | #ifndef INCLUDED_UDP_PROTOCOL_TYPES |
| 20 | #define INCLUDED_UDP_PROTOCOL_TYPEScxx . . $ `src/common/udp_protocol.h:20:9`! |
| 21 | |
| 22 | namespace pvpgncxx . . $ pvpgn/ |
| 23 | { |
| 24 | |
| 25 | /* |
| 26 | * This file describes the UDP chat packets. The game packets aren't |
| 27 | * in here and would probably go in another file. The first 4 bytes |
| 28 | * seem to be a little-endian 32 bit integer id for the packet type. |
| 29 | * FIXME: add more UDP packet types |
| 30 | */ |
| 31 | /******************************************************/ |
| 32 | typedef structcxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_0# |
| 33 | { |
| 34 | bn_intcxx . . $ pvpgn/bn_int# typecxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_0#type.; |
| 35 | } PACKED_ATTRcxx . . $ `src/common/setup_before.h:383:10`!() t_udp_headercxx . . $ pvpgn/t_udp_header#; |
| 36 | /******************************************************/ |
| 37 | |
| 38 | |
| 39 | /******************************************************/ |
| 40 | typedef structcxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_1# |
| 41 | { |
| 42 | t_udp_headercxx . . $ pvpgn/t_udp_header# hcxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_1#h.; |
| 43 | } PACKED_ATTRcxx . . $ `src/common/setup_before.h:383:10`!() t_udp_genericcxx . . $ pvpgn/t_udp_generic#; |
| 44 | /******************************************************/ |
| 45 | |
| 46 | |
| 47 | /******************************************************/ |
| 48 | /* client echos back with UDPOK packet */ |
| 49 | /* |
| 50 | 05 00 00 00 74 65 6E 62 ....tenb |
| 51 | */ |
| 52 | #define SERVER_UDPTESTcxx . . $ `src/common/udp_protocol.h:52:9`! 0x00000005 |
| 53 | typedef structcxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_2# |
| 54 | { |
| 55 | t_udp_headercxx . . $ pvpgn/t_udp_header# hcxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_2#h.; |
| 56 | bn_intcxx . . $ pvpgn/bn_int# bnettagcxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_2#bnettag.; /* 74 65 6E 62 */ |
| 57 | } PACKED_ATTRcxx . . $ `src/common/setup_before.h:383:10`!() t_server_udptestcxx . . $ pvpgn/t_server_udptest#; |
| 58 | /******************************************************/ |
| 59 | |
| 60 | |
| 61 | /******************************************************/ |
| 62 | /* |
| 63 | 07 00 00 00 49 41 19 00 ....IA.. |
| 64 | |
| 65 | 07 00 00 00 11 60 1D 00 .....`.. |
| 66 | */ |
| 67 | #define CLIENT_UDPPINGcxx . . $ `src/common/udp_protocol.h:67:9`! 0x00000007 |
| 68 | typedef structcxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_3# |
| 69 | { |
| 70 | t_udp_headercxx . . $ pvpgn/t_udp_header# hcxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_3#h.; |
| 71 | bn_intcxx . . $ pvpgn/bn_int# unknown1cxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_3#unknown1.; /* time? */ |
| 72 | } PACKED_ATTRcxx . . $ `src/common/setup_before.h:383:10`!() t_client_udppingcxx . . $ pvpgn/t_client_udpping#; |
| 73 | /******************************************************/ |
| 74 | |
| 75 | |
| 76 | /******************************************************/ |
| 77 | /* |
| 78 | From Brood War 1.04 |
| 79 | 08 00 00 00 75 EC A0 28 ....u..( |
| 80 | */ |
| 81 | #define CLIENT_SESSIONADDR1cxx . . $ `src/common/udp_protocol.h:81:9`! 0x00000008 |
| 82 | typedef structcxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_4# |
| 83 | { |
| 84 | t_udp_headercxx . . $ pvpgn/t_udp_header# hcxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_4#h.; |
| 85 | bn_intcxx . . $ pvpgn/bn_int# sessionkeycxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_4#sessionkey.; |
| 86 | } PACKED_ATTRcxx . . $ `src/common/setup_before.h:383:10`!() t_client_sessionaddr1cxx . . $ pvpgn/t_client_sessionaddr1#; |
| 87 | /******************************************************/ |
| 88 | |
| 89 | |
| 90 | /******************************************************/ |
| 91 | /* |
| 92 | From Brood War 1.07 |
| 93 | 09 00 00 00 7A 11 07 ED 9D DF 01 00 ....z....... |
| 94 | */ |
| 95 | #define CLIENT_SESSIONADDR2cxx . . $ `src/common/udp_protocol.h:95:9`! 0x00000009 |
| 96 | typedef structcxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_5# |
| 97 | { |
| 98 | t_udp_headercxx . . $ pvpgn/t_udp_header# hcxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_5#h.; |
| 99 | bn_intcxx . . $ pvpgn/bn_int# sessionkeycxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_5#sessionkey.; |
| 100 | bn_intcxx . . $ pvpgn/bn_int# sessionnumcxx . . $ pvpgn/$anonymous_type_68de0d28359c8d56_5#sessionnum.; |
| 101 | } PACKED_ATTRcxx . . $ `src/common/setup_before.h:383:10`!() t_client_sessionaddr2cxx . . $ pvpgn/t_client_sessionaddr2#; |
| 102 | /******************************************************/ |
| 103 | |
| 104 | } |
| 105 | |
| 106 | #endif |