FreeRDP
|
#include <freerdp/config.h>
#include <winpr/crt.h>
#include <winpr/assert.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 | |
const char * | mcs_domain_pdu_string (DomainMCSPDU pdu) |
static BOOL | mcs_merge_domain_parameters (DomainParameters *targetParameters, DomainParameters *minimumParameters, DomainParameters *maximumParameters, DomainParameters *pOutParameters) |
static BOOL | mcs_write_connect_initial (wStream *s, rdpMcs *mcs, wStream *userData) |
static BOOL | mcs_write_connect_response (wStream *s, rdpMcs *mcs, wStream *userData) |
static BOOL | mcs_read_domain_mcspdu_header (wStream *s, DomainMCSPDU domainMCSPDU, UINT16 *length, DomainMCSPDU *actual) |
static int | mcs_initialize_client_channels (rdpMcs *mcs, const rdpSettings *settings) |
BOOL | mcs_write_domain_mcspdu_header (wStream *s, 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_recv_connect_initial (rdpMcs *mcs, wStream *s) |
static 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, const rdpSettings *settings, 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) |
BOOL | mcs_server_apply_to_settings (const rdpMcs *mcs, rdpSettings *settings) |
Variables | |
static const BYTE | callingDomainSelector [1] = "\x01" |
static const BYTE | calledDomainSelector [1] = "\x01" |
#define TAG FREERDP_TAG("core") |
FreeRDP: A Remote Desktop Protocol Implementation T.125 Multipoint Communication Service (MCS) Protocol
Copyright 2011 Marc-Andre Moreau marca Copyright 2015 Thincast Technologies GmbH Copyright 2015 DI (FH) Martin Haimberger ndre .more au@g mail. commarti Copyright 2017 Armin Novak n.ha imber ger@ thinc ast. comarmin Copyright 2017 Thincast Technologies GmbH .nov ak@th inca st.co m
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.
BOOL mcs_client_begin | ( | rdpMcs * | mcs | ) |
const char* mcs_domain_pdu_string | ( | DomainMCSPDU | pdu | ) |
void mcs_free | ( | rdpMcs * | mcs | ) |
Free MCS module.
mcs | MCS module to be freed |
|
static |
Initialize MCS Domain Parameters.
domainParameters | domain parameters |
maxChannelIds | max channel ids |
maxUserIds | max user ids |
maxTokenIds | max token ids |
maxMCSPDUsize | max MCS PDU size |
|
static |
|
static |
Merge MCS Domain Parameters.
targetParameters | target parameters |
minimumParameters | minimum parameters |
maximumParameters | maximum parameters |
pOutParameters | output parameters |
rdpMcs* mcs_new | ( | rdpTransport * | transport | ) |
Instantiate new MCS module.
transport | transport |
|
static |
Read a DomainMCSPDU header.
s | stream |
domainMCSPDU | DomainMCSPDU type |
length | TPKT length |
|
static |
Read MCS Domain Parameters.
s | stream |
domainParameters | domain parameters |
BOOL mcs_recv_attach_user_confirm | ( | rdpMcs * | mcs, |
wStream * | s | ||
) |
Read MCS Attach User Confirm. msdn{cc240525}
mcs | mcs module |
BOOL mcs_recv_attach_user_request | ( | rdpMcs * | mcs, |
wStream * | s | ||
) |
Read MCS Attach User Request. msdn{cc240524}
mcs | mcs module |
s | stream |
Read MCS Channel Join Confirm. msdn{cc240527}
mcs | mcs module |
BOOL mcs_recv_channel_join_request | ( | rdpMcs * | mcs, |
const rdpSettings * | settings, | ||
wStream * | s, | ||
UINT16 * | channelId | ||
) |
Read MCS Channel Join Request. msdn{cc240526}
mcs | mcs module |
s | stream |
BOOL mcs_recv_connect_initial | ( | rdpMcs * | mcs, |
wStream * | s | ||
) |
Read an MCS Connect Initial PDU. msdn{cc240508}
mcs | MCS module |
s | stream |
BOOL mcs_recv_connect_response | ( | rdpMcs * | mcs, |
wStream * | s | ||
) |
Read MCS Connect Response. msdn{cc240501}
mcs | mcs module |
BOOL mcs_recv_disconnect_provider_ultimatum | ( | rdpMcs * | mcs, |
wStream * | s, | ||
int * | reason | ||
) |
Receive MCS Disconnect Provider Ultimatum PDU.
mcs | mcs module |
BOOL mcs_recv_erect_domain_request | ( | rdpMcs * | mcs, |
wStream * | s | ||
) |
Read MCS Erect Domain Request. msdn{cc240523}
mcs | MCS module to use |
s | stream |
BOOL mcs_send_attach_user_confirm | ( | rdpMcs * | mcs | ) |
Send MCS Attach User Confirm. msdn{cc240525}
mcs | mcs module |
BOOL mcs_send_attach_user_request | ( | rdpMcs * | mcs | ) |
Send MCS Attach User Request. msdn{cc240524}
mcs | mcs module |
BOOL mcs_send_channel_join_confirm | ( | rdpMcs * | mcs, |
UINT16 | channelId | ||
) |
Send MCS Channel Join Confirm. msdn{cc240527}
mcs | mcs module |
BOOL mcs_send_channel_join_request | ( | rdpMcs * | mcs, |
UINT16 | channelId | ||
) |
Send MCS Channel Join Request. msdn{cc240526}
mcs | mcs module |
channelId | channel id |
|
static |
Send MCS Connect Initial. msdn{cc240508}
mcs | mcs module |
BOOL mcs_send_connect_response | ( | rdpMcs * | mcs | ) |
Send MCS Connect Response. msdn{cc240501}
mcs | mcs module |
BOOL mcs_send_disconnect_provider_ultimatum | ( | rdpMcs * | mcs | ) |
Send MCS Disconnect Provider Ultimatum PDU.
mcs | mcs module |
BOOL mcs_send_erect_domain_request | ( | rdpMcs * | mcs | ) |
Send MCS Erect Domain Request. msdn{cc240523}
mcs | MCS module to use |
BOOL mcs_server_apply_to_settings | ( | const rdpMcs * | mcs, |
rdpSettings * | settings | ||
) |
Write an MCS Connect Initial PDU. msdn{cc240508}
s | stream |
mcs | MCS module |
userData | GCC Conference Create Request |
Write an MCS Connect Response PDU. msdn{cc240508}
s | stream |
mcs | MCS module |
userData | GCC Conference Create Response |
BOOL mcs_write_domain_mcspdu_header | ( | wStream * | s, |
DomainMCSPDU | domainMCSPDU, | ||
UINT16 | length, | ||
BYTE | options | ||
) |
Write a DomainMCSPDU header.
s | stream |
domainMCSPDU | DomainMCSPDU type |
length | TPKT length |
|
static |
Write MCS Domain Parameters.
s | stream |
domainParameters | domain parameters |
|
static |
|
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, ... }