FreeRDP
mcs.c File Reference
#include <winpr/crt.h>
#include <freerdp/log.h>
#include "gcc.h"
#include "mcs.h"
#include "tpdu.h"
#include "tpkt.h"
#include "client.h"
#include "connection.h"

Macros

#define TAG   FREERDP_TAG("core")
 

Functions

static int mcs_initialize_client_channels (rdpMcs *mcs, rdpSettings *settings)
 
BOOL mcs_read_domain_mcspdu_header (wStream *s, enum DomainMCSPDU *domainMCSPDU, UINT16 *length)
 
void mcs_write_domain_mcspdu_header (wStream *s, enum DomainMCSPDU domainMCSPDU, UINT16 length, BYTE options)
 
static BOOL mcs_init_domain_parameters (DomainParameters *domainParameters, UINT32 maxChannelIds, UINT32 maxUserIds, UINT32 maxTokenIds, UINT32 maxMCSPDUsize)
 
static BOOL mcs_read_domain_parameters (wStream *s, DomainParameters *domainParameters)
 
static BOOL mcs_write_domain_parameters (wStream *s, DomainParameters *domainParameters)
 
BOOL mcs_merge_domain_parameters (DomainParameters *targetParameters, DomainParameters *minimumParameters, DomainParameters *maximumParameters, DomainParameters *pOutParameters)
 
BOOL mcs_recv_connect_initial (rdpMcs *mcs, wStream *s)
 
BOOL mcs_write_connect_initial (wStream *s, rdpMcs *mcs, wStream *userData)
 
BOOL mcs_write_connect_response (wStream *s, rdpMcs *mcs, wStream *userData)
 
BOOL mcs_send_connect_initial (rdpMcs *mcs)
 
BOOL mcs_recv_connect_response (rdpMcs *mcs, wStream *s)
 
BOOL mcs_send_connect_response (rdpMcs *mcs)
 
BOOL mcs_recv_erect_domain_request (rdpMcs *mcs, wStream *s)
 
BOOL mcs_send_erect_domain_request (rdpMcs *mcs)
 
BOOL mcs_recv_attach_user_request (rdpMcs *mcs, wStream *s)
 
BOOL mcs_send_attach_user_request (rdpMcs *mcs)
 
BOOL mcs_recv_attach_user_confirm (rdpMcs *mcs, wStream *s)
 
BOOL mcs_send_attach_user_confirm (rdpMcs *mcs)
 
BOOL mcs_recv_channel_join_request (rdpMcs *mcs, wStream *s, UINT16 *channelId)
 
BOOL mcs_send_channel_join_request (rdpMcs *mcs, UINT16 channelId)
 
BOOL mcs_recv_channel_join_confirm (rdpMcs *mcs, wStream *s, UINT16 *channelId)
 
BOOL mcs_send_channel_join_confirm (rdpMcs *mcs, UINT16 channelId)
 
BOOL mcs_recv_disconnect_provider_ultimatum (rdpMcs *mcs, wStream *s, int *reason)
 
BOOL mcs_send_disconnect_provider_ultimatum (rdpMcs *mcs)
 
BOOL mcs_client_begin (rdpMcs *mcs)
 
rdpMcs * mcs_new (rdpTransport *transport)
 
void mcs_free (rdpMcs *mcs)
 

Variables

static const BYTE callingDomainSelector [1] = "\x01"
 
static const BYTE calledDomainSelector [1] = "\x01"
 

Macro Definition Documentation

#define TAG   FREERDP_TAG("core")

FreeRDP: A Remote Desktop Protocol Implementation T.125 Multipoint Communication Service (MCS) Protocol

Copyright 2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2015 Thincast Technologies GmbH Copyright 2015 DI (FH) Martin Haimberger marti.nosp@m.n.ha.nosp@m.imber.nosp@m.ger@.nosp@m.thinc.nosp@m.ast..nosp@m.com Copyright 2017 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyright 2017 Thincast Technologies GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

BOOL mcs_client_begin ( rdpMcs *  mcs)

Here is the call graph for this function:

Here is the caller graph for this function:

void mcs_free ( rdpMcs *  mcs)

Free MCS module.

Parameters
mcsMCS module to be freed

Here is the caller graph for this function:

static BOOL mcs_init_domain_parameters ( DomainParameters domainParameters,
UINT32  maxChannelIds,
UINT32  maxUserIds,
UINT32  maxTokenIds,
UINT32  maxMCSPDUsize 
)
static

Initialize MCS Domain Parameters.

Parameters
domainParametersdomain parameters
maxChannelIdsmax channel ids
maxUserIdsmax user ids
maxTokenIdsmax token ids
maxMCSPDUsizemax MCS PDU size

Here is the caller graph for this function:

static int mcs_initialize_client_channels ( rdpMcs *  mcs,
rdpSettings *  settings 
)
static

Here is the caller graph for this function:

BOOL mcs_merge_domain_parameters ( DomainParameters targetParameters,
DomainParameters minimumParameters,
DomainParameters maximumParameters,
DomainParameters pOutParameters 
)

Merge MCS Domain Parameters.

Parameters
domainParameterstarget parameters
domainParametersminimum parameters
domainParametersmaximum parameters
domainParametersoutput parameters

Here is the caller graph for this function:

rdpMcs* mcs_new ( rdpTransport *  transport)

Instantiate new MCS module.

Parameters
transporttransport
Returns
new MCS module

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_read_domain_mcspdu_header ( wStream *  s,
enum DomainMCSPDU domainMCSPDU,
UINT16 length 
)

Read a DomainMCSPDU header.

Parameters
sstream
domainMCSPDUDomainMCSPDU type
lengthTPKT length
Returns

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL mcs_read_domain_parameters ( wStream *  s,
DomainParameters domainParameters 
)
static

Read MCS Domain Parameters.

Parameters
sstream
domainParametersdomain parameters

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_recv_attach_user_confirm ( rdpMcs *  mcs,
wStream *  s 
)

Read MCS Attach User Confirm.
http://msdn.microsoft.com/en-us/library/cc240525/

Parameters
mcsmcs module

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_recv_attach_user_request ( rdpMcs *  mcs,
wStream *  s 
)

Read MCS Attach User Request.
http://msdn.microsoft.com/en-us/library/cc240524/

Parameters
mcsmcs module
sstream

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_recv_channel_join_confirm ( rdpMcs *  mcs,
wStream *  s,
UINT16 channelId 
)

Read MCS Channel Join Confirm.
http://msdn.microsoft.com/en-us/library/cc240527/

Parameters
mcsmcs module

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_recv_channel_join_request ( rdpMcs *  mcs,
wStream *  s,
UINT16 channelId 
)

Read MCS Channel Join Request.
http://msdn.microsoft.com/en-us/library/cc240526/

Parameters
mcsmcs module
sstream

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_recv_connect_initial ( rdpMcs *  mcs,
wStream *  s 
)

Read an MCS Connect Initial PDU.
http://msdn.microsoft.com/en-us/library/cc240508/

Parameters
mcsMCS module
sstream

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_recv_connect_response ( rdpMcs *  mcs,
wStream *  s 
)

Read MCS Connect Response.
http://msdn.microsoft.com/en-us/library/cc240501/

Parameters
mcsmcs module

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_recv_disconnect_provider_ultimatum ( rdpMcs *  mcs,
wStream *  s,
int *  reason 
)

Receive MCS Disconnect Provider Ultimatum PDU.

Parameters
mcsmcs module

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_recv_erect_domain_request ( rdpMcs *  mcs,
wStream *  s 
)

Read MCS Erect Domain Request.
http://msdn.microsoft.com/en-us/library/cc240523/

Parameters
mcs
sstream

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_send_attach_user_confirm ( rdpMcs *  mcs)

Send MCS Attach User Confirm.
http://msdn.microsoft.com/en-us/library/cc240525/

Parameters
mcsmcs module

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_send_attach_user_request ( rdpMcs *  mcs)

Send MCS Attach User Request.
http://msdn.microsoft.com/en-us/library/cc240524/

Parameters
mcsmcs module

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_send_channel_join_confirm ( rdpMcs *  mcs,
UINT16  channelId 
)

Send MCS Channel Join Confirm.
http://msdn.microsoft.com/en-us/library/cc240527/

Parameters
mcsmcs module

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_send_channel_join_request ( rdpMcs *  mcs,
UINT16  channelId 
)

Send MCS Channel Join Request.
http://msdn.microsoft.com/en-us/library/cc240526/

Parameters
mcsmcs module
channel_idchannel id

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_send_connect_initial ( rdpMcs *  mcs)

Send MCS Connect Initial.
http://msdn.microsoft.com/en-us/library/cc240508/

Parameters
mcsmcs module

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_send_connect_response ( rdpMcs *  mcs)

Send MCS Connect Response.
http://msdn.microsoft.com/en-us/library/cc240501/

Parameters
mcsmcs module

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_send_disconnect_provider_ultimatum ( rdpMcs *  mcs)

Send MCS Disconnect Provider Ultimatum PDU.

Parameters
mcsmcs module

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_send_erect_domain_request ( rdpMcs *  mcs)

Send MCS Erect Domain Request.
http://msdn.microsoft.com/en-us/library/cc240523/

Parameters
mcs

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_write_connect_initial ( wStream *  s,
rdpMcs *  mcs,
wStream *  userData 
)

Write an MCS Connect Initial PDU.
http://msdn.microsoft.com/en-us/library/cc240508/

Parameters
sstream
mcsMCS module
user_dataGCC Conference Create Request

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL mcs_write_connect_response ( wStream *  s,
rdpMcs *  mcs,
wStream *  userData 
)

Write an MCS Connect Response PDU.
http://msdn.microsoft.com/en-us/library/cc240508/

Parameters
sstream
mcsMCS module
user_dataGCC Conference Create Response

Here is the call graph for this function:

Here is the caller graph for this function:

void mcs_write_domain_mcspdu_header ( wStream *  s,
enum DomainMCSPDU  domainMCSPDU,
UINT16  length,
BYTE  options 
)

Write a DomainMCSPDU header.

Parameters
sstream
domainMCSPDUDomainMCSPDU type
lengthTPKT length

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL mcs_write_domain_parameters ( wStream *  s,
DomainParameters domainParameters 
)
static

Write MCS Domain Parameters.

Parameters
sstream
domainParametersdomain parameters

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const BYTE calledDomainSelector[1] = "\x01"
static
const BYTE callingDomainSelector[1] = "\x01"
static

T.125 MCS is defined in:

http://www.itu.int/rec/T-REC-T.125-199802-I/ ITU-T T.125 Multipoint Communication Service Protocol Specification Connect-Initial ::= [APPLICATION 101] IMPLICIT SEQUENCE { callingDomainSelector OCTET_STRING, calledDomainSelector OCTET_STRING, upwardFlag BOOLEAN, targetParameters DomainParameters, minimumParameters DomainParameters, maximumParameters DomainParameters, userData OCTET_STRING }

DomainParameters ::= SEQUENCE { maxChannelIds INTEGER (0..MAX), maxUserIds INTEGER (0..MAX), maxTokenIds INTEGER (0..MAX), numPriorities INTEGER (0..MAX), minThroughput INTEGER (0..MAX), maxHeight INTEGER (0..MAX), maxMCSPDUsize INTEGER (0..MAX), protocolVersion INTEGER (0..MAX) }

Connect-Response ::= [APPLICATION 102] IMPLICIT SEQUENCE { result Result, calledConnectId INTEGER (0..MAX), domainParameters DomainParameters, userData OCTET_STRING }

Result ::= ENUMERATED { rt-successful (0), rt-domain-merging (1), rt-domain-not-hierarchical (2), rt-no-such-channel (3), rt-no-such-domain (4), rt-no-such-user (5), rt-not-admitted (6), rt-other-user-id (7), rt-parameters-unacceptable (8), rt-token-not-available (9), rt-token-not-possessed (10), rt-too-many-channels (11), rt-too-many-tokens (12), rt-too-many-users (13), rt-unspecified-failure (14), rt-user-rejected (15) }

ErectDomainRequest ::= [APPLICATION 1] IMPLICIT SEQUENCE { subHeight INTEGER (0..MAX), subInterval INTEGER (0..MAX) }

AttachUserRequest ::= [APPPLICATION 10] IMPLICIT SEQUENCE { }

AttachUserConfirm ::= [APPLICATION 11] IMPLICIT SEQUENCE { result Result, initiator UserId OPTIONAL }

ChannelJoinRequest ::= [APPLICATION 14] IMPLICIT SEQUENCE { initiator UserId, channelId ChannelId }

ChannelJoinConfirm ::= [APPLICATION 15] IMPLICIT SEQUENCE { result Result, initiator UserId, requested ChannelId, channelId ChannelId OPTIONAL }

SendDataRequest ::= [APPLICATION 25] IMPLICIT SEQUENCE { initiator UserId, channelId ChannelId, dataPriority DataPriority, segmentation Segmentation, userData OCTET_STRING }

DataPriority ::= CHOICE { top NULL, high NULL, medium NULL, low NULL, ... }

Segmentation ::= BIT_STRING { begin (0), end (1) } (SIZE(2))

SendDataIndication ::= SEQUENCE { initiator UserId, channelId ChannelId, reliability BOOLEAN, domainReferenceID INTEGER (0..65535) OPTIONAL, dataPriority DataPriority, segmentation Segmentation, userData OCTET_STRING, totalDataSize INTEGER OPTIONAL, nonStandard SEQUENCE OF NonStandardParameter OPTIONAL, ... }