devel libipm protocols - neutrinolabs/xrdp GitHub Wiki
Scope
This page applies to development versions of xrdp.
Introduction
xrdp incorporates a simple transport module which is used for all network-related functionality in xrdp. The main type used by this module is 'struct trans' in common/trans.h.
sesman and associated executables use a library called 'libipm' for message passing. This library is layered on top of the 'struct trans' and provides support for simple, structured messages. A key part of libipm is support for passing file descriptors between different components of xrdp.
The following transports are built on top of libipm:
Abbreviation | Name | Related processes |
---|---|---|
CCP | Connection Control protocol | xrdp and sesexec |
EICP | Executive Initialisation Control Protocol | sesman and sesexec |
ERCP | Executive Runtime Control Protocol | sesman and sesexec |
SCP | Session Control protocol | various processes, and sesman |
CCP
This communications channel is used for session control messages between an xrdp instance and the sesexec instance running a session.
The channel can only be created by a successful SCP 'connect session' call. Following this call, the SCP communications channel changes to a CCP communications channel.
EICP
This communications channel is setup between sesman and sesexec when sesexec is started by sesman. There is no other way to create this channel.
The channel is used to exchange messages, including authentication, before a session is started by sesexec.
ERCP
This communications channel is used to exchange session control messages between sesman and sesexec, when sesexec has an attached session.
The communications channel is set up in one of two ways:
- Following a successful EICP 'create session' call. Following a successful call, the EICP channel becomes an ERCP channel.
- During sesman restart, sesman re-establish connections to all sesexec processes by scanning a file system directory only accessible to
root
. This directory contains Unix Domain Sockets which allow EICP channels to be re-established.
SCP
This communications channel is used by various processes to ask sesman (and sesexec) to perform session management functions.