Skip to content

Packet Flow Client

Joseph W Becher edited this page Nov 26, 2017 · 5 revisions

Login

cNPSLoginAPI::NPSUserLogin -> Is the connection the Login port

It's called in INET_LogOn.

tsAsyncLoginInfo * pInfo = (tsAsyncLoginInfo*)data;

typedef struct
{
  char          userName[NPS_USERNAME_LEN];
  char          password[NPS_PASSWORD_LEN];
  unsigned int  crc;
	char *				errTxt;
	char *				errURL;
}tsAsyncLoginInfo;
typedef struct _NPS_UserStatus
{
	bool						isBan;
	bool						isGagged;
	NPS_CUSTOMERID	customerId;
	char						sessionKeyStr[NPS_SESSION_KEY_LEN];
	int							sessionKeyLen;
	void *					sessionKey;
} NPS_UserStatus;
NPSSTATUS status = m_NPSLoginAPI->NPSUserLogin(
  pInfo->userName, 
  pInfo->password, 
  m_AuthServiceId, 
  pInfo->crc, 
  (NPS_UserStatus &)m_UserStatus,
  pInfo->errTxt,
  pInfo->errURL,
  npsLogin_IdleCallback,
  this
);

Lobby

cNPSAPI::NPSConnectToServer -> Is the connection to the Lobby port

It is an NPS_LoginInfo packet in MessageTypes

Example packet:

01 00  [00 9c]  [00 00 00 02]  [00 00 00 0d] [44 6f 63 74 
6f 72 20 42 72 6f 77 6e 00] [00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00] [00 00 00 01] 00 00 00
00 [00 00 00 08] [34 2e 35 2e 30 2e 30 00] 00 00 00 
09 [63 68 6f 6f 63 68 6f 6f 00] 00 00 00 0e [31 39
32 2e 31 36 38 2e 31 2e 31 31 32 00] 06 92 51 e7 
f9 aa 66 b3 1a 3b 9b ed f1 ec cf 6a
Clone this wiki locally