OpenTTD Source 20260109-master-g241b5fcdfe
tcp_stun.cpp
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD 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, version 2.
4 * OpenTTD 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.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
10#include "../../stdafx.h"
11#include "../../debug.h"
12#include "tcp_stun.h"
13
14#include "../../safeguards.h"
15
22{
23 Debug(net, 0, "[tcp/stun] Received illegal packet type {}", type);
24 return false;
25}
26
virtual bool Receive_SERCLI_STUN(Packet &p)
Send a STUN request to the STUN server letting the Game Coordinator know what our actually public IP:...
Definition tcp_stun.cpp:27
bool ReceiveInvalidPacket(PacketStunType type)
Helper for logging receiving invalid packets.
Definition tcp_stun.cpp:21
#define Debug(category, level, format_string,...)
Output a line of debugging information.
Definition debug.h:37
Internal entity of a packet.
Definition packet.h:41
Basic functions to receive and send TCP packets to/from the STUN server.
PacketStunType
Enum with all types of TCP STUN packets.
Definition tcp_stun.h:18
@ PACKET_STUN_SERCLI_STUN
Send a STUN request to the STUN server.
Definition tcp_stun.h:19