Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

151 lines
5.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #if !defined( PROTO_OOB_H )
  9. #define PROTO_OOB_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. #include "proto_version.h"
  14. // This is used, unless overridden in the registry
  15. #define VALVE_MASTER_ADDRESS "207.173.177.10:27011"
  16. #define PORT_RCON 27015 // defualt RCON port, TCP
  17. #define PORT_MASTER 27011 // Default master port, UDP
  18. #define PORT_CLIENT 27005 // Default client port, UDP/TCP
  19. #define PORT_SERVER 27015 // Default server port, UDP/TCP
  20. #define PORT_HLTV 27020 // Default hltv port
  21. #define PORT_MATCHMAKING 27025 // Default matchmaking port
  22. #define PORT_SYSTEMLINK 27030 // Default system link port
  23. #ifdef ENABLE_RPT
  24. #define PORT_RPT 27035 // default RPT (remote perf testing) port, TCP
  25. #define PORT_RPT_LISTEN 27036 // RPT connection listener (remote perf testing) port, TCP
  26. #endif // ENABLE_RPT
  27. #define PORT_REPLAY 27040 // Default replay port
  28. // out of band message id bytes
  29. // M = master, S = server, C = client, A = any
  30. // the second character will allways be \n if the message isn't a single
  31. // byte long (?? not true anymore?)
  32. // Requesting for full server list from Server Master
  33. #define A2M_GET_SERVERS 'c' // no params
  34. // Master response with full server list
  35. #define M2A_SERVERS 'd' // + 6 byte IP/Port list.
  36. // Request for full server list from Server Master done in batches
  37. #define A2M_GET_SERVERS_BATCH 'e' // + in532 uniqueID ( -1 for first batch )
  38. // Master response with server list for channel
  39. #define M2A_SERVER_BATCH 'f' // + int32 next uniqueID( -1 for last batch ) + 6 byte IP/Port list.
  40. // Request for MOTD from Server Master (Message of the Day)
  41. #define A2M_GET_MOTD 'g' // no params
  42. // MOTD response Server Master
  43. #define M2A_MOTD 'h' // + string
  44. // Generic Ping Request
  45. #define A2A_PING 'i' // respond with an A2A_ACK
  46. // Generic Ack
  47. #define A2A_ACK 'j' // general acknowledgement without info
  48. #define C2S_CONNECT 'k' // client requests to connect
  49. // Print to client console.
  50. #define A2A_PRINT 'l' // print a message on client
  51. // info request
  52. #define S2A_INFO_DETAILED 'm' // New Query protocol, returns dedicated or not, + other performance info.
  53. // Another user is requesting a challenge value from this machine
  54. // NOTE: this is currently duplicated in SteamClient.dll but for a different purpose,
  55. // so these can safely diverge anytime. SteamClient will be using a different protocol
  56. // to update the master servers anyway.
  57. #define A2S_GETCHALLENGE 'q' // Request challenge # from another machine
  58. #define A2S_RCON 'r' // client rcon command
  59. #define A2A_CUSTOM 't' // a custom command, follow by a string for 3rd party tools
  60. // A user is requesting the list of master servers, auth servers, and titan dir servers from the Client Master server
  61. #define A2M_GETMASTERSERVERS 'v' // + byte (type of request, TYPE_CLIENT_MASTER or TYPE_SERVER_MASTER)
  62. // Master server list response
  63. #define M2A_MASTERSERVERS 'w' // + byte type + 6 byte IP/Port List
  64. #define A2M_GETACTIVEMODS 'x' // + string Request to master to provide mod statistics ( current usage ). "1" for first mod.
  65. #define M2A_ACTIVEMODS 'y' // response: modname\r\nusers\r\nservers
  66. #define M2M_MSG 'z' // Master peering message
  67. // SERVER TO CLIENT/ANY
  68. // Client connection is initiated by requesting a challenge value
  69. // the server sends this value back
  70. #define S2C_CHALLENGE 'A' // + challenge value
  71. // Server notification to client to commence signon process using challenge value.
  72. #define S2C_CONNECTION 'B' // no params
  73. // Response to server info requests
  74. // Request for detailed server/rule information.
  75. #define S2A_INFO_SRC 'I' // + Address, hostname, map, gamedir, gamedescription, active players, maxplayers, protocol
  76. #define S2A_INFO_GOLDSRC 'm' // Reserved for use by goldsrc servers
  77. #define S2M_GETFILE 'J' // request module from master
  78. #define M2S_SENDFILE 'K' // send module to server
  79. #define S2C_REDIRECT 'L' // + IP x.x.x.x:port, redirect client to other server/proxy
  80. #define C2M_CHECKMD5 'M' // player client asks secure master if Module MD5 is valid
  81. #define M2C_ISVALIDMD5 'N' // secure servers answer to C2M_CHECKMD5
  82. // MASTER TO SERVER
  83. #define M2A_ACTIVEMODS3 'P' // response: keyvalues struct of mods
  84. #define A2M_GETACTIVEMODS3 'Q' // get a list of mods and the stats about them
  85. #define S2A_LOGSTRING 'R' // send a log string
  86. #define S2A_LOGSTRING2 'S' // send a log string including a secret value
  87. #define A2S_INFO 'T' // generic server info request - this must match the Source engine
  88. #define A2S_PLAYER 'U' // request player list
  89. #define A2S_RULES 'V' // request rules list from server
  90. #define A2S_SERVERQUERY_GETCHALLENGE 'W' // Request challenge # from another machine
  91. #define C2C_MOD 'X' // Mod specific packet for DOTA2, not used by the OB engine
  92. #define A2S_PING2 'Y' // new-style minimalist ping request
  93. #define S2A_PING2REPLY 'Z' // new-style minimalist ping reply
  94. #define A2S_KEY_STRING "Source Engine Query" // required postfix to a A2S_INFO query
  95. #define A2M_GET_SERVERS_BATCH2 '1' // New style server query
  96. #define A2M_GETACTIVEMODS2 '2' // New style mod info query
  97. #define C2S_AUTHREQUEST1 '3' //
  98. #define S2C_AUTHCHALLENGE1 '4' //
  99. #define C2S_AUTHCHALLENGE2 '5' //
  100. #define S2C_AUTHCOMPLETE '6'
  101. #define C2S_AUTHCONNECT '7' // Unused, signals that the client has
  102. // authenticated the server
  103. #define S2C_CONNREJECT '9' // Special protocol for rejected connections.
  104. #define S2C_MAGICVERSION 0x5a4f4933 // Magic used in the S2C_CHALLNGE to detect version differences
  105. #endif