Commit Graph

91 Commits

Author SHA1 Message Date
matt335672 63afb676e6 drdynvc: Improve dynamic channel support
The dynamic channel handler in xrdp_channel.c is updated to allow
the procs `data_first` pointer to be NULL. If this is done, the
channel handler performs all the dechunking necessary for the channel,
and only complete data PDUs are passed to procs 'data' callback.

This facility is applied to the dynamic channels supported by xrdp_mm.c.
The incoming callbacks for these channels now provide complete support
for the specification in [MS-RDPEDYC]. The existing channels were
incomplete in these respects:
1) The "Microsoft::Windows::RDS::Graphics" channel handler did not
   support incoming PDUs between 1591 and 1600 bytes. The specification
   calls for these to be sent as a single DATA_FIRST PDU.
2) The "Microsoft::Windows::RDS::DisplayControl" channel handler did
   not support incoming PDUs over 1590 bytes.
2026-08-12 11:31:47 +01:00
matt335672 c4727ad8f3 Replace X11 display number with a display string
As far as possible, use of the X11 display number is kept to
X11-specific routines. This is to make it easier to restructure
the code to add non-X11 display support.
2026-03-04 14:34:31 +00:00
Leonard Nielsen 0edde4c090 Introduce instance_name field into xrdp.ini and xrdp-sesrun, along with
the N policy in sesman.ini, allowing xrdp sessions to be tagged with an
instance name to enable persistent association with a specific
xrdp instance, to allow experiences where users reconnect to specific
sessions based on e.g. the xrdp listening port used.
2026-01-20 12:03:15 +01:00
matt335672 ac95cdffc3 Rename client_info hostname to client_name
This name better matches the name from [MS-RDPBCGR]. Also, the size
of the UTF-8 buffer allocated for the client name is not large
enough for some of the names which could potentially be passed across
in UTF-16 from the client.
2025-07-21 11:30:14 +01:00
Koichiro Iwao 7214afb132 Add DEFAULT_ prefix for default frame capture intervals
(cherry picked from commit 65f9ae4afbd5c8c4c608a9014177542d7d4f51a6)
2024-11-21 20:51:57 +09:00
Koichiro Iwao 5fb59a7c38 Set different frame capture interval for H.264 and RFX
and pass them to xorgxrdp.

(cherry picked from commit c55694c51b570d84ad63bfb5dc7bdec75fee57da)
2024-11-18 23:19:35 +09:00
matt335672 5779edd23f Replace magic numbers in keyboard code with defs
- All scancode definitions are moved to scancode.h
- Magic numbers are replaced where applicable with definitions
2024-08-05 10:44:10 +01:00
matt335672 c91ef80ca9 Implement scancode indexing
The mapping from scancodes to the indexes used in xrdp_keymap
is not well designed and contains an implicit dependency on
keycode values.

This mapping is alse slightly different from the index used for
the 'keys' map in the xrdp_wm structure.

This commit introduces support for mapping scancodes directly
to 'scancode indexes' suitable for indexing into both structures.

Some renaming is also done; [MS-RDPBCGR] uses the terms scancode
and keyCode interchangeably. An effort is made to use key_code for a
raw value from a TS_KEYBOARD_EVENT, and scancode for a value which is
produced by the scancode module.
2024-08-05 10:44:10 +01:00
matt335672 fe410a595d Update genkeymap executable to use new format 2024-05-24 16:33:08 +01:00
Nexarian afa70e464a Initial rfx progressive integration
- Mostly base functions and utilities necessary to enable RFX
  Progressive
- Add more EGFX work & mode flags.
- Update encoder.
- Does not yet include caps determination to enable RFX progressive
  (yet).
- Update protocol constants
2024-01-31 19:08:29 -05:00
matt335672 c52a173db0 Use symbolic constants in the modules for WM events 2023-11-27 15:42:24 +00:00
sefler cb2b32e6c5 fix code review issues 2022-09-15 23:55:23 +08:00
sefler c4d6714979 touchpad scrolling works now 2022-09-15 23:53:26 +08:00
a1346054 7fe18cc1c0 fix typos 2022-09-03 02:01:48 +00:00
matt335672 79bec8110c Unify connection fields for the connected client
The connected client is currently described in two places in
the xrdp_client_info structure:-

1) In the connection_description field. This was introduced as
   field client_ip by commit d797b2cf49
   for xrdp v0.6.0

2) In the client_addr and client_port fields introduced by commit
   25369460a1 for xrdp v0.8.0

This commit unifies these two sets of fields into a single
set of fields describing the connection IP and port (for
AF_INET/AF_INET6 connections only) and a connection description
for all connection types.

The code in os_calls to provide client logging has been simplified
somewhat which should make it easier to add new connection types (e.g.
AF_VSOCK).

The old connection_description field used to be passed to sesman to
inform sesman of the IP address of the client, and also to provide
a string for 'C' field session policy matching. 'C' field session policy
matching does not actually need this string (see #2239), and so now only
the IP field is passed to sesman.
2022-05-18 12:35:07 +01:00
Alexandre Quesnel bb9d3079c0 Fixing formatting with astyle in common/* 2021-03-14 23:33:31 +00:00
aquesnel 0ec471b02d Add detailed logging to libxrdp (#1742)
* Added s_rem(s) for getting the remaining bytes in a stream
* Added s_rem_out() macro
* Fixed 15bpp pointer error checking
* Combined the 512 and 2048 bit certificate sending  code paths
* Other detailed comments and logging added following MS-RDPBCGR
2021-02-04 10:11:54 +00:00
Bolke de Bruin 4d7b916faf Improve description 2020-08-21 09:19:49 +02:00
Bolke de Bruin 47e1c5d359 Add description 2020-08-19 12:50:01 +02:00
bolkedebruin 5cd36c511c Set max character buffer len to 512 per MS specification
The MS specs determine that the character buffer lenngths
for usernames, domains, passwords, alternate shells, etc
can be up to 512 characters including the mandatory null
terminator.
2020-08-17 10:35:35 +02:00
metalefty 627da8da3e Merge pull request #1470 from matt335672/rename-includes
Move MS-defined constants into separate includes
2020-01-16 15:01:18 +09:00
okhowang(王沛文) 32ef6ea3dd support mousex button 8/9 2020-01-14 18:04:06 +08:00
matt335672 6f881d47d3 Rationalise ms- constants
Constants from MS documents (MS-RDPBCGR etc) moved out of
common/xrdp_constants.h into includes named after the documents.

Similar includes moved from sesman/chansrv to the common area.
2020-01-06 15:46:37 +00:00
Jay Sorg 0fbbc47092 cleanup refresh rect and check stream bounds 2019-11-07 02:03:57 +00:00
Koichiro IWAO 062699334e Fix typo s/BITMACACHE/BITMAPCACHE/ 2018-12-13 17:27:25 +09:00
Koichiro IWAO 0e9e25f100 use MS name for PDU types
RDP_PDU_REDIRECT has been removed as it is not found in MS-RDPBCGR and
not used anywhere.
2018-12-12 17:40:58 +09:00
Koichiro IWAO b2a7bb0cf0 use MS for orderType constants 2018-12-12 17:40:58 +09:00
Koichiro IWAO 83d3349c5a add some more constants and use them 2018-11-27 15:08:22 +09:00
Koichiro IWAO 43f6ac0723 use MS name for constants 2018-11-27 15:08:22 +09:00
daixj fcb1b825c5 neutrinordp: don't enable remote_app if the INFO_RAIL flag is not set 2018-11-23 17:18:26 +08:00
Koichiro IWAO c15cd91198 common: add constants of glyph support level 2018-10-25 16:00:53 +09:00
Koichiro IWAO 577bd8214f common: add more capset constants
defined at MS-RDPBCGR 2.2.1.13.1.1.1 [1] and sort

[1] https://msdn.microsoft.com/en-us/library/cc240486.aspx
2017-12-01 11:20:42 +09:00
Koichiro IWAO 77a34e0a7b common: express capability set constants in hex
as same as done in  MS-RDPBCGR 2.2.1.13.1.1.1 [1].

[1] https://msdn.microsoft.com/en-us/library/cc240486.aspx
2017-12-01 11:20:42 +09:00
Koichiro IWAO 788ae1467a xrdp_sec: constify color depth value 2017-12-01 11:20:42 +09:00
Koichiro IWAO 3de3a4fab5 common: add more references to constants' origin
classify constants into these 5 types

* constants for xrdp
* constants come from ITU-T Recommendations
* constants come from Remote Desktop Protocol
* constants come from other MS products
* unclassified yet
2017-11-24 21:45:48 +09:00
Koichiro IWAO 799c230998 common: add references to constants' origin 2017-11-24 21:45:48 +09:00
Koichiro IWAO a6fd518a48 fix typo s/Roration/Rotation/ 2017-11-06 16:18:42 +09:00
Koichiro IWAO 2475893402 Constify extended mouse events 2017-11-06 16:18:42 +09:00
Koichiro IWAO 27aef96e81 Constify mouse event flags, use the MS name for constants 2017-11-06 16:18:42 +09:00
Koichiro IWAO 4a2818e183 Add some more Input Capability Set constants 2017-11-06 16:18:42 +09:00
Koichiro IWAO ced3a4817f xrdp: constify input event type 2017-10-02 09:39:48 +09:00
Jay Sorg 021a78f4c6 chansrv: sound, use WAVE_FORMAT_AAC not WAVE_FORMAT_AAC_MS 2017-08-04 17:24:57 -07:00
Jay Sorg bf0d56c314 chansrv: sound, add aac 2017-08-04 17:24:57 -07:00
Koichiro IWAO dbaf23e93b chansrv: constify wFormatTag 2017-07-25 11:40:04 +09:00
Koichiro IWAO 0e7844ab02 Constify MCS connectionType 2017-06-06 10:04:48 +09:00
speidy 2f382d2a16 libxrdp: print connected client name to log 2017-03-21 22:02:29 -07:00
metalefty 25e5243ecf Merge pull request #553 from jsorg71/libpainter
add libpainter for drawing when client does not have minimum orders
2016-12-20 17:00:48 +09:00
Jay Sorg 1f51586769 add libpainter for drawing when client does not have minimum orders 2016-12-15 21:17:50 -08:00
speidy 4697354044 xrdp_constants: move CAPSET constants to their place 2016-12-13 19:35:56 -05:00
speidy 917aadd2d1 libxrdp: more constants 2016-12-13 18:18:34 -05:00