Split licensing "tag" into 8-bit tag/version and remove LICENCE_TAG_*_5

constants.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@363 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Matt Chapman 2003-04-16 08:08:40 +00:00
parent 748a2b7485
commit ce7ad4cfb0
2 changed files with 11 additions and 30 deletions

View File

@ -85,26 +85,14 @@ enum MCS_PDU_TYPE
#define LICENCE_HWID_SIZE 20
#define LICENCE_SIGNATURE_SIZE 16
#define LICENCE_TAG_DEMAND 0x0201
#define LICENCE_TAG_AUTHREQ 0x0202
#define LICENCE_TAG_ISSUE 0x0203
#define LICENCE_TAG_REISSUE 0x0204
#define LICENCE_TAG_PRESENT 0x0212
#define LICENCE_TAG_REQUEST 0x0213
#define LICENCE_TAG_AUTHRESP 0x0215
#define LICENCE_TAG_RESULT 0x02ff
/* RDP5 licensing constants - thanks goes to Steve Fosdick for finding them! */
#define LICENCE_TAG_DEMAND_5 0x0301
#define LICENCE_TAG_AUTHREQ_5 0x0302
#define LICENCE_TAG_ISSUE_5 0x0303
#define LICENCE_TAG_REISSUE_5 0x0304
#define LICENCE_TAG_PRESENT_5 0x0312
#define LICENCE_TAG_REQUEST_5 0x0313
#define LICENCE_TAG_AUTHRESP_5 0x0315
#define LICENCE_TAG_RESULT_5 0x03ff
#define LICENCE_TAG_DEMAND 0x01
#define LICENCE_TAG_AUTHREQ 0x02
#define LICENCE_TAG_ISSUE 0x03
#define LICENCE_TAG_REISSUE 0x04
#define LICENCE_TAG_PRESENT 0x12
#define LICENCE_TAG_REQUEST 0x13
#define LICENCE_TAG_AUTHRESP 0x15
#define LICENCE_TAG_RESULT 0xff
#define LICENCE_TAG_USER 0x000f
#define LICENCE_TAG_HOST 0x0010

View File

@ -283,34 +283,27 @@ licence_process_issue(STREAM s)
void
licence_process(STREAM s)
{
uint16 tag;
uint8 tag;
in_uint16_le(s, tag);
in_uint8s(s, 2); /* length */
in_uint8(s, tag);
in_uint8s(s, 3); /* version, length */
switch (tag)
{
case LICENCE_TAG_DEMAND:
case LICENCE_TAG_DEMAND_5:
licence_process_demand(s);
break;
case LICENCE_TAG_AUTHREQ:
case LICENCE_TAG_AUTHREQ_5:
licence_process_authreq(s);
break;
case LICENCE_TAG_ISSUE:
case LICENCE_TAG_ISSUE_5:
licence_process_issue(s);
break;
case LICENCE_TAG_REISSUE:
case LICENCE_TAG_REISSUE_5:
break;
case LICENCE_TAG_RESULT:
case LICENCE_TAG_RESULT_5:
break;
default: