1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Initial Commit of CyanWorlds.com Engine Open Source Client/Plugin

This commit is contained in:
jwplatt
2011-03-12 12:34:52 -05:00
commit b970ae4bad
3976 changed files with 1301355 additions and 0 deletions

View File

@ -0,0 +1,38 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Intern.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_INTERN_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Intern.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_INTERN_H
#include "Private/pnNbAllIncludes.h"

View File

@ -0,0 +1,41 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Pch.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PCH_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Pch.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PCH_H
#include "../pnUtils/pnUtils.h"
#include "../pnProduct/pnProduct.h"
#include "Private/pnNbAllIncludes.h"

View File

@ -0,0 +1,25 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/

View File

@ -0,0 +1,35 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbAges.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PRIVATE_PNNBAGES_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbAges.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PRIVATE_PNNBAGES_H

View File

@ -0,0 +1,43 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbAllIncludes.h
*
***/
#ifndef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PRIVATE_PNNBALLINCLUDES_H
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PRIVATE_PNNBALLINCLUDES_H
#include "../pnProduct/pnProduct.h"
#include "pnNbConst.h"
#include "pnNbError.h"
#include "pnNbProtocol.h"
#include "pnNbSrvs.h"
#endif // PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PRIVATE_PNNBALLINCLUDES_H

View File

@ -0,0 +1,153 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbEchoMsgs.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PRIVATE_PNNBECHOMSGS_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbEchoMsgs.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PRIVATE_PNNBECHOMSGS_H
//============================================================================
// Begin Echo server data types
//============================================================================
namespace Echo {
/*****************************************************************************
*
* @@@: Shared data types for echo server/client demo
*
***/
const unsigned kEchoMsgFlagBroadcast = 1<<0;
const unsigned kEchoMsgFlagEchoBack = 1<<1;
enum EEchoNetBufferType {
kEchoNetBufferInvalidType,
kEchoNetBufferMsg,
kNumEchoNetBufferTypes
};
enum EEchoMsgType {
kEchoInvalidMsgType,
kEchoJoinRequestMsg,
kEchoJoinReplyMsg,
kEchoPlayerJoinedMsg,
kEchoPlayerLeftMsg,
kEchoChatMsg,
kEchoGameDataBufferMsg,
kNumEchoMsgTypes
};
COMPILER_ASSERT(kNumEchoMsgTypes < (byte)-1);
//============================================================================
// Begin packed data structures
//============================================================================
#include <pshpack1.h>
struct EchoMsg {
EchoMsg (const EEchoMsgType & type, unsigned flags = 0)
: type((byte)type)
, flags(flags)
{ }
byte type;
dword flags;
};
struct EchoJoinRequestMsg : EchoMsg {
EchoJoinRequestMsg ()
: EchoMsg(kEchoJoinRequestMsg)
{ }
wchar playerName[64];
};
struct EchoJoinReplyMsg : EchoMsg {
EchoJoinReplyMsg ()
: EchoMsg(kEchoJoinReplyMsg)
{ }
dword playerId;
};
struct EchoPlayerJoinedMsg : EchoMsg {
EchoPlayerJoinedMsg ()
: EchoMsg(kEchoPlayerJoinedMsg, kEchoMsgFlagBroadcast)
{ }
dword playerId;
wchar playerName[64];
};
struct EchoPlayerLeftMsg : EchoMsg {
EchoPlayerLeftMsg ()
: EchoMsg(kEchoPlayerLeftMsg, kEchoMsgFlagBroadcast)
{ }
dword playerId;
};
struct EchoChatMsg : EchoMsg {
EchoChatMsg ()
: EchoMsg(kEchoChatMsg, kEchoMsgFlagBroadcast|kEchoMsgFlagEchoBack)
{ }
dword fromPlayerId;
dword msgChars;
wchar msgBuffer[1]; // [msgChars], actually
// no more fields after variable length allocation
};
struct EchoGameDataBufferMsg : EchoMsg {
EchoGameDataBufferMsg ()
: EchoMsg(kEchoGameDataBufferMsg, kEchoMsgFlagBroadcast|kEchoMsgFlagEchoBack)
{ }
dword fromPlayerId;
dword bufferBytes;
byte bufferData[1]; // [bufferBytes], actually
// no more fields after variable length allocation
};
//============================================================================
// End packed data structures
//============================================================================
#include <poppack.h>
//============================================================================
// End Echo server data types
//============================================================================
} using namespace Echo;

View File

@ -0,0 +1,176 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbError.cpp
*
***/
#include "../Pch.h"
#pragma hdrstop
/*****************************************************************************
*
* Exported functions
*
***/
//============================================================================
// These errors should only be used in debugging. They should not be shown
// in release clients because they are not localized
const wchar * NetErrorToString (ENetError code) {
static wchar * s_errors[] = {
L"Success", // kNetSuccess
L"Internal Error", // kNetErrInternalError
L"No Response From Server", // kNetErrTimeout
L"Invalid Server Data", // kNetErrBadServerData
L"Age Not Found", // kNetErrAgeNotFound
L"Network Connection Failed", // kNetErrConnectFailed
L"Disconnected From Server", // kNetErrDisconnected
L"File Not Found", // kNetErrFileNotFound
L"Old Build", // kNetErrOldBuildId
L"Remote Shutdown", // kNetErrRemoteShutdown
L"Database Timeout", // kNetErrTimeoutOdbc
L"Account Already Exists", // kNetErrAccountAlreadyExists
L"Player Already Exists", // kNetErrPlayerAlreadyExists
L"Account Not Found", // kNetErrAccountNotFound
L"Player Not Found", // kNetErrPlayerNotFound
L"Invalid Parameter", // kNetErrInvalidParameter
L"Name Lookup Failed", // kNetErrNameLookupFailed
L"Logged In Elsewhere", // kNetErrLoggedInElsewhere
L"Vault Node Not Found", // kNetErrVaultNodeNotFound
L"Max Players On Account", // kNetErrMaxPlayersOnAcct
L"Authentication Failed", // kNetErrAuthenticationFailed
L"State Object Not Found", // kNetErrStateObjectNotFound
L"Login Denied", // kNetErrLoginDenied
L"Circular Reference", // kNetErrCircularReference
L"Account Not Activated", // kNetErrAccountNotActivated
L"Key Already Used", // kNetErrKeyAlreadyUsed
L"Key Not Found", // kNetErrKeyNotFound
L"Activation Code Not Found", // kNetErrActivationCodeNotFound
L"Player Name Invalid", // kNetErrPlayerNameInvalid
L"Not Supported", // kNetErrNotSupported
L"Service Forbidden", // kNetErrServiceForbidden
L"Auth Token Too Old", // kNetErrAuthTokenTooOld
L"Must Use GameTap Client", // kNetErrMustUseGameTapClient
L"Too Many Failed Logins", // kNetErrTooManyFailedLogins
L"GameTap: Connection Failed", // kNetErrGameTapConnectionFailed
L"GameTap: Too Many Auth Options", // kNetErrGTTooManyAuthOptions
L"GameTap: Missing Parameter", // kNetErrGTMissingParameter
L"GameTap: Server Error", // kNetErrGTServerError
L"Account has been banned", // kNetErrAccountBanned
L"Account kicked by CCR", // kNetErrKickedByCCR
L"Wrong score type for operation", // kNetErrScoreWrongType
L"Not enough points", // kNetErrScoreNotEnoughPoints
L"Non-fixed score already exists", // kNetErrScoreAlreadyExists
L"No score data found", // kNetErrScoreNoDataFound
L"Invite: Couldn't find player", // kNetErrInviteNoMatchingPlayer
L"Invite: Too many hoods", // kNetErrInviteTooManyHoods
L"Payments not up to date", // kNetErrNeedToPay
L"Server Busy", // kNetErrServerBusy
L"Vault Node Access Violation", // kNetErrVaultNodeAccessViolation
};
COMPILER_ASSERT(arrsize(s_errors) == kNumNetErrors);
if ((unsigned)code >= arrsize(s_errors)) {
if (code == kNetPending)
return L"Pending";
return L"Unknown Error";
}
return s_errors[code];
}
//============================================================================
// These errors should only be used in debugging. They should not be shown
// in release clients because they are not localized
const wchar * NetErrorAsString (ENetError code) {
#define ERROR_STRING(e) L#e
static wchar * s_errors[] = {
ERROR_STRING(kNetSuccess),
ERROR_STRING(kNetErrInternalError),
ERROR_STRING(kNetErrTimeout),
ERROR_STRING(kNetErrBadServerData),
ERROR_STRING(kNetErrAgeNotFound),
ERROR_STRING(kNetErrConnectFailed),
ERROR_STRING(kNetErrDisconnected),
ERROR_STRING(kNetErrFileNotFound),
ERROR_STRING(kNetErrOldBuildId),
ERROR_STRING(kNetErrRemoteShutdown),
ERROR_STRING(kNetErrTimeoutOdbc),
ERROR_STRING(kNetErrAccountAlreadyExists),
ERROR_STRING(kNetErrPlayerAlreadyExists),
ERROR_STRING(kNetErrAccountNotFound),
ERROR_STRING(kNetErrPlayerNotFound),
ERROR_STRING(kNetErrInvalidParameter),
ERROR_STRING(kNetErrNameLookupFailed),
ERROR_STRING(kNetErrLoggedInElsewhere),
ERROR_STRING(kNetErrVaultNodeNotFound),
ERROR_STRING(kNetErrMaxPlayersOnAcct),
ERROR_STRING(kNetErrAuthenticationFailed),
ERROR_STRING(kNetErrStateObjectNotFound),
ERROR_STRING(kNetErrLoginDenied),
ERROR_STRING(kNetErrCircularReference),
ERROR_STRING(kNetErrAccountNotActivated),
ERROR_STRING(kNetErrKeyAlreadyUsed),
ERROR_STRING(kNetErrKeyNotFound),
ERROR_STRING(kNetErrActivationCodeNotFound),
ERROR_STRING(kNetErrPlayerNameInvalid),
ERROR_STRING(kNetErrNotSupported),
ERROR_STRING(kNetErrServiceForbidden),
ERROR_STRING(kNetErrAuthTokenTooOld),
ERROR_STRING(kNetErrMustUseGameTapClient),
ERROR_STRING(kNetErrTooManyFailedLogins),
ERROR_STRING(kNetErrGameTapConnectionFailed),
ERROR_STRING(kNetErrGTTooManyAuthOptions),
ERROR_STRING(kNetErrGTMissingParameter),
ERROR_STRING(kNetErrGTServerError),
ERROR_STRING(kNetErrAccountBanned),
ERROR_STRING(kNetErrKickedByCCR),
ERROR_STRING(kNetErrScoreWrongType),
ERROR_STRING(kNetErrScoreNotEnoughPoints),
ERROR_STRING(kNetErrScoreAlreadyExists),
ERROR_STRING(kNetErrScoreNoDataFound),
ERROR_STRING(kNetErrInviteNoMatchingPlayer),
ERROR_STRING(kNetErrInviteTooManyHoods),
ERROR_STRING(kNetErrNeedToPay),
ERROR_STRING(kNetErrServerBusy),
ERROR_STRING(kNetErrVaultNodeAccessViolation),
};
COMPILER_ASSERT(arrsize(s_errors) == kNumNetErrors);
if ((unsigned)code >= arrsize(s_errors)) {
if (code == kNetPending)
return ERROR_STRING(kNetPending);
return L"ErrUnknown";
}
#undef ERROR_STRING
return s_errors[code];
}

View File

@ -0,0 +1,116 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbError.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PRIVATE_PNNBERROR_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbError.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PRIVATE_PNNBERROR_H
/*****************************************************************************
*
* Net Error
*
***/
// These codes may not be changed unless ALL servers, clients and databases
// are simultaneously updated; so basically forget it =)
enum ENetError {
// codes <= 0 are not errors
kNetPending = -1,
kNetSuccess = 0,
// codes > 0 are errors
kNetErrInternalError = 1,
kNetErrTimeout = 2,
kNetErrBadServerData = 3,
kNetErrAgeNotFound = 4,
kNetErrConnectFailed = 5,
kNetErrDisconnected = 6,
kNetErrFileNotFound = 7,
kNetErrOldBuildId = 8,
kNetErrRemoteShutdown = 9,
kNetErrTimeoutOdbc = 10,
kNetErrAccountAlreadyExists = 11,
kNetErrPlayerAlreadyExists = 12,
kNetErrAccountNotFound = 13,
kNetErrPlayerNotFound = 14,
kNetErrInvalidParameter = 15,
kNetErrNameLookupFailed = 16,
kNetErrLoggedInElsewhere = 17,
kNetErrVaultNodeNotFound = 18,
kNetErrMaxPlayersOnAcct = 19,
kNetErrAuthenticationFailed = 20,
kNetErrStateObjectNotFound = 21,
kNetErrLoginDenied = 22,
kNetErrCircularReference = 23,
kNetErrAccountNotActivated = 24,
kNetErrKeyAlreadyUsed = 25,
kNetErrKeyNotFound = 26,
kNetErrActivationCodeNotFound = 27,
kNetErrPlayerNameInvalid = 28,
kNetErrNotSupported = 29,
kNetErrServiceForbidden = 30,
kNetErrAuthTokenTooOld = 31,
kNetErrMustUseGameTapClient = 32,
kNetErrTooManyFailedLogins = 33,
kNetErrGameTapConnectionFailed = 34,
kNetErrGTTooManyAuthOptions = 35,
kNetErrGTMissingParameter = 36,
kNetErrGTServerError = 37,
kNetErrAccountBanned = 38,
kNetErrKickedByCCR = 39,
kNetErrScoreWrongType = 40,
kNetErrScoreNotEnoughPoints = 41,
kNetErrScoreAlreadyExists = 42,
kNetErrScoreNoDataFound = 43,
kNetErrInviteNoMatchingPlayer = 44,
kNetErrInviteTooManyHoods = 45,
kNetErrNeedToPay = 46,
kNetErrServerBusy = 47,
kNetErrVaultNodeAccessViolation = 48,
// Be sure to add strings for additional error codes in pnNbError.cpp
// (don't worry, the compiler will tell you if one is missing ;)
kNumNetErrors,
// Net messages require ENetError to be sizeof(dword)
kNetErrorForceDword = (dword) -1
};
COMPILER_ASSERT_HEADER(pnNbError, sizeof(ENetError) == sizeof(dword));
#define IS_NET_ERROR(a) (((int)(a)) > kNetSuccess)
#define IS_NET_SUCCESS(a) (((int)(a)) == kNetSuccess)
const wchar * NetErrorToString (ENetError code); // user-friendly string
const wchar * NetErrorAsString (ENetError code); // string version of enum identifier

View File

@ -0,0 +1,76 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbProtocol.cpp
*
***/
#include "../Pch.h"
#pragma hdrstop
/*****************************************************************************
*
* Exports
*
***/
//============================================================================
const wchar * NetProtocolToString (ENetProtocol protocol) {
#define PROTOCOL_STRING(p) { p, L#p }
static struct { ENetProtocol protocol; const wchar *name; } s_protocols[] = {
PROTOCOL_STRING(kNetProtocolNil),
// For test applications
PROTOCOL_STRING(kNetProtocolDebug),
// Client connections
{ kNetProtocolCli2Csr, L"GateKeeper Server" },
{ kNetProtocolCli2Csr, L"Csr Server" },
{ kNetProtocolCli2Auth, L"Auth Server" },
{ kNetProtocolCli2Game, L"Game Server" },
{ kNetProtocolCli2File, L"File Server" },
PROTOCOL_STRING(kNetProtocolCli2Unused_01),
// Server connections
PROTOCOL_STRING(kNetProtocolSrvConn),
PROTOCOL_STRING(kNetProtocolSrv2Mcp),
PROTOCOL_STRING(kNetProtocolSrv2Vault),
PROTOCOL_STRING(kNetProtocolSrv2Db),
PROTOCOL_STRING(kNetProtocolSrv2State),
PROTOCOL_STRING(kNetProtocolSrv2Log),
PROTOCOL_STRING(kNetProtocolSrv2Score),
};
#undef PROTOCOL_STRING
for (unsigned i = 0; i < arrsize(s_protocols); ++i)
if (s_protocols[i].protocol == protocol)
return s_protocols[i].name;
return L"Unknown protocol id";
}

View File

@ -0,0 +1,76 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbProtocol.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PRIVATE_PNNBPROTOCOL_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbProtocol.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PRIVATE_PNNBPROTOCOL_H
/*****************************************************************************
*
* Net protocols
*
***/
const unsigned kNetProtocolServerBit = 0x80;
// These codes may not be changed unless ALL servers and clients are
// simultaneously replaced; so basically forget it =)
enum ENetProtocol {
kNetProtocolNil = 0,
// For test applications
kNetProtocolDebug = 1,
// Client connections
kNetProtocolCli2GateKeeper = 2,
kNetProtocolCli2Csr = 3,
kNetProtocolCli2Auth = 4,
kNetProtocolCli2Game = 5,
kNetProtocolCli2File = 6,
kNetProtocolCli2Unused_01 = 7,
// Server connections
kNetProtocolSrvConn = 0 | kNetProtocolServerBit,
kNetProtocolSrv2Mcp = 1 | kNetProtocolServerBit,
kNetProtocolSrv2Vault = 2 | kNetProtocolServerBit,
kNetProtocolSrv2Db = 3 | kNetProtocolServerBit,
kNetProtocolSrv2State = 4 | kNetProtocolServerBit,
kNetProtocolSrv2Log = 5 | kNetProtocolServerBit,
kNetProtocolSrv2Score = 6 | kNetProtocolServerBit,
};
// NOTE: When adding a new net protocol, be sure to update
// NetProtocolToString as well. Unfortunately, the compiler
// cannot enforce this since the protocol values are not
// numerically sequential.
const wchar * NetProtocolToString (ENetProtocol protocol);

View File

@ -0,0 +1,262 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp
*
***/
#include "../Pch.h"
#pragma hdrstop
#ifndef BUILD_TYPE
# error "pnProduct not included"
#endif
/*****************************************************************************
*
* Local data
*
***/
//============================================================================
// Auth
//============================================================================
static const wchar * s_authAddrs[] = {
#if BUILD_TYPE == BUILD_TYPE_DEV
L"shard"
#elif BUILD_TYPE == BUILD_TYPE_QA
L"marrim"
#elif BUILD_TYPE == BUILD_TYPE_TEST
L"test-auth.urulive.com"
#elif BUILD_TYPE == BUILD_TYPE_BETA
L"beta-auth.urulive.com"
#elif BUILD_TYPE == BUILD_TYPE_LIVE
L"184.73.198.22" //L"auth.urulive.com"
#else
# error "Unknown build type"
#endif
};
static wchar s_authAddrCmdLine[64];
static const wchar * s_authAddrsOverride[] = {
s_authAddrCmdLine
};
//============================================================================
// File
//============================================================================
static const wchar * s_fileAddrs[] = {
#if BUILD_TYPE == BUILD_TYPE_DEV
L"shard"
#elif BUILD_TYPE == BUILD_TYPE_QA
L"marrim"
#elif BUILD_TYPE == BUILD_TYPE_TEST
L"test-file.urulive.com"
#elif BUILD_TYPE == BUILD_TYPE_BETA
L"beta-file.urulive.com"
#elif BUILD_TYPE == BUILD_TYPE_LIVE
L"67.202.54.141" //unused
#else
# error "Unknown build type"
#endif
};
static wchar s_fileAddrCmdLine[64];
static const wchar * s_fileAddrsOverride[] = {
s_fileAddrCmdLine
};
//============================================================================
// Csr
//============================================================================
static const wchar * s_csrAddrs[] = {
#if BUILD_TYPE == BUILD_TYPE_DEV
L"localhost"
#elif BUILD_TYPE == BUILD_TYPE_QA
L"localhost"
#elif BUILD_TYPE == BUILD_TYPE_TEST
L"localhost"
#elif BUILD_TYPE == BUILD_TYPE_BETA
L"beta-csr.urulive.com"
#elif BUILD_TYPE == BUILD_TYPE_LIVE
L"localhost"
#else
# error "Unknown build type"
#endif
};
static wchar s_csrAddrCmdLine[64];
static const wchar * s_csrAddrsOverride[] = {
s_csrAddrCmdLine
};
//============================================================================
// GateKeeper
//============================================================================
static const wchar * s_gateKeeperAddrs[] = {
#if BUILD_TYPE == BUILD_TYPE_DEV
L"localhost"
#elif BUILD_TYPE == BUILD_TYPE_QA
L"localhost"
#elif BUILD_TYPE == BUILD_TYPE_TEST
L"localhost"
#elif BUILD_TYPE == BUILD_TYPE_BETA
L"beta-csr.urulive.com"
#elif BUILD_TYPE == BUILD_TYPE_LIVE
L"184.73.198.22"
#else
# error "Unknown build type"
#endif
};
static wchar s_gateKeeperAddrCmdLine[64];
static const wchar * s_gateKeeperAddrsOverride[] = {
s_gateKeeperAddrCmdLine
};
/*****************************************************************************
*
* Exports
*
***/
//============================================================================
// Auth
//============================================================================
unsigned GetAuthSrvHostnames (const wchar *** addrs) {
if (s_authAddrCmdLine[0]) {
*addrs = s_authAddrsOverride;
return arrsize(s_authAddrsOverride);
}
else {
*addrs = s_authAddrs;
return arrsize(s_authAddrs);
}
}
//============================================================================
void SetAuthSrvHostname (const wchar addr[]) {
StrCopy(s_authAddrCmdLine, addr, arrsize(s_authAddrCmdLine));
}
//============================================================================
bool AuthSrvHostnameOverride () {
return s_authAddrCmdLine[0];
}
//============================================================================
// File
//============================================================================
unsigned GetFileSrvHostnames (const wchar *** addrs) {
if (s_fileAddrCmdLine[0]) {
*addrs = s_fileAddrsOverride;
return arrsize(s_fileAddrsOverride);
}
else {
*addrs = s_fileAddrs;
return arrsize(s_fileAddrs);
}
}
//============================================================================
void SetFileSrvHostname (const wchar addr[]) {
StrCopy(s_fileAddrCmdLine, addr, arrsize(s_fileAddrCmdLine));
}
//============================================================================
bool FileSrvHostnameOverride () {
return s_fileAddrCmdLine[0];
}
//============================================================================
// Csr
//============================================================================
unsigned GetCsrSrvHostnames (const wchar *** addrs) {
if (s_csrAddrCmdLine[0]) {
*addrs = s_csrAddrsOverride;
return arrsize(s_csrAddrsOverride);
}
else {
*addrs = s_csrAddrs;
return arrsize(s_csrAddrs);
}
}
//============================================================================
void SetCsrSrvHostname (const wchar addr[]) {
StrCopy(s_csrAddrCmdLine, addr, arrsize(s_csrAddrCmdLine));
}
//============================================================================
bool CsrSrvHostnameOverride () {
return s_csrAddrCmdLine[0];
}
//============================================================================
// GateKeeper
//============================================================================
unsigned GetGateKeeperSrvHostnames (const wchar *** addrs) {
if (s_gateKeeperAddrCmdLine[0]) {
*addrs = s_gateKeeperAddrsOverride;
return arrsize(s_gateKeeperAddrsOverride);
}
else {
*addrs = s_gateKeeperAddrs;
return arrsize(s_gateKeeperAddrs);
}
}
//============================================================================
void SetGateKeeperSrvHostname (const wchar addr[]) {
StrCopy(s_gateKeeperAddrCmdLine, addr, arrsize(s_gateKeeperAddrCmdLine));
}
//============================================================================
bool GateKeeperSrvHostnameOverride () {
return s_gateKeeperAddrCmdLine[0];
}

View File

@ -0,0 +1,90 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PRIVATE_PNNBSRVS_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PRIVATE_PNNBSRVS_H
/*****************************************************************************
*
* Server types
*
***/
// These codes may not be changed unless ALL servers and clients are
// simultaneously replaced; so basically forget it =)
enum ESrvType {
kSrvTypeNone = 0,
kSrvTypeClient = 1,
kSrvTypeAuth = 2,
kSrvTypeGame = 3,
kSrvTypeVault = 4,
kSrvTypeDb = 5,
kSrvTypeMcp = 6,
kSrvTypeState = 7,
kSrvTypeFile = 8,
kSrvTypeLog = 9,
kSrvTypeDll = 10,
kSrvTypeScore = 11,
kSrvTypeCsr = 12,
kSrvTypeGateKeeper = 13,
kNumSrvTypes,
// Enforce network message field size
kNetSrvForceDword = (unsigned)-1
};
/*****************************************************************************
*
* Front-end server hostnames
*
***/
unsigned GetAuthSrvHostnames (const wchar *** addrs); // returns addrCount
void SetAuthSrvHostname (const wchar addr[]);
bool AuthSrvHostnameOverride ();
unsigned GetFileSrvHostnames (const wchar *** addrs); // returns addrCount
void SetFileSrvHostname (const wchar addr[]);
bool FileSrvHostnameOverride ();
unsigned GetCsrSrvHostnames (const wchar *** addrs); // returns addrCount
void SetCsrSrvHostname (const wchar addr[]);
bool CsrSrvHostnameOverride ();
unsigned GetGateKeeperSrvHostnames (const wchar *** addrs); // returns addrCount
void SetGateKeeperSrvHostname (const wchar addr[]);
bool GateKeeperSrvHostnameOverride ();

View File

@ -0,0 +1,58 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*************************************************************
*
* This file was auto-generated by plDhKeyGen.exe
*
***/
static const unsigned kDhGValue = 41;
static const byte kDhNData[] = {
0x2d, 0x17, 0x19, 0x42, 0xeb, 0x71, 0x8f, 0x91,
0x29, 0x7c, 0x61, 0x88, 0x43, 0x75, 0xe5, 0xee,
0x72, 0xfe, 0x45, 0x1b, 0x43, 0xc3, 0x8e, 0xb9,
0x47, 0x5e, 0x03, 0xc8, 0x0c, 0x78, 0xb7, 0xe4,
0x4d, 0x31, 0x5b, 0xcb, 0x66, 0xc2, 0x54, 0x1a,
0x0a, 0x61, 0x11, 0x57, 0x38, 0x66, 0x9b, 0x34,
0x6b, 0xab, 0x6d, 0x12, 0x12, 0x38, 0x87, 0xc5,
0x3f, 0x20, 0xbe, 0x97, 0xa3, 0xa6, 0x56, 0x8f
};
COMPILER_ASSERT(sizeof(kDhNData) == kNetDiffieHellmanKeyBits / 8);
static const byte kDhXData[] = {
0x21, 0xcf, 0x1d, 0xc6, 0x08, 0xc0, 0x23, 0xad,
0x53, 0x36, 0xce, 0x61, 0x25, 0xdd, 0xb9, 0x55,
0x05, 0xc1, 0xbb, 0x8f, 0xf4, 0x0d, 0x59, 0xf9,
0x20, 0x27, 0x9a, 0xee, 0xfb, 0x23, 0x5b, 0xeb,
0xe5, 0xec, 0x01, 0x55, 0x2e, 0xd5, 0x64, 0xef,
0xea, 0x43, 0xb1, 0x9e, 0xb9, 0x8c, 0x75, 0x3f,
0xda, 0xb2, 0xbb, 0xb3, 0x6a, 0x3d, 0xcd, 0xbc,
0xfa, 0x6f, 0x03, 0xf3, 0x55, 0xd8, 0xe9, 0x1b
};
COMPILER_ASSERT(sizeof(kDhXData) == kNetDiffieHellmanKeyBits / 8);

View File

@ -0,0 +1,152 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNbConst.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PNNBCONST_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNbConst.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PNNBCONST_H
/*****************************************************************************
*
* Global constants
*
***/
//============================================================================
// Network constants
//============================================================================
const unsigned kNetLegacyClientPort = 80;
const unsigned kNetDefaultClientPort = 14617;
const unsigned kNetDefaultServerPort = 14618;
const unsigned kNetDefaultSimpleNetPort = 14620;
const unsigned kMaxTcpPacketSize = 1460;
//============================================================================
// Crypto constants
//============================================================================
const unsigned kNetMaxSymmetricSeedBytes = 7; // 56 bits
const unsigned kNetDiffieHellmanKeyBits = 512;
//COMPILER_ASSERT_HEADER(DH, IS_POW2(kNetDiffieHellmanKeyBits));
//============================================================================
// Data constants
//============================================================================
const unsigned kMaxPasswordLength = 16;
const unsigned kMaxAccountPassLength = kMaxPasswordLength;
const unsigned kMaxAccountNameLength = 64;
const unsigned kMaxPlayerNameLength = 40;
const unsigned kMaxAgeNameLength = 64;
const unsigned kMaxVaultNodeStringLength = 64;
const unsigned kMaxVaultNodeTypeStringLength = 24;
const unsigned kMaxVaultTreeDepth = 255;
const unsigned kMaxPlayersPerAccount = 6;
const unsigned kMaxStateObjectName = 64;
const unsigned kMaxLogEventName = 64;
const unsigned kMaxLogAddrLength = 16;
const unsigned kMaxPublisherAuthKeyLength = 64;
const unsigned kMaxGTOSIdLength = 8;
const unsigned kMaxGameScoreNameLength = 64;
const unsigned kMaxEmailAddressLength = 64;
/*****************************************************************************
*
* Account Flags
*
***/
// Billing flags
const unsigned kBillingTypeFree = 0 << 0;
const unsigned kBillingTypePaidSubscriber = 1 << 0;
const unsigned kBillingTypeGameTap = 1 << 1;
struct AccountRoleInfo {
unsigned Role;
char* Descriptor;
};
// Account role flags
const unsigned kAccountRoleDisabled = 0 << 0;
const unsigned kAccountRoleAdmin = 1 << 0;
const unsigned kAccountRoleDeveloper = 1 << 1;
const unsigned kAccountRoleBetaTester = 1 << 2;
const unsigned kAccountRoleUser = 1 << 3;
const unsigned kAccountRoleSpecialEvent = 1 << 4;
const unsigned kAccountRoleBanned = 1 << 16;
// update the following whenever a new end-user account role is added
const unsigned kAccountRolesAllUserFlags = kAccountRoleBetaTester | kAccountRoleUser | kAccountRoleSpecialEvent;
const AccountRoleInfo kAccountRoles[] = {
{ kAccountRoleBetaTester, "Beta Tester" },
{ kAccountRoleUser, "User" },
{ kAccountRoleSpecialEvent, "Special Event" },
{ kAccountRolesAllUserFlags, "End" }
};
/*****************************************************************************
*
* Csr
*
***/
enum ECsrFlags {
kCsrFlagAdmin = 1 << 0,
kCsrFlagDisabled = 1 << 1,
kCsrFlagServer = 1 << 2,
};
/*****************************************************************************
*
* Game Score Types
*
***/
enum EGameScoreTypes {
kScoreTypeFixed = 0,
kScoreTypeAccumulative,
kScoreTypeAccumAllowNegative,
};
enum EScoreRankGroups {
kScoreRankGroupIndividual = 0,
kScoreRankGroupNeighborhood,
};
enum EScoreTimePeriods {
kScoreTimePeriodOverall = 0,
kScoreTimePeriodYear,
kScoreTimePeriodMonth,
kScoreTimePeriodDay
};

View File

@ -0,0 +1,58 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*************************************************************
*
* This file was auto-generated by plDhKeyGen.exe
*
***/
static const unsigned kDhGValue = 97;
static const byte kDhNData[] = {
0xbd, 0xf8, 0x03, 0x17, 0xed, 0x27, 0x74, 0x0d,
0x76, 0x8e, 0x7a, 0x8c, 0x88, 0xeb, 0xec, 0xde,
0xd7, 0x73, 0x37, 0x8f, 0x4b, 0xbc, 0xae, 0x75,
0xf8, 0xda, 0x22, 0xee, 0x50, 0xc9, 0xb3, 0x69,
0x97, 0x0b, 0xe5, 0x28, 0x98, 0x91, 0xf7, 0x44,
0x97, 0xdf, 0x70, 0xf1, 0x86, 0x6c, 0xfa, 0x03,
0x7c, 0x47, 0x73, 0xb1, 0x62, 0x00, 0x42, 0x99,
0xf0, 0xc6, 0xe7, 0x05, 0xd8, 0xcd, 0xd6, 0x6d
};
COMPILER_ASSERT(sizeof(kDhNData) == kNetDiffieHellmanKeyBits / 8);
static const byte kDhXData[] = {
0x03, 0x1d, 0x83, 0x62, 0x36, 0x92, 0x63, 0xa6,
0xa8, 0x66, 0x31, 0xbe, 0x28, 0x42, 0xc2, 0xe6,
0x86, 0x98, 0x3a, 0x81, 0x13, 0x0e, 0xb7, 0x96,
0x5e, 0x27, 0x87, 0x6a, 0x06, 0x68, 0x51, 0x21,
0xf3, 0x74, 0xe9, 0x11, 0xe9, 0x73, 0x5f, 0xdb,
0x37, 0x2a, 0x2d, 0x49, 0xa4, 0x76, 0x12, 0x06,
0x58, 0x36, 0x59, 0x6d, 0xbb, 0x59, 0x57, 0x2c,
0x34, 0xe4, 0x5e, 0xd4, 0x2c, 0x78, 0xc3, 0x34
};
COMPILER_ASSERT(sizeof(kDhXData) == kNetDiffieHellmanKeyBits / 8);

View File

@ -0,0 +1,58 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*************************************************************
*
* This file was auto-generated by plDhKeyGen.exe
*
***/
static const unsigned kDhGValue = 73;
static const byte kDhNData[] = {
0x38, 0xa4, 0xf7, 0x69, 0x43, 0xd7, 0xa6, 0xc7,
0x27, 0x72, 0x3b, 0x12, 0x6a, 0x76, 0x09, 0x5d,
0xaa, 0x9a, 0x38, 0x44, 0xde, 0x84, 0x22, 0xc4,
0xde, 0x3f, 0xfd, 0x50, 0x26, 0xea, 0xbb, 0x20,
0xd6, 0xad, 0x2e, 0xcd, 0xfe, 0xf2, 0x70, 0x1b,
0x19, 0xd1, 0x82, 0x15, 0xd7, 0xcb, 0x33, 0x60,
0x20, 0xbc, 0x43, 0xc9, 0x55, 0x0b, 0xc9, 0x20,
0xd9, 0x24, 0xd2, 0x49, 0xd0, 0x28, 0x4b, 0x90
};
COMPILER_ASSERT(sizeof(kDhNData) == kNetDiffieHellmanKeyBits / 8);
static const byte kDhXData[] = {
0xf9, 0xb2, 0x93, 0xbd, 0x02, 0xbd, 0x72, 0x48,
0xa9, 0x21, 0xbd, 0x09, 0x3e, 0x44, 0x65, 0x3e,
0xc2, 0xfd, 0x5a, 0xf0, 0x99, 0x3b, 0x3f, 0x5c,
0x47, 0x76, 0x5c, 0x1f, 0x84, 0xd8, 0x01, 0x68,
0xdc, 0x5f, 0xb6, 0xba, 0xc8, 0xfd, 0x79, 0x98,
0x62, 0x93, 0x36, 0x7f, 0x14, 0xcf, 0x33, 0x67,
0x84, 0x04, 0xcf, 0xa3, 0x7a, 0x65, 0xe9, 0x68,
0x4f, 0x58, 0x58, 0xb3, 0x8f, 0x3d, 0xdb, 0x3d
};
COMPILER_ASSERT(sizeof(kDhXData) == kNetDiffieHellmanKeyBits / 8);

View File

@ -0,0 +1,57 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* This file auto-generated by plDhKeyGen.exe
*
***/
static const unsigned kDhGValue = 4;
static const byte kDhNData[] = {
0x8d, 0xfa, 0x35, 0xe6, 0xf8, 0x7a, 0x50, 0x50,
0xab, 0x25, 0x4b, 0x81, 0xd1, 0xd7, 0x7a, 0x23,
0xa3, 0x9a, 0x21, 0x0f, 0x34, 0xab, 0x66, 0x2e,
0x16, 0x98, 0x55, 0xb6, 0xfc, 0x49, 0xd5, 0x50,
0xdc, 0xb8, 0x4c, 0x4d, 0xc7, 0xdb, 0xf1, 0x1c,
0x15, 0x4c, 0x55, 0xf5, 0x92, 0x0d, 0x6a, 0xec,
0x60, 0xbc, 0x55, 0xfa, 0x29, 0x2f, 0x6f, 0xc3,
0xd7, 0x21, 0x80, 0xa3, 0x6b, 0x44, 0x23, 0xb5,
};
COMPILER_ASSERT(sizeof(kDhNData) == kNetDiffieHellmanKeyBits / 8);
static const byte kDhXData[] = {
0xb3, 0x88, 0xff, 0x0b, 0x90, 0x70, 0x2b, 0x2e,
0x07, 0xbc, 0x62, 0x98, 0x83, 0x9d, 0x0f, 0x05,
0x39, 0xfa, 0x35, 0x39, 0xa9, 0xf3, 0xb3, 0xfc,
0xcd, 0x5e, 0xa9, 0xa6, 0x61, 0x0f, 0x9b, 0x38,
0x0f, 0x9c, 0xbe, 0xa0, 0xbe, 0x6f, 0x7f, 0xe4,
0x7c, 0xcb, 0xc4, 0x09, 0x6c, 0x8d, 0xce, 0x47,
0x68, 0x82, 0x32, 0xc5, 0x89, 0x94, 0xf9, 0xca,
0x69, 0x69, 0xd0, 0x60, 0x19, 0xb7, 0xf3, 0x1a,
};
COMPILER_ASSERT(sizeof(kDhXData) == kNetDiffieHellmanKeyBits / 8);

View File

@ -0,0 +1,45 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program 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, either version 3 of the License, or
(at your option) any later version.
This program 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNetBase.h
*
***/
#ifndef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PNNETBASE_H
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PNNETBASE_H
/*****************************************************************************
*
* Module includes
*
***/
#include "Private/pnNbAllIncludes.h"
#endif // PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETBASE_PNNETBASE_H