Commit Graph

20 Commits (master)

Author SHA1 Message Date
Lukas Werling 298feab441 Change netpuncher protocol to be more extensible
- Each packet has a version field.

 - Clients connecting to the netpuncher always send a request packet.
   This allows the netpuncher to react differently depending on the
   client's version.

 - Encode packets as binary instead of ASCII. This allows adding fields
   while maintaining compatibility.
2017-12-14 17:22:38 +01:00
Tushar Maheshwari a661eab867 Automatic fixes using clang-tidy for header files
A follow-up on a previous PR GH-41. The discussion in the forum can be
viewed at http://forum.openclonk.org/topic_show.pl?pid=33086.
Run clang-tidy (without auto, pass-by-value and using checks) to fix the
header files not modified in the previous PR.

Summary of the changes:

 - C++11 member initialization.
 - nullptr instead of 0 for pointers.
 - override for functions declared virtual in base class.
 - default trivial special member functions
2017-05-15 13:46:46 +02:00
Tushar Maheshwari 3a4f49ad90 Revisit #includes
Consolidate the include statements scattered across the code in accordance
with the comment in C4Include.h. The advantages are listed in the same
comment.
Furthermore, it follows llvm-include-order which is the logical
extrapolation of the project's style guideline wherever possible
(C4Include.h being the most-frequent exception).
2017-05-15 13:24:59 +02:00
Tushar Maheshwari e58a7884e4 Automatic fixes using clang-tidy
See http://forum.openclonk.org/topic_show.pl?tid=3376 for discussion.

Close GH-41
2017-05-03 20:30:45 +02:00
Lukas Werling 890deb997d Improve "unexpected address family" asserts 2017-01-18 21:54:50 +01:00
Lukas Werling 602d62cf52 Implement netpunching for IPv6 2017-01-18 21:54:50 +01:00
Lukas Werling 97be97c94c netpuncher: Add runtime error handling
Previously, the netpuncher would just exit silently when encountering an
error.
2017-01-18 21:54:49 +01:00
Nicolas Hake 102047f537 Implement IPv6 support to C4NetIO 2017-01-09 20:34:43 +01:00
Julius Michaelis e61dcbe4c3 Extend the netpuncher: clients can ask hosts for a connection initiation to circumvent port restricted NATs 2016-10-23 22:34:43 +02:00
Lukas Werling 7177c261b3 Bring back and fix the netpuncher
As carrier-grade NATs are becoming common, many players cannot host
Clonk games at all. The simple STUN-like netpuncher from Clonk Rage
which was removed three years ago is already effective against some
DS-Lite NATs.

With some extensions, we should be able to make it work with more
restrictive NATs as well.

This reverts commit 72002cc366.
2016-09-08 21:10:06 +02:00
Nicolas Hake 72002cc366 Kill netpuncher
Another piece of code that hasn't been tested in ages, gone. The default
puncher address was still pointing to clonk.de, which I'm very certain
isn't providing UDP hole punching services anymore.

Instead of a bespoke hole punching implementation we should use a STUN
lib.
2015-12-13 16:11:08 +01:00
Günther Brammer 38f6c1802b Remove unused MSVC project files for tstc4netio and netpuncher 2014-05-25 22:47:56 +02:00
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
Günther Brammer ccbf4d1d45 Consolidate duplicated simple Log functions
The various small utilities do not use the engine Log implementation but
one that simply prints to stdout. Instead of duplicating that one, link a
common one into the utilities.
2011-11-02 21:36:39 +01:00
Günther Brammer 9bc61db360 copyright notices update 2011 2011-09-01 16:58:52 +02:00
Armin Burgmeier 34e6e45864 Fix the netpuncher build on Windows
Making the nightly builds work again
2011-01-27 01:15:48 +01:00
Günther Brammer b7d8eb8959 netpuncher: Make it compile again 2011-01-15 19:11:48 +01:00
Günther Brammer be342d4a51 copyright notices update 2010
This time with more manual checking and using git blame -M -C, so that
a few cases of copied code get a copyright notice corresponding to
their initial introduction.
2010-12-23 01:01:24 +01:00
Benjamin Herr 4378de147c Rerun astyle with missing \ added 2010-03-28 20:58:01 +02:00
Günther Brammer 572d00c32e Move all source files
This might make stuff easier to find.
2009-08-10 17:59:18 +02:00