diff --git a/src/engine/CMakeLists.txt b/src/engine/CMakeLists.txt index bfe521c7..5a4d69c3 100644 --- a/src/engine/CMakeLists.txt +++ b/src/engine/CMakeLists.txt @@ -229,6 +229,8 @@ add_sources( SOURCE_GROUP "Public" "${ENGINE_SOURCE_DIR}/public/networkvar.h" "${ENGINE_SOURCE_DIR}/public/playerstate.h" + "${ENGINE_SOURCE_DIR}/public/netcon/INetCon.h" + # These probably need to go to 'bsplib' if we ever create that project. "${ENGINE_SOURCE_DIR}/public/bspflags.h" "${ENGINE_SOURCE_DIR}/public/bspfile.h" diff --git a/src/netconsole/CMakeLists.txt b/src/netconsole/CMakeLists.txt index e978455b..3b3f2e3e 100644 --- a/src/netconsole/CMakeLists.txt +++ b/src/netconsole/CMakeLists.txt @@ -24,6 +24,10 @@ add_sources( SOURCE_GROUP "Engine" "${ENGINE_SOURCE_DIR}/engine/shared/shared_rcon.h" ) +add_sources( SOURCE_GROUP "Public" + "${ENGINE_SOURCE_DIR}/public/netcon/INetCon.h" +) + add_sources( SOURCE_GROUP "Windows" "${ENGINE_SOURCE_DIR}/windows/console.cpp" "${ENGINE_SOURCE_DIR}/windows/console.h" diff --git a/src/public/netcon/INetCon.h b/src/public/netcon/INetCon.h new file mode 100644 index 00000000..7b1bca29 --- /dev/null +++ b/src/public/netcon/INetCon.h @@ -0,0 +1,20 @@ +//===========================================================================// +// +// Purpose: Net console types +// +//===========================================================================// +#ifndef INETCON_H +#define INETCON_H + +#define RCON_FRAME_MAGIC ('R'+('C'<<8)+('o'<<16)+('n'<<24)) +#define RCON_FRAME_MAX_SIZE 1024*1024 // Max size of envelope and its payload. + +// Wire struct for each individual net console frame. Fields are transmitted in +// network byte order and must be flipped to platform's endianness on receive. +struct NetConFrameHeader_s +{ + u32 magic; + u32 length; +}; + +#endif // INETCON_H