diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2012-12-28 22:37:48 -0800 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2012-12-28 22:37:48 -0800 |
commit | b3dcfdaa37644cdd271f509ae56d197be9b83fa2 (patch) | |
tree | 2903295e041f0ad2664976126cb0b3645b414e9c /libxrdp/libxrdp.h | |
parent | f91b33ed13302d66550fe24e35551cc3aaf95a53 (diff) | |
download | xrdp-proprietary-b3dcfdaa37644cdd271f509ae56d197be9b83fa2.tar.gz xrdp-proprietary-b3dcfdaa37644cdd271f509ae56d197be9b83fa2.zip |
libxrdp: add our own mppc compression instead of using the freerdp mppc
Diffstat (limited to 'libxrdp/libxrdp.h')
-rw-r--r-- | libxrdp/libxrdp.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index 34924715..6a4ac17e 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -116,7 +116,7 @@ struct xrdp_rdp int share_id; int mcs_channel; struct xrdp_client_info client_info; - void* mppc_enc; + struct xrdp_mppc_enc* mppc_enc; void* rfx_enc; }; @@ -213,6 +213,31 @@ struct xrdp_orders struct xrdp_orders_state orders_state; }; +#define PROTO_RDP_40 1 +#define PROTO_RDP_50 2 + +struct xrdp_mppc_enc +{ + int protocol_type; /* PROTO_RDP_40, PROTO_RDP_50 etc */ + char *historyBuffer; /* contains uncompressed data */ + char *outputBuffer; /* contains compressed data */ + char *outputBufferPlus; + int historyOffset; /* next free slot in historyBuffer */ + int buf_len; /* length of historyBuffer, protocol dependant */ + int bytes_in_opb; /* compressed bytes available in outputBuffer */ + int flags; /* PACKET_COMPRESSED, PACKET_AT_FRONT, PACKET_FLUSHED etc */ + int flagsHold; + int first_pkt; /* this is the first pkt passing through enc */ + tui16 *hash_table; +}; + +int APP_CC +compress_rdp(struct xrdp_mppc_enc *enc, tui8 *srcData, int len); +struct xrdp_mppc_enc * APP_CC +mppc_enc_new(int protocol_type); +void APP_CC +mppc_enc_free(struct xrdp_mppc_enc *enc); + /* xrdp_tcp.c */ struct xrdp_tcp* APP_CC xrdp_tcp_create(struct xrdp_iso* owner, struct trans* trans); |