autodetect.h (2760B)
1/** 2 * FreeRDP: A Remote Desktop Protocol Implementation 3 * Auto-Detect PDUs 4 * 5 * Copyright 2014 Dell Software <Mike.McDonald@software.dell.com> 6 * Copyright 2014 Vic Lee 7 * 8 * Licensed under the Apache License, Version 2.0 (the "License"); 9 * you may not use this file except in compliance with the License. 10 * You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, software 15 * distributed under the License is distributed on an "AS IS" BASIS, 16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 * See the License for the specific language governing permissions and 18 * limitations under the License. 19 */ 20 21#ifndef FREERDP_AUTODETECT_H 22#define FREERDP_AUTODETECT_H 23 24typedef struct rdp_autodetect rdpAutoDetect; 25 26typedef BOOL (*pRTTMeasureRequest)(rdpContext* context, UINT16 sequenceNumber); 27typedef BOOL (*pRTTMeasureResponse)(rdpContext* context, UINT16 sequenceNumber); 28typedef BOOL (*pBandwidthMeasureStart)(rdpContext* context, UINT16 sequenceNumber); 29typedef BOOL (*pBandwidthMeasureStop)(rdpContext* context, UINT16 sequenceNumber); 30typedef BOOL (*pBandwidthMeasureResults)(rdpContext* context, UINT16 sequenceNumber); 31typedef BOOL (*pNetworkCharacteristicsResult)(rdpContext* context, UINT16 sequenceNumber); 32typedef BOOL (*pClientBandwidthMeasureResult)(rdpContext* context, rdpAutoDetect* data); 33 34struct rdp_autodetect 35{ 36 ALIGN64 rdpContext* context; /* 0 */ 37 /* RTT measurement */ 38 ALIGN64 UINT64 rttMeasureStartTime; /* 1 */ 39 /* Bandwidth measurement */ 40 ALIGN64 UINT64 bandwidthMeasureStartTime; /* 2 */ 41 ALIGN64 UINT64 bandwidthMeasureTimeDelta; /* 3 */ 42 ALIGN64 UINT32 bandwidthMeasureByteCount; /* 4 */ 43 /* Network characteristics (as reported by server) */ 44 ALIGN64 UINT32 netCharBandwidth; /* 5 */ 45 ALIGN64 UINT32 netCharBaseRTT; /* 6 */ 46 ALIGN64 UINT32 netCharAverageRTT; /* 7 */ 47 ALIGN64 BOOL bandwidthMeasureStarted; /* 8 */ 48 UINT64 paddingA[16 - 9]; /* 9 */ 49 50 ALIGN64 pRTTMeasureRequest RTTMeasureRequest; /* 16 */ 51 ALIGN64 pRTTMeasureResponse RTTMeasureResponse; /* 17 */ 52 ALIGN64 pBandwidthMeasureStart BandwidthMeasureStart; /* 18 */ 53 ALIGN64 pBandwidthMeasureStop BandwidthMeasureStop; /* 19 */ 54 ALIGN64 pBandwidthMeasureResults BandwidthMeasureResults; /* 20 */ 55 ALIGN64 pNetworkCharacteristicsResult NetworkCharacteristicsResult; /* 21 */ 56 ALIGN64 pClientBandwidthMeasureResult ClientBandwidthMeasureResult; /* 22 */ 57 UINT64 paddingB[32 - 23]; /* 23 */ 58}; 59 60#endif /* FREERDP_AUTODETECT_H */