From 0e9e25f100a70440dc54c18d4643ee74ba36840b Mon Sep 17 00:00:00 2001 From: Koichiro IWAO Date: Wed, 12 Dec 2018 17:19:18 +0900 Subject: [PATCH] use MS name for PDU types RDP_PDU_REDIRECT has been removed as it is not found in MS-RDPBCGR and not used anywhere. --- common/xrdp_constants.h | 12 ++++++------ libxrdp/libxrdp.c | 4 ++-- libxrdp/xrdp_caps.c | 2 +- libxrdp/xrdp_rdp.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/common/xrdp_constants.h b/common/xrdp_constants.h index 4d44dabe..1302b1af 100644 --- a/common/xrdp_constants.h +++ b/common/xrdp_constants.h @@ -671,12 +671,12 @@ #define LICENCE_SIGNATURE_SIZE 16 -/* RDP PDU codes */ -#define RDP_PDU_DEMAND_ACTIVE 1 -#define RDP_PDU_CONFIRM_ACTIVE 3 -#define RDP_PDU_REDIRECT 4 -#define RDP_PDU_DEACTIVATE 6 -#define RDP_PDU_DATA 7 +/* PDU Types (MS-RDPBCGR 2.2.8.1.1.1.1) */ +#define PDUTYPE_DEMANDACTIVEPDU 0x1 +#define PDUTYPE_CONFIRMACTIVEPDU 0x3 +#define PDUTYPE_DEACTIVATEALLPDU 0x6 +#define PDUTYPE_DATAPDU 0x7 +#define PDUTYPE_SERVER_REDIR_PKT 0xA /* See T.128 */ /* not used anywhere */ diff --git a/libxrdp/libxrdp.c b/libxrdp/libxrdp.c index 2720fab2..f82ae953 100644 --- a/libxrdp/libxrdp.c +++ b/libxrdp/libxrdp.c @@ -230,10 +230,10 @@ libxrdp_process_data(struct xrdp_session *session, struct stream *s) case 0: dead_lock_counter++; break; - case RDP_PDU_CONFIRM_ACTIVE: /* 3 */ + case PDUTYPE_CONFIRMACTIVEPDU: xrdp_caps_process_confirm_active(rdp, s); break; - case RDP_PDU_DATA: /* 7 */ + case PDUTYPE_DATAPDU: if (xrdp_rdp_process_data(rdp, s) != 0) { DEBUG(("libxrdp_process_data returned non zero")); diff --git a/libxrdp/xrdp_caps.c b/libxrdp/xrdp_caps.c index f1983421..529eeeaa 100644 --- a/libxrdp/xrdp_caps.c +++ b/libxrdp/xrdp_caps.c @@ -1024,7 +1024,7 @@ xrdp_caps_send_demand_active(struct xrdp_rdp *self) caps_count_ptr[2] = caps_count >> 16; caps_count_ptr[3] = caps_count >> 24; - if (xrdp_rdp_send(self, s, RDP_PDU_DEMAND_ACTIVE) != 0) + if (xrdp_rdp_send(self, s, PDUTYPE_DEMANDACTIVEPDU) != 0) { free_stream(s); return 1; diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index ff099da9..e4ee660f 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -561,7 +561,7 @@ xrdp_rdp_send_data(struct xrdp_rdp *self, struct stream *s, DEBUG(("in xrdp_rdp_send_data")); s_pop_layer(s, rdp_hdr); len = (int)(s->end - s->p); - pdutype = 0x10 | RDP_PDU_DATA; + pdutype = 0x10 | PDUTYPE_DATAPDU; pdulen = len; dlen = len; ctype = 0; @@ -1296,7 +1296,7 @@ xrdp_rdp_send_deactivate(struct xrdp_rdp *self) s_mark_end(s); - if (xrdp_rdp_send(self, s, RDP_PDU_DEACTIVATE) != 0) + if (xrdp_rdp_send(self, s, PDUTYPE_DEACTIVATEALLPDU) != 0) { free_stream(s); DEBUG(("out xrdp_rdp_send_deactivate error"));