Debian Codegraph @

src/common/tracker.h

raw symbols SCIP
1 /*
2 * Copyright (C) 1999 Mark Baysinger ([email protected])
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18 #ifndef INCLUDED_TRACKER_TYPES
19 #define INCLUDED_TRACKER_TYPEScxx . . $ `src/common/tracker.h:19:9`!
20
21 #ifdef TRACKER_INTERNAL_ACCESScxx . . $ `src/bnetd/tracker.cpp:20:9`!
22 #ifdef JUST_NEED_TYPES
23 #include "common/bn_type.h"
24 #else
25 #define JUST_NEED_TYPEScxx . . $ `src/common/tracker.h:25:9`!
26 #include "common/bn_type.h"cxx . . $ `<file>/src/common/bn_type.h`/
27 #undef JUST_NEED_TYPEScxx . . $ `src/common/tracker.h:25:9`!
28 #endif
29 #endif
30
31 namespace pvpgncxx . . $ pvpgn/
32 {
33
34 /*
35 *
36 * Here's how this works:
37 *
38 * Bnetd sends a UDP ClientPacket to each track server port on a regular basis.
39 * Simple.
40 *
41 */
42
43 #ifdef TRACKER_INTERNAL_ACCESScxx . . $ `src/bntrackd/bntrackd.cpp:20:9`!
44 typedef structcxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#
45 {
46 bn_shortcxx . . $ pvpgn/bn_short# packet_versioncxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#packet_version.; /* set to TRACK_VERSION, network byte order */
47 bn_shortcxx . . $ pvpgn/bn_short# portcxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#port.; /* port server is listening on, network byte order */
48 bn_intcxx . . $ pvpgn/bn_int# flagscxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#flags.; /* see below, network byte order */
49 bn_bytecxx . . $ pvpgn/bn_byte# softwarecxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#software.[32]; /* example: Bnetd, NUL terminated */
50 bn_bytecxx . . $ pvpgn/bn_byte# versioncxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#version.[16]; /* example: 0.4, NUL terminated */
51 bn_bytecxx . . $ pvpgn/bn_byte# platformcxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#platform.[32]; /* Windows, Linux, etc., NUL terminated */
52 bn_bytecxx . . $ pvpgn/bn_byte# server_desccxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#server_desc.[64]; /* description, NUL terminated */
53 bn_bytecxx . . $ pvpgn/bn_byte# server_locationcxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#server_location.[64]; /* geographical location, NUL terminated */
54 bn_bytecxx . . $ pvpgn/bn_byte# server_urlcxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#server_url.[96]; /* web address: http://..., NUL terminated */
55 bn_bytecxx . . $ pvpgn/bn_byte# contact_namecxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#contact_name.[64]; /* name of operator, NUL terminated */
56 bn_bytecxx . . $ pvpgn/bn_byte# contact_emailcxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#contact_email.[64]; /* e-mail address of operator, NUL terminated */
57 bn_intcxx . . $ pvpgn/bn_int# userscxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#users.; /* current number of users, network byte order */
58 bn_intcxx . . $ pvpgn/bn_int# channelscxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#channels.; /* current number of channels, network byte order */
59 bn_intcxx . . $ pvpgn/bn_int# gamescxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#games.; /* current number of games, network byte order */
60 bn_intcxx . . $ pvpgn/bn_int# uptimecxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#uptime.; /* daemon uptime in seconds, network byte order */
61 bn_intcxx . . $ pvpgn/bn_int# total_gamescxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#total_games.; /* total number of games served */
62 bn_intcxx . . $ pvpgn/bn_int# total_loginscxx . . $ pvpgn/$anonymous_type_a1407e5375e61aa5_0#total_logins.; /* total number of client logins */
63
64 /* new versions will add fields to end of packet */
65 } t_trackpacketcxx . . $ pvpgn/t_trackpacket#;
66
67 /* packet_version */
68 #define TRACK_VERSIONcxx . . $ `src/common/tracker.h:68:9`! 2
69
70 /* flags */
71 #define TF_SHUTDOWNcxx . . $ `src/common/tracker.h:71:9`! 0x1 /* send packet with this flag set when
72 * shutting down (Currently ignored) */
73 #define TF_PRIVATEcxx . . $ `src/common/tracker.h:73:9`! 0x2 /* server is private and should not be
74 * listed (Currently ignored) */
75 #endif
76
77 }
78
79 #endif