Fixed all Wdocumentation warnings

This commit is contained in:
akallabeth 2022-12-09 14:35:03 +01:00 committed by Martin Fleisz
parent 8200536285
commit 37ab25e19d
33 changed files with 822 additions and 816 deletions

View File

@ -22,7 +22,7 @@
#include <winpr/input.h>
/* @msdn{cc240584} says:
/* msdn{cc240584} says:
* "... (a scancode is an 8-bit value specifying a key location on the keyboard).
* The server accepts a scancode value and translates it into the correct character depending on the
* language locale and keyboard layout used in the session." The 8-bit value is later called
@ -36,7 +36,7 @@
/* Defines for known RDP_SCANCODE protocol values.
* Mostly the same as the PKBDLLHOOKSTRUCT scanCode, "A hardware scan code for the key",
* @msdn{ms644967}. Based @msdn{ms894073} US, @msdn{ms894072} UK, @msdn{ms892472} */
* msdn{ms644967}. Based msdn{ms894073} US, msdn{ms894072} UK, msdn{ms892472} */
#define RDP_SCANCODE_UNKNOWN MAKE_RDP_SCANCODE(0x00, FALSE)

View File

@ -1737,14 +1737,14 @@ extern "C"
*/
FREERDP_API rdpSettings* freerdp_settings_clone(const rdpSettings* settings);
/** \brief Deep copies settings from \b src to \dst
/** \brief Deep copies settings from \b src to \b dst
*
* The function frees up all allocated data in \b dst before copying the data from \src
* The function frees up all allocated data in \b dst before copying the data from \b src
*
* \param dst A pointer for the settings to copy data to. May be NULL (fails copy)
* \param src A pointer to the settings to copy. May be NULL (fails copy)
*
* \return TRUE for success, \b FALSE for failure.
* \return \b TRUE for success, \b FALSE for failure.
*/
FREERDP_API BOOL freerdp_settings_copy(rdpSettings* dst, const rdpSettings* src);

View File

@ -171,7 +171,7 @@ static BOOL rdp_apply_general_capability_set(rdpSettings* settings, const rdpSet
if (!settings->ServerMode)
{
/**
/*
* Note: refreshRectSupport and suppressOutputSupport are
* server-only flags indicating to the client weather the
* respective PDUs are supported. See MS-RDPBCGR 2.2.7.1.1
@ -185,12 +185,9 @@ static BOOL rdp_apply_general_capability_set(rdpSettings* settings, const rdpSet
return TRUE;
}
/**
* Read general capability set.\n
* @msdn{cc240549}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read general capability set.
* msdn{cc240549}
*/
static BOOL rdp_read_general_capability_set(wStream* s, rdpSettings* settings)
@ -229,11 +226,9 @@ static BOOL rdp_read_general_capability_set(wStream* s, rdpSettings* settings)
return TRUE;
}
/**
* Write general capability set.\n
* @msdn{cc240549}
* @param s stream
* @param settings settings
/*
* Write general capability set.
* msdn{cc240549}
*/
static BOOL rdp_write_general_capability_set(wStream* s, const rdpSettings* settings)
@ -365,12 +360,9 @@ static BOOL rdp_apply_bitmap_capability_set(rdpSettings* settings, const rdpSett
return TRUE;
}
/**
* Read bitmap capability set.\n
* @msdn{cc240554}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read bitmap capability set.
* msdn{cc240554}
*/
static BOOL rdp_read_bitmap_capability_set(wStream* s, rdpSettings* settings)
@ -412,11 +404,9 @@ static BOOL rdp_read_bitmap_capability_set(wStream* s, rdpSettings* settings)
return TRUE;
}
/**
* Write bitmap capability set.\n
* @msdn{cc240554}
* @param s stream
* @param settings settings
/*
* Write bitmap capability set.
* msdn{cc240554}
*/
static BOOL rdp_write_bitmap_capability_set(wStream* s, const rdpSettings* settings)
@ -564,12 +554,9 @@ static BOOL rdp_apply_order_capability_set(rdpSettings* settings, const rdpSetti
return TRUE;
}
/**
* Read order capability set.\n
* @msdn{cc240556}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read order capability set.
* msdn{cc240556}
*/
static BOOL rdp_read_order_capability_set(wStream* s, rdpSettings* settings)
@ -623,11 +610,9 @@ static BOOL rdp_read_order_capability_set(wStream* s, rdpSettings* settings)
return TRUE;
}
/**
* Write order capability set.\n
* @msdn{cc240556}
* @param s stream
* @param settings settings
/*
* Write order capability set.
* msdn{cc240556}
*/
static BOOL rdp_write_order_capability_set(wStream* s, const rdpSettings* settings)
@ -789,12 +774,9 @@ static BOOL rdp_apply_bitmap_cache_capability_set(rdpSettings* settings, const r
return TRUE;
}
/**
* Read bitmap cache capability set.\n
* @msdn{cc240559}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read bitmap cache capability set.
* msdn{cc240559}
*/
static BOOL rdp_read_bitmap_cache_capability_set(wStream* s, rdpSettings* settings)
@ -820,11 +802,9 @@ static BOOL rdp_read_bitmap_cache_capability_set(wStream* s, rdpSettings* settin
return TRUE;
}
/**
* Write bitmap cache capability set.\n
* @msdn{cc240559}
* @param s stream
* @param settings settings
/*
* Write bitmap cache capability set.
* msdn{cc240559}
*/
static BOOL rdp_write_bitmap_cache_capability_set(wStream* s, const rdpSettings* settings)
@ -918,12 +898,9 @@ static BOOL rdp_apply_control_capability_set(rdpSettings* settings, const rdpSet
return TRUE;
}
/**
* Read control capability set.\n
* @msdn{cc240568}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read control capability set.
* msdn{cc240568}
*/
static BOOL rdp_read_control_capability_set(wStream* s, rdpSettings* settings)
@ -939,11 +916,9 @@ static BOOL rdp_read_control_capability_set(wStream* s, rdpSettings* settings)
return TRUE;
}
/**
* Write control capability set.\n
* @msdn{cc240568}
* @param s stream
* @param settings settings
/*
* Write control capability set.
* msdn{cc240568}
*/
static BOOL rdp_write_control_capability_set(wStream* s, const rdpSettings* settings)
@ -997,12 +972,9 @@ static BOOL rdp_apply_window_activation_capability_set(rdpSettings* settings,
return TRUE;
}
/**
* Read window activation capability set.\n
* @msdn{cc240569}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read window activation capability set.
* msdn{cc240569}
*/
static BOOL rdp_read_window_activation_capability_set(wStream* s, rdpSettings* settings)
@ -1019,11 +991,9 @@ static BOOL rdp_read_window_activation_capability_set(wStream* s, rdpSettings* s
return TRUE;
}
/**
* Write window activation capability set.\n
* @msdn{cc240569}
* @param s stream
* @param settings settings
/*
* Write window activation capability set.
* msdn{cc240569}
*/
static BOOL rdp_write_window_activation_capability_set(wStream* s, const rdpSettings* settings)
@ -1095,12 +1065,9 @@ static BOOL rdp_apply_pointer_capability_set(rdpSettings* settings, const rdpSet
return TRUE;
}
/**
* Read pointer capability set.\n
* @msdn{cc240562}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read pointer capability set.
* msdn{cc240562}
*/
static BOOL rdp_read_pointer_capability_set(wStream* s, rdpSettings* settings)
@ -1133,11 +1100,9 @@ static BOOL rdp_read_pointer_capability_set(wStream* s, rdpSettings* settings)
return TRUE;
}
/**
* Write pointer capability set.\n
* @msdn{cc240562}
* @param s stream
* @param settings settings
/*
* Write pointer capability set.
* msdn{cc240562}
*/
static BOOL rdp_write_pointer_capability_set(wStream* s, const rdpSettings* settings)
@ -1196,12 +1161,9 @@ static BOOL rdp_apply_share_capability_set(rdpSettings* settings, const rdpSetti
return TRUE;
}
/**
* Read share capability set.\n
* @msdn{cc240570}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read share capability set.
* msdn{cc240570}
*/
static BOOL rdp_read_share_capability_set(wStream* s, rdpSettings* settings)
@ -1217,11 +1179,9 @@ static BOOL rdp_read_share_capability_set(wStream* s, rdpSettings* settings)
return TRUE;
}
/**
* Write share capability set.\n
* @msdn{cc240570}
* @param s stream
* @param settings settings
/*
* Write share capability set.
* msdn{cc240570}
*/
static BOOL rdp_write_share_capability_set(wStream* s, const rdpSettings* settings)
@ -1268,12 +1228,9 @@ static BOOL rdp_apply_color_cache_capability_set(rdpSettings* settings, const rd
return TRUE;
}
/**
* Read color cache capability set.\n
* @msdn{cc241564}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read color cache capability set.
* msdn{cc241564}
*/
static BOOL rdp_read_color_cache_capability_set(wStream* s, rdpSettings* settings)
@ -1287,11 +1244,9 @@ static BOOL rdp_read_color_cache_capability_set(wStream* s, rdpSettings* setting
return TRUE;
}
/**
* Write color cache capability set.\n
* @msdn{cc241564}
* @param s stream
* @param settings settings
/*
* Write color cache capability set.
* msdn{cc241564}
*/
static BOOL rdp_write_color_cache_capability_set(wStream* s, const rdpSettings* settings)
@ -1338,12 +1293,9 @@ static BOOL rdp_apply_sound_capability_set(rdpSettings* settings, const rdpSetti
return TRUE;
}
/**
* Read sound capability set.\n
* @msdn{cc240552}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read sound capability set.
* msdn{cc240552}
*/
static BOOL rdp_read_sound_capability_set(wStream* s, rdpSettings* settings)
@ -1360,11 +1312,9 @@ static BOOL rdp_read_sound_capability_set(wStream* s, rdpSettings* settings)
return TRUE;
}
/**
* Write sound capability set.\n
* @msdn{cc240552}
* @param s stream
* @param settings settings
/*
* Write sound capability set.
* msdn{cc240552}
*/
static BOOL rdp_write_sound_capability_set(wStream* s, const rdpSettings* settings)
@ -1437,12 +1387,9 @@ static BOOL rdp_apply_input_capability_set(rdpSettings* settings, const rdpSetti
return TRUE;
}
/**
* Read input capability set.\n
* @msdn{cc240563}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read input capability set.
* msdn{cc240563}
*/
static BOOL rdp_read_input_capability_set(wStream* s, rdpSettings* settings)
@ -1477,11 +1424,9 @@ static BOOL rdp_read_input_capability_set(wStream* s, rdpSettings* settings)
return TRUE;
}
/**
* Write input capability set.\n
* @msdn{cc240563}
* @param s stream
* @param settings settings
/*
* Write input capability set.
* msdn{cc240563}
*/
static BOOL rdp_write_input_capability_set(wStream* s, const rdpSettings* settings)
@ -1561,12 +1506,9 @@ static BOOL rdp_apply_font_capability_set(rdpSettings* settings, const rdpSettin
return TRUE;
}
/**
* Read font capability set.\n
* @msdn{cc240571}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read font capability set.
* msdn{cc240571}
*/
static BOOL rdp_read_font_capability_set(wStream* s, rdpSettings* settings)
@ -1581,11 +1523,9 @@ static BOOL rdp_read_font_capability_set(wStream* s, rdpSettings* settings)
return TRUE;
}
/**
* Write font capability set.\n
* @msdn{cc240571}
* @param s stream
* @param settings settings
/*
* Write font capability set.
* msdn{cc240571}
*/
static BOOL rdp_write_font_capability_set(wStream* s, const rdpSettings* settings)
@ -1633,12 +1573,9 @@ static BOOL rdp_apply_brush_capability_set(rdpSettings* settings, const rdpSetti
return TRUE;
}
/**
/*
* Read brush capability set.
* @msdn{cc240564}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
* msdn{cc240564}
*/
static BOOL rdp_read_brush_capability_set(wStream* s, rdpSettings* settings)
@ -1652,11 +1589,9 @@ static BOOL rdp_read_brush_capability_set(wStream* s, rdpSettings* settings)
return TRUE;
}
/**
* Write brush capability set.\n
* @msdn{cc240564}
* @param s stream
* @param settings settings
/*
* Write brush capability set.
* msdn{cc240564}
*/
static BOOL rdp_write_brush_capability_set(wStream* s, const rdpSettings* settings)
@ -1689,10 +1624,9 @@ static BOOL rdp_print_brush_capability_set(wStream* s)
}
#endif
/**
* Read cache definition (glyph).\n
* @msdn{cc240566}
* @param s stream
/*
* Read cache definition (glyph).
* msdn{cc240566}
*/
static void rdp_read_cache_definition(wStream* s, GLYPH_CACHE_DEFINITION* cache_definition)
{
@ -1702,10 +1636,9 @@ static void rdp_read_cache_definition(wStream* s, GLYPH_CACHE_DEFINITION* cache_
cache_definition->cacheMaximumCellSize); /* cacheMaximumCellSize (2 bytes) */
}
/**
* Write cache definition (glyph).\n
* @msdn{cc240566}
* @param s stream
/*
* Write cache definition (glyph).
* msdn{cc240566}
*/
static void rdp_write_cache_definition(wStream* s, GLYPH_CACHE_DEFINITION* cache_definition)
{
@ -1734,12 +1667,9 @@ static BOOL rdp_apply_glyph_cache_capability_set(rdpSettings* settings, const rd
return TRUE;
}
/**
* Read glyph cache capability set.\n
* @msdn{cc240565}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read glyph cache capability set.
* msdn{cc240565}
*/
static BOOL rdp_read_glyph_cache_capability_set(wStream* s, rdpSettings* settings)
@ -1759,11 +1689,9 @@ static BOOL rdp_read_glyph_cache_capability_set(wStream* s, rdpSettings* setting
return TRUE;
}
/**
* Write glyph cache capability set.\n
* @msdn{cc240565}
* @param s stream
* @param settings settings
/*
* Write glyph cache capability set.
* msdn{cc240565}
*/
static BOOL rdp_write_glyph_cache_capability_set(wStream* s, const rdpSettings* settings)
@ -1855,12 +1783,9 @@ static BOOL rdp_apply_offscreen_bitmap_cache_capability_set(rdpSettings* setting
return TRUE;
}
/**
* Read offscreen bitmap cache capability set.\n
* @msdn{cc240550}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read offscreen bitmap cache capability set.
* msdn{cc240550}
*/
static BOOL rdp_read_offscreen_bitmap_cache_capability_set(wStream* s, rdpSettings* settings)
@ -1880,11 +1805,9 @@ static BOOL rdp_read_offscreen_bitmap_cache_capability_set(wStream* s, rdpSettin
return TRUE;
}
/**
* Write offscreen bitmap cache capability set.\n
* @msdn{cc240550}
* @param s stream
* @param settings settings
/*
* Write offscreen bitmap cache capability set.
* msdn{cc240550}
*/
static BOOL rdp_write_offscreen_bitmap_cache_capability_set(wStream* s, const rdpSettings* settings)
@ -1943,12 +1866,9 @@ static BOOL rdp_apply_bitmap_cache_host_support_capability_set(rdpSettings* sett
return TRUE;
}
/**
* Read bitmap cache host support capability set.\n
* @msdn{cc240557}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read bitmap cache host support capability set.
* msdn{cc240557}
*/
static BOOL rdp_read_bitmap_cache_host_support_capability_set(wStream* s, rdpSettings* settings)
@ -1966,11 +1886,9 @@ static BOOL rdp_read_bitmap_cache_host_support_capability_set(wStream* s, rdpSet
cacheVersion & BITMAP_CACHE_V2);
}
/**
* Write bitmap cache host support capability set.\n
* @msdn{cc240557}
* @param s stream
* @param settings settings
/*
* Write bitmap cache host support capability set.
* msdn{cc240557}
*/
static BOOL rdp_write_bitmap_cache_host_support_capability_set(wStream* s,
@ -2024,7 +1942,7 @@ static BOOL rdp_read_bitmap_cache_cell_info(wStream* s, BITMAP_CACHE_V2_CELL_INF
if (!Stream_CheckAndLogRequiredLength(TAG, s, 4))
return FALSE;
/**
/*
* numEntries is in the first 31 bits, while the last bit (k)
* is used to indicate a persistent bitmap cache.
*/
@ -2037,7 +1955,7 @@ static BOOL rdp_read_bitmap_cache_cell_info(wStream* s, BITMAP_CACHE_V2_CELL_INF
static void rdp_write_bitmap_cache_cell_info(wStream* s, BITMAP_CACHE_V2_CELL_INFO* cellInfo)
{
UINT32 info;
/**
/*
* numEntries is in the first 31 bits, while the last bit (k)
* is used to indicate a persistent bitmap cache.
*/
@ -2079,12 +1997,9 @@ static BOOL rdp_apply_bitmap_cache_v2_capability_set(rdpSettings* settings, cons
return TRUE;
}
/**
* Read bitmap cache v2 capability set.\n
* @msdn{cc240560}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read bitmap cache v2 capability set.
* msdn{cc240560}
*/
static BOOL rdp_read_bitmap_cache_v2_capability_set(wStream* s, rdpSettings* settings)
@ -2118,11 +2033,9 @@ static BOOL rdp_read_bitmap_cache_v2_capability_set(wStream* s, rdpSettings* set
return TRUE;
}
/**
* Write bitmap cache v2 capability set.\n
* @msdn{cc240560}
* @param s stream
* @param settings settings
/*
* Write bitmap cache v2 capability set.
* msdn{cc240560}
*/
static BOOL rdp_write_bitmap_cache_v2_capability_set(wStream* s, const rdpSettings* settings)
@ -2222,12 +2135,9 @@ static BOOL rdp_apply_virtual_channel_capability_set(rdpSettings* settings, cons
return TRUE;
}
/**
* Read virtual channel capability set.\n
* @msdn{cc240551}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read virtual channel capability set.
* msdn{cc240551}
*/
static BOOL rdp_read_virtual_channel_capability_set(wStream* s, rdpSettings* settings)
@ -2252,11 +2162,9 @@ static BOOL rdp_read_virtual_channel_capability_set(wStream* s, rdpSettings* set
return TRUE;
}
/**
* Write virtual channel capability set.\n
* @msdn{cc240551}
* @param s stream
* @param settings settings
/*
* Write virtual channel capability set.
* msdn{cc240551}
*/
static BOOL rdp_write_virtual_channel_capability_set(wStream* s, const rdpSettings* settings)
@ -2312,12 +2220,9 @@ static BOOL rdp_apply_draw_nine_grid_cache_capability_set(rdpSettings* settings,
return TRUE;
}
/**
* Read drawn nine grid cache capability set.\n
* @msdn{cc241565}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read drawn nine grid cache capability set.
* msdn{cc241565}
*/
static BOOL rdp_read_draw_nine_grid_cache_capability_set(wStream* s, rdpSettings* settings)
@ -2339,11 +2244,9 @@ static BOOL rdp_read_draw_nine_grid_cache_capability_set(wStream* s, rdpSettings
return TRUE;
}
/**
* Write drawn nine grid cache capability set.\n
* @msdn{cc241565}
* @param s stream
* @param settings settings
/*
* Write drawn nine grid cache capability set.
* msdn{cc241565}
*/
static BOOL rdp_write_draw_nine_grid_cache_capability_set(wStream* s, const rdpSettings* settings)
@ -2428,12 +2331,9 @@ static BOOL rdp_apply_draw_gdiplus_cache_capability_set(rdpSettings* settings,
return TRUE;
}
/**
* Read GDI+ cache capability set.\n
* @msdn{cc241566}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read GDI+ cache capability set.
* msdn{cc241566}
*/
static BOOL rdp_read_draw_gdiplus_cache_capability_set(wStream* s, rdpSettings* settings)
@ -2458,11 +2358,9 @@ static BOOL rdp_read_draw_gdiplus_cache_capability_set(wStream* s, rdpSettings*
return TRUE;
}
/**
* Write GDI+ cache capability set.\n
* @msdn{cc241566}
* @param s stream
* @param settings settings
/*
* Write GDI+ cache capability set.
* msdn{cc241566}
*/
static BOOL rdp_write_draw_gdiplus_cache_capability_set(wStream* s, const rdpSettings* settings)
@ -2535,12 +2433,9 @@ static BOOL rdp_apply_remote_programs_capability_set(rdpSettings* settings, cons
return TRUE;
}
/**
* Read remote programs capability set.\n
* @msdn{cc242518}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read remote programs capability set.
* msdn{cc242518}
*/
static BOOL rdp_read_remote_programs_capability_set(wStream* s, rdpSettings* settings)
@ -2558,11 +2453,9 @@ static BOOL rdp_read_remote_programs_capability_set(wStream* s, rdpSettings* set
return TRUE;
}
/**
* Write remote programs capability set.\n
* @msdn{cc242518}
* @param s stream
* @param settings settings
/*
* Write remote programs capability set.
* msdn{cc242518}
*/
static BOOL rdp_write_remote_programs_capability_set(wStream* s, const rdpSettings* settings)
@ -2624,12 +2517,9 @@ static BOOL rdp_apply_window_list_capability_set(rdpSettings* settings, const rd
return TRUE;
}
/**
* Read window list capability set.\n
* @msdn{cc242564}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read window list capability set.
* msdn{cc242564}
*/
static BOOL rdp_read_window_list_capability_set(wStream* s, rdpSettings* settings)
@ -2645,11 +2535,9 @@ static BOOL rdp_read_window_list_capability_set(wStream* s, rdpSettings* setting
return TRUE;
}
/**
* Write window list capability set.\n
* @msdn{cc242564}
* @param s stream
* @param settings settings
/*
* Write window list capability set.
* msdn{cc242564}
*/
static BOOL rdp_write_window_list_capability_set(wStream* s, const rdpSettings* settings)
@ -2701,12 +2589,9 @@ static BOOL rdp_apply_desktop_composition_capability_set(rdpSettings* settings,
return TRUE;
}
/**
* Read desktop composition capability set.\n
* @msdn{cc240855}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read desktop composition capability set.
* msdn{cc240855}
*/
static BOOL rdp_read_desktop_composition_capability_set(wStream* s, rdpSettings* settings)
@ -2721,11 +2606,9 @@ static BOOL rdp_read_desktop_composition_capability_set(wStream* s, rdpSettings*
return TRUE;
}
/**
* Write desktop composition capability set.\n
* @msdn{cc240855}
* @param s stream
* @param settings settings
/*
* Write desktop composition capability set.
* msdn{cc240855}
*/
static BOOL rdp_write_desktop_composition_capability_set(wStream* s, const rdpSettings* settings)
@ -2788,14 +2671,14 @@ static BOOL rdp_apply_multifragment_update_capability_set(rdpSettings* settings,
if (settings->RemoteFxCodec)
{
/**
/*
* If we are using RemoteFX the client MUST use a value greater
* than or equal to the value we've previously sent in the server to
* client multi-fragment update capability set (MS-RDPRFX 1.5)
*/
if (multifragMaxRequestSize < settings->MultifragMaxRequestSize)
{
/**
/*
* If it happens to be smaller we honor the client's value but
* have to disable RemoteFX
*/
@ -2814,7 +2697,7 @@ static BOOL rdp_apply_multifragment_update_capability_set(rdpSettings* settings,
}
else
{
/**
/*
* In client mode we keep up with the server's capabilites.
* In RemoteFX mode we MUST do this but it might also be useful to
* receive larger related bitmap updates.
@ -2825,12 +2708,9 @@ static BOOL rdp_apply_multifragment_update_capability_set(rdpSettings* settings,
return TRUE;
}
/**
* Read multifragment update capability set.\n
* @msdn{cc240649}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read multifragment update capability set.
* msdn{cc240649}
*/
static BOOL rdp_read_multifragment_update_capability_set(wStream* s, rdpSettings* settings)
@ -2847,11 +2727,9 @@ static BOOL rdp_read_multifragment_update_capability_set(wStream* s, rdpSettings
return TRUE;
}
/**
* Write multifragment update capability set.\n
* @msdn{cc240649}
* @param s stream
* @param settings settings
/*
* Write multifragment update capability set.
* msdn{cc240649}
*/
static BOOL rdp_write_multifragment_update_capability_set(wStream* s, rdpSettings* settings)
@ -2861,7 +2739,7 @@ static BOOL rdp_write_multifragment_update_capability_set(wStream* s, rdpSetting
WINPR_ASSERT(settings);
if (settings->ServerMode && settings->MultifragMaxRequestSize == 0)
{
/**
/*
* In server mode we prefer to use the highest useful request size that
* will allow us to pack a complete screen update into a single fast
* path PDU using any of the supported codecs.
@ -2913,12 +2791,9 @@ static BOOL rdp_apply_large_pointer_capability_set(rdpSettings* settings, const
return TRUE;
}
/**
* Read large pointer capability set.\n
* @msdn{cc240650}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read large pointer capability set.
* msdn{cc240650}
*/
static BOOL rdp_read_large_pointer_capability_set(wStream* s, rdpSettings* settings)
@ -2942,11 +2817,9 @@ static BOOL rdp_read_large_pointer_capability_set(wStream* s, rdpSettings* setti
return TRUE;
}
/**
* Write large pointer capability set.\n
* @msdn{cc240650}
* @param s stream
* @param settings settings
/*
* Write large pointer capability set.
* msdn{cc240650}
*/
static BOOL rdp_write_large_pointer_capability_set(wStream* s, const rdpSettings* settings)
@ -2993,12 +2866,9 @@ static BOOL rdp_apply_surface_commands_capability_set(rdpSettings* settings, con
return TRUE;
}
/**
* Read surface commands capability set.\n
* @msdn{dd871563}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read surface commands capability set.
* msdn{dd871563}
*/
static BOOL rdp_read_surface_commands_capability_set(wStream* s, rdpSettings* settings)
@ -3016,11 +2886,9 @@ static BOOL rdp_read_surface_commands_capability_set(wStream* s, rdpSettings* se
return TRUE;
}
/**
* Write surface commands capability set.\n
* @msdn{dd871563}
* @param s stream
* @param settings settings
/*
* Write surface commands capability set.
* msdn{dd871563}
*/
static BOOL rdp_write_surface_commands_capability_set(wStream* s, const rdpSettings* settings)
@ -3165,12 +3033,9 @@ static BOOL rdp_apply_bitmap_codecs_capability_set(rdpSettings* settings, const
return TRUE;
}
/**
* Read bitmap codecs capability set.\n
* @msdn{dd891377}
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read bitmap codecs capability set.
* msdn{dd891377}
*/
static BOOL rdp_read_bitmap_codecs_capability_set(wStream* s, rdpSettings* settings, BOOL isServer)
@ -3375,10 +3240,8 @@ static BOOL rdp_read_bitmap_codecs_capability_set(wStream* s, rdpSettings* setti
return TRUE;
}
/**
* Write RemoteFX Client Capability Container.\n
* @param s stream
* @param settings settings
/*
* Write RemoteFX Client Capability Container.
*/
static BOOL rdp_write_rfx_client_capability_container(wStream* s, const rdpSettings* settings)
{
@ -3424,10 +3287,8 @@ static BOOL rdp_write_rfx_client_capability_container(wStream* s, const rdpSetti
return TRUE;
}
/**
* Write NSCODEC Client Capability Container.\n
* @param s stream
* @param settings settings
/*
* Write NSCODEC Client Capability Container.
*/
static BOOL rdp_write_nsc_client_capability_container(wStream* s, const rdpSettings* settings)
{
@ -3471,10 +3332,8 @@ static BOOL rdp_write_jpeg_client_capability_container(wStream* s, const rdpSett
}
#endif
/**
* Write RemoteFX Server Capability Container.\n
* @param s stream
* @param settings settings
/*
* Write RemoteFX Server Capability Container.
*/
static BOOL rdp_write_rfx_server_capability_container(wStream* s, const rdpSettings* settings)
{
@ -3502,10 +3361,8 @@ static BOOL rdp_write_jpeg_server_capability_container(wStream* s, const rdpSett
return TRUE;
}
/**
* Write NSCODEC Server Capability Container.\n
* @param s stream
* @param settings settings
/*
* Write NSCODEC Server Capability Container.
*/
static BOOL rdp_write_nsc_server_capability_container(wStream* s, const rdpSettings* settings)
{
@ -3520,11 +3377,9 @@ static BOOL rdp_write_nsc_server_capability_container(wStream* s, const rdpSetti
return TRUE;
}
/**
* Write bitmap codecs capability set.\n
* @msdn{dd891377}
* @param s stream
* @param settings settings
/*
* Write bitmap codecs capability set.
* msdn{dd891377}
*/
static BOOL rdp_write_bitmap_codecs_capability_set(wStream* s, const rdpSettings* settings)
@ -3697,11 +3552,8 @@ static BOOL rdp_apply_frame_acknowledge_capability_set(rdpSettings* settings,
return TRUE;
}
/**
* Read frame acknowledge capability set.\n
* @param s stream
* @param settings settings
* @return if the operation completed successfully
/*
* Read frame acknowledge capability set.
*/
static BOOL rdp_read_frame_acknowledge_capability_set(wStream* s, rdpSettings* settings)
@ -3715,10 +3567,8 @@ static BOOL rdp_read_frame_acknowledge_capability_set(wStream* s, rdpSettings* s
return TRUE;
}
/**
* Write frame acknowledge capability set.\n
* @param s stream
* @param settings settings
/*
* Write frame acknowledge capability set.
*/
static BOOL rdp_write_frame_acknowledge_capability_set(wStream* s, const rdpSettings* settings)
@ -4508,7 +4358,7 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, wStream* s)
pduName = pdu_type_to_str(pduType);
if (pduType == PDU_TYPE_DATA)
{
/**
/*
* We can receive a Save Session Info Data PDU containing a LogonErrorInfo
* structure at this point from the server to indicate a connection error.
*/

View File

@ -150,8 +150,6 @@ static const char* certificate_read_errors[] = { "Certificate tag",
/**
* Read X.509 Certificate
* @param certificate certificate module
* @param cert X.509 certificate
*/
static BOOL certificate_read_x509_certificate(rdpCertBlob* cert, rdpCertInfo* info)
@ -551,12 +549,6 @@ static BOOL certificate_write_server_public_signature(const rdpCertificate* cert
return TRUE;
}
/**
* Read a Server Proprietary Certificate.\n
* @param certificate certificate module
* @param s stream
*/
static BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate, wStream* s)
{
UINT32 dwSigAlgId;
@ -662,7 +654,7 @@ static BOOL certificate_write_server_proprietary_certificate(const rdpCertificat
}
/**
* Read an X.509 Certificate Chain.\n
* Read an X.509 Certificate Chain.
* @param certificate certificate module
* @param s stream
*/
@ -767,7 +759,7 @@ static BOOL certificate_write_server_x509_certificate_chain(const rdpCertificate
}
/**
* Read a Server Certificate.\n
* Read a Server Certificate.
* @param certificate certificate module
* @param server_cert server certificate
* @param length certificate length
@ -1107,8 +1099,7 @@ out_fail:
}
/**
* Instantiate new certificate module.\n
* @param rdp RDP module
* Instantiate new certificate module.
* @return new certificate module
*/

View File

@ -280,7 +280,7 @@ static BOOL rdp_client_wait_for_activation(rdpRdp* rdp)
}
/**
* Establish RDP Connection based on the settings given in the 'rdp' parameter.
* @msdn{cc240452}
* msdn{cc240452}
* @param rdp RDP module
* @return true if the connection succeeded. FALSE otherwise.
*/

View File

@ -1,4 +1,4 @@
/**
/*
* FreeRDP: A Remote Desktop Protocol Implementation
* RPC over HTTP
*
@ -61,30 +61,30 @@ static const char* PTYPE_STRINGS[] = { "PTYPE_REQUEST", "PTYPE_PING",
"PTYPE_CO_CANCEL", "PTYPE_ORPHANED",
"PTYPE_RTS", "" };
/**
/*
* [MS-RPCH]: Remote Procedure Call over HTTP Protocol Specification:
* http://msdn.microsoft.com/en-us/library/cc243950/
*/
/**
* Connection Establishment\n
*
* Client Outbound Proxy Inbound Proxy Server\n
* | | | |\n
* |-----------------IN Channel Request--------------->| |\n
* |---OUT Channel Request-->| |<-Legacy Server Response-|\n
* | |<--------------Legacy Server Response--------------|\n
* | | | |\n
* |---------CONN_A1-------->| | |\n
* |----------------------CONN_B1--------------------->| |\n
* | |----------------------CONN_A2--------------------->|\n
* | | | |\n
* |<--OUT Channel Response--| |---------CONN_B2-------->|\n
* |<--------CONN_A3---------| | |\n
* | |<---------------------CONN_C1----------------------|\n
* | | |<--------CONN_B3---------|\n
* |<--------CONN_C2---------| | |\n
* | | | |\n
*
*
* Connection Establishment
*
* Client Outbound Proxy Inbound Proxy Server
* | | | |
* |-----------------IN Channel Request--------------->| |
* |---OUT Channel Request-->| |<-Legacy Server Response-|
* | |<--------------Legacy Server Response--------------|
* | | | |
* |---------CONN_A1-------->| | |
* |----------------------CONN_B1--------------------->| |
* | |----------------------CONN_A2--------------------->|
* | | | |
* |<--OUT Channel Response--| |---------CONN_B2-------->|
* |<--------CONN_A3---------| | |
* | |<---------------------CONN_C1----------------------|
* | | |<--------CONN_B3---------|
* |<--------CONN_C2---------| | |
* | | | |
*
*/
@ -170,7 +170,7 @@ size_t rpc_offset_pad(size_t* offset, size_t pad)
return pad;
}
/**
/*
* PDU Segments:
* ________________________________
* | |
@ -189,7 +189,7 @@ size_t rpc_offset_pad(size_t* offset, size_t pad)
* |________________________________|
*/
/**
/*
* PDU Structure with verification trailer
*
* MUST only appear in a request PDU!
@ -220,7 +220,7 @@ size_t rpc_offset_pad(size_t* offset, size_t pad)
*
*/
/**
/*
* Security Trailer:
*
* The sec_trailer structure MUST be placed at the end of the PDU, including past stub data,
@ -307,7 +307,7 @@ BOOL rpc_get_stub_data_info(const rpcconn_hdr_t* header, size_t* poffset, size_t
sec_trailer_offset = frag_length - auth_length - 8;
/**
/*
* According to [MS-RPCE], auth_pad_length is the number of padding
* octets used to 4-byte align the security trailer, but in practice
* we get values up to 15, which indicates 16-byte alignment.

View File

@ -2453,11 +2453,12 @@ BOOL tsg_disconnect(rdpTsg* tsg)
}
/**
* @brief
* @brief Read data from TSG
*
* @param[in] tsg The TSG instance to read from
* @param[in] data A pointer to the data buffer
* @param[in] length length of data
*
* @param[in] tsg
* @param[in] data
* @param[in] length
* @return < 0 on error; 0 if not enough data is available (non blocking mode); > 0 bytes to read
*/

View File

@ -266,10 +266,13 @@ static const BYTE h221_cs_key[4] = "Duca";
static const BYTE h221_sc_key[4] = "McDn";
/**
* Read a GCC Conference Create Request.\n
* @msdn{cc240836}
* Read a GCC Conference Create Request.
* msdn{cc240836}
*
* @param s stream
* @param settings rdp settings
* @param mcs The MCS instance
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_read_conference_create_request(wStream* s, rdpMcs* mcs)
@ -333,10 +336,13 @@ BOOL gcc_read_conference_create_request(wStream* s, rdpMcs* mcs)
}
/**
* Write a GCC Conference Create Request.\n
* @msdn{cc240836}
* Write a GCC Conference Create Request.
* msdn{cc240836}
*
* @param s stream
* @param user_data client data blocks
* @param userData client data blocks
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_write_conference_create_request(wStream* s, wStream* userData)
@ -794,11 +800,14 @@ BOOL gcc_read_user_data_header(wStream* s, UINT16* type, UINT16* length)
}
/**
* Write a user data header (TS_UD_HEADER).\n
* @msdn{cc240509}
* Write a user data header (TS_UD_HEADER).
* msdn{cc240509}
*
* @param s stream
* @param type data block type
* @param length data block length
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_write_user_data_header(wStream* s, UINT16 type, UINT16 length)
@ -897,10 +906,13 @@ static BOOL updateEarlyServerCaps(rdpSettings* settings, UINT32 earlyCapabilityF
}
/**
* Read a client core data block (TS_UD_CS_CORE).\n
* @msdn{cc240510}
* Read a client core data block (TS_UD_CS_CORE).
* msdn{cc240510}
* @param s stream
* @param settings rdp settings
* @param mcs The MCS instance
* @param blockLength the length of the block
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_read_client_core_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
@ -1135,10 +1147,12 @@ BOOL gcc_read_client_core_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
}
/**
* Write a client core data block (TS_UD_CS_CORE).\n
* @msdn{cc240510}
* @param s stream
* @param settings rdp settings
* Write a client core data block (TS_UD_CS_CORE).
* msdn{cc240510}
* @param s The stream to write to
* @param mcs The MSC instance to get the data from
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_write_client_core_data(wStream* s, const rdpMcs* mcs)
@ -1292,10 +1306,13 @@ BOOL gcc_write_server_core_data(wStream* s, rdpMcs* mcs)
}
/**
* Read a client security data block (TS_UD_CS_SEC).\n
* @msdn{cc240511}
* Read a client security data block (TS_UD_CS_SEC).
* msdn{cc240511}
* @param s stream
* @param settings rdp settings
* @param mcs MCS instance
* @param blockLength the length of the block
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_read_client_security_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
@ -1326,10 +1343,12 @@ BOOL gcc_read_client_security_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
}
/**
* Write a client security data block (TS_UD_CS_SEC).\n
* @msdn{cc240511}
* Write a client security data block (TS_UD_CS_SEC).
* msdn{cc240511}
* @param s stream
* @param settings rdp settings
* @param mcs The MCS instance
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_write_client_security_data(wStream* s, const rdpMcs* mcs)
@ -1769,10 +1788,14 @@ BOOL gcc_write_server_security_data(wStream* s, rdpMcs* mcs)
}
/**
* Read a client network data block (TS_UD_CS_NET).\n
* @msdn{cc240512}
* Read a client network data block (TS_UD_CS_NET).
* msdn{cc240512}
*
* @param s stream
* @param settings rdp settings
* @param mcs The MCS instance
* @param blockLength the length of the block
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_read_client_network_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
@ -1820,10 +1843,12 @@ BOOL gcc_read_client_network_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
}
/**
* Write a client network data block (TS_UD_CS_NET).\n
* @msdn{cc240512}
* Write a client network data block (TS_UD_CS_NET).
* msdn{cc240512}
* @param s stream
* @param settings rdp settings
* @param mcs The MCS to use
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_write_client_network_data(wStream* s, const rdpMcs* mcs)
@ -1919,10 +1944,13 @@ BOOL gcc_write_server_network_data(wStream* s, const rdpMcs* mcs)
}
/**
* Read a client cluster data block (TS_UD_CS_CLUSTER).\n
* @msdn{cc240514}
* Read a client cluster data block (TS_UD_CS_CLUSTER).
* msdn{cc240514}
* @param s stream
* @param settings rdp settings
* @param mcs The MCS instance
* @param blockLength the length of the block
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_read_client_cluster_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
@ -1958,10 +1986,12 @@ BOOL gcc_read_client_cluster_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
}
/**
* Write a client cluster data block (TS_UD_CS_CLUSTER).\n
* @msdn{cc240514}
* Write a client cluster data block (TS_UD_CS_CLUSTER).
* msdn{cc240514}
* @param s stream
* @param settings rdp settings
* @param mcs The MCS instance
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_write_client_cluster_data(wStream* s, const rdpMcs* mcs)
@ -1988,10 +2018,13 @@ BOOL gcc_write_client_cluster_data(wStream* s, const rdpMcs* mcs)
}
/**
* Read a client monitor data block (TS_UD_CS_MONITOR).\n
* @msdn{dd305336}
* Read a client monitor data block (TS_UD_CS_MONITOR).
* msdn{dd305336}
* @param s stream
* @param settings rdp settings
* @param mcs The MCS instance
* @param blockLength the lenght of the block
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_read_client_monitor_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
@ -2052,10 +2085,12 @@ BOOL gcc_read_client_monitor_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
}
/**
* Write a client monitor data block (TS_UD_CS_MONITOR).\n
* @msdn{dd305336}
* Write a client monitor data block (TS_UD_CS_MONITOR).
* msdn{dd305336}
* @param s stream
* @param settings rdp settings
* @param mcs The MCS to use
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_write_client_monitor_data(wStream* s, const rdpMcs* mcs)
@ -2186,10 +2221,12 @@ BOOL gcc_write_client_monitor_extended_data(wStream* s, const rdpMcs* mcs)
}
/**
* Read a client message channel data block (TS_UD_CS_MCS_MSGCHANNEL).\n
* @msdn{jj217627}
* Read a client message channel data block (TS_UD_CS_MCS_MSGCHANNEL).
* msdn{jj217627}
* @param s stream
* @param settings rdp settings
* @param mcs The MCS instance
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_read_client_message_channel_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
@ -2205,10 +2242,12 @@ BOOL gcc_read_client_message_channel_data(wStream* s, rdpMcs* mcs, UINT16 blockL
}
/**
* Write a client message channel data block (TS_UD_CS_MCS_MSGCHANNEL).\n
* @msdn{jj217627}
* Write a client message channel data block (TS_UD_CS_MCS_MSGCHANNEL).
* msdn{jj217627}
* @param s stream
* @param settings rdp settings
* @param mcs The MCS instance
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_write_client_message_channel_data(wStream* s, const rdpMcs* mcs)
@ -2257,10 +2296,13 @@ BOOL gcc_write_server_message_channel_data(wStream* s, const rdpMcs* mcs)
}
/**
* Read a client multitransport channel data block (TS_UD_CS_MULTITRANSPORT).\n
* @msdn{jj217498}
* Read a client multitransport channel data block (TS_UD_CS_MULTITRANSPORT).
* msdn{jj217498}
* @param s stream
* @param settings rdp settings
* @param mcs The MCS instance
* @param blockLength the length of the block
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_read_client_multitransport_channel_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
@ -2277,10 +2319,13 @@ BOOL gcc_read_client_multitransport_channel_data(wStream* s, rdpMcs* mcs, UINT16
}
/**
* Write a client multitransport channel data block (TS_UD_CS_MULTITRANSPORT).\n
* @msdn{jj217498}
* Write a client multitransport channel data block (TS_UD_CS_MULTITRANSPORT).
* msdn{jj217498}
*
* @param s stream
* @param settings rdp settings
* @param mcs The MCS instance
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL gcc_write_client_multitransport_channel_data(wStream* s, const rdpMcs* mcs)

View File

@ -178,10 +178,8 @@ static BOOL rdp_compute_client_auto_reconnect_cookie(rdpRdp* rdp)
}
/**
* Read Server Auto Reconnect Cookie (ARC_SC_PRIVATE_PACKET).\n
* @msdn{cc240540}
* @param s stream
* @param settings settings
* Read Server Auto Reconnect Cookie (ARC_SC_PRIVATE_PACKET).
* msdn{cc240540}
*/
static BOOL rdp_read_server_auto_reconnect_cookie(rdpRdp* rdp, wStream* s, logon_info_ex* info)
@ -230,10 +228,8 @@ static BOOL rdp_read_server_auto_reconnect_cookie(rdpRdp* rdp, wStream* s, logon
}
/**
* Read Client Auto Reconnect Cookie (ARC_CS_PRIVATE_PACKET).\n
* @msdn{cc240541}
* @param s stream
* @param settings settings
* Read Client Auto Reconnect Cookie (ARC_CS_PRIVATE_PACKET).
* msdn{cc240541}
*/
static BOOL rdp_read_client_auto_reconnect_cookie(rdpRdp* rdp, wStream* s)
@ -253,10 +249,8 @@ static BOOL rdp_read_client_auto_reconnect_cookie(rdpRdp* rdp, wStream* s)
}
/**
* Write Client Auto Reconnect Cookie (ARC_CS_PRIVATE_PACKET).\n
* @msdn{cc240541}
* @param s stream
* @param settings settings
* Write Client Auto Reconnect Cookie (ARC_CS_PRIVATE_PACKET).
* msdn{cc240541}
*/
static void rdp_write_client_auto_reconnect_cookie(rdpRdp* rdp, wStream* s)
@ -281,10 +275,8 @@ static void rdp_write_client_auto_reconnect_cookie(rdpRdp* rdp, wStream* s)
}
/**
* Read Extended Info Packet (TS_EXTENDED_INFO_PACKET).\n
* @msdn{cc240476}
* @param s stream
* @param settings settings
* Read Extended Info Packet (TS_EXTENDED_INFO_PACKET).
* msdn{cc240476}
*/
static BOOL rdp_read_extended_info_packet(rdpRdp* rdp, wStream* s)
@ -433,10 +425,8 @@ end:
}
/**
* Write Extended Info Packet (TS_EXTENDED_INFO_PACKET).\n
* @msdn{cc240476}
* @param s stream
* @param settings settings
* Write Extended Info Packet (TS_EXTENDED_INFO_PACKET).
* msdn{cc240476}
*/
static BOOL rdp_write_extended_info_packet(rdpRdp* rdp, wStream* s)
@ -589,10 +579,8 @@ static BOOL rdp_read_info_string(UINT32 flags, wStream* s, size_t cbLenNonNull,
}
/**
* Read Info Packet (TS_INFO_PACKET).\n
* @msdn{cc240475}
* @param s stream
* @param settings settings
* Read Info Packet (TS_INFO_PACKET).
* msdn{cc240475}
*/
static BOOL rdp_read_info_packet(rdpRdp* rdp, wStream* s, UINT16 tpktlength)
@ -663,10 +651,8 @@ static BOOL rdp_read_info_packet(rdpRdp* rdp, wStream* s, UINT16 tpktlength)
}
/**
* Write Info Packet (TS_INFO_PACKET).\n
* @msdn{cc240475}
* @param s stream
* @param settings settings
* Write Info Packet (TS_INFO_PACKET).
* msdn{cc240475}
*/
static BOOL rdp_write_info_packet(rdpRdp* rdp, wStream* s)
@ -873,8 +859,8 @@ fail:
}
/**
* Read Client Info PDU (CLIENT_INFO_PDU).\n
* @msdn{cc240474}
* Read Client Info PDU (CLIENT_INFO_PDU).
* msdn{cc240474}
* @param rdp RDP module
* @param s stream
*/
@ -918,8 +904,8 @@ BOOL rdp_recv_client_info(rdpRdp* rdp, wStream* s)
}
/**
* Send Client Info PDU (CLIENT_INFO_PDU).\n
* @msdn{cc240474}
* Send Client Info PDU (CLIENT_INFO_PDU).
* msdn{cc240474}
* @param rdp RDP module
*/

View File

@ -1,4 +1,4 @@
/**
/*
* FreeRDP: A Remote Desktop Protocol Implementation
* RDP Licensing
*
@ -107,7 +107,8 @@ enum
#define KEY_EXCHANGE_ALG_RSA 0x00000001
/** @brief license Error Codes */
/** @brief license Error Codes
*/
enum
{
ERR_INVALID_SERVER_CERTIFICATE = 0x00000001,
@ -121,7 +122,8 @@ enum
ERR_INVALID_MESSAGE_LENGTH = 0x0000000C
};
/** @brief state Transition Codes */
/** @brief state Transition Codes
*/
enum
{
ST_TOTAL_ABORT = 0x00000001,
@ -130,7 +132,8 @@ enum
ST_RESEND_LAST_MESSAGE = 0x00000004
};
/** @brief Platform Challenge Types */
/** @brief Platform Challenge Types
*/
enum
{
WIN32_PLATFORM_CHALLENGE_TYPE = 0x0100,
@ -139,7 +142,8 @@ enum
OTHER_PLATFORM_CHALLENGE_TYPE = 0xFF00
};
/** @brief License Detail Levels */
/** @brief License Detail Levels
*/
enum
{
LICENSE_DETAIL_SIMPLE = 0x0001,
@ -635,8 +639,8 @@ error_path:
}
/**
* Read a licensing preamble.\n
* @msdn{cc240480}
* Read a licensing preamble.
* msdn{cc240480}
* @param s stream
* @param bMsgType license message type
* @param flags message flags
@ -661,12 +665,13 @@ static BOOL license_read_preamble(wStream* s, BYTE* bMsgType, BYTE* flags, UINT1
}
/**
* Write a licensing preamble.\n
* @msdn{cc240480}
* Write a licensing preamble.
* msdn{cc240480}
* @param s stream
* @param bMsgType license message type
* @param flags message flags
* @param wMsgSize message size
* @return if the operation completed successfully
*/
static BOOL license_write_preamble(wStream* s, BYTE bMsgType, BYTE flags, UINT16 wMsgSize)
@ -682,9 +687,11 @@ static BOOL license_write_preamble(wStream* s, BYTE bMsgType, BYTE flags, UINT16
}
/**
* Initialize a license packet stream.\n
* @brief Initialize a license packet stream.
*
* @param license license module
* @return stream
*
* @return stream or NULL
*/
wStream* license_send_stream_init(rdpLicense* license)
@ -699,7 +706,7 @@ wStream* license_send_stream_init(rdpLicense* license)
license->rdp->sec_flags = SEC_LICENSE_PKT;
/**
/*
* Encryption of licensing packets is optional even if the rdp security
* layer is used. If the peer has not indicated that it is capable of
* processing encrypted licensing packets (rdp->do_crypt_license) we turn
@ -729,8 +736,8 @@ fail:
}
/**
* Send an RDP licensing packet.\n
* @msdn{cc240479}
* Send an RDP licensing packet.
* msdn{cc240479}
* @param license license module
* @param s stream
*/
@ -822,8 +829,8 @@ fail:
}
/**
* Receive an RDP licensing packet.\n
* @msdn{cc240479}
* Receive an RDP licensing packet.
* msdn{cc240479}
* @param license license module
* @param s stream
* @return if the operation completed successfully
@ -1060,7 +1067,7 @@ static BOOL license_generate_keys(rdpLicense* license)
}
/**
* Generate Unique Hardware Identifier (CLIENT_HARDWARE_ID).\n
* Generate Unique Hardware Identifier (CLIENT_HARDWARE_ID).
* @param license license module
*/
@ -1234,7 +1241,8 @@ static BOOL license_encrypt_and_MAC(rdpLicense* license, const BYTE* input, size
* @param input the input data to decrypt and MAC
* @param len size of input
* @param target a target LICENSE_BLOB where the decrypted input will be stored
* @param mac the signature buffer (16 bytes)
* @param packetMac the signature buffer (16 bytes)
*
* @return if the operation completed successfully
*/
static BOOL license_decrypt_and_check_MAC(rdpLicense* license, const BYTE* input, size_t len,
@ -1254,8 +1262,8 @@ static BOOL license_decrypt_and_check_MAC(rdpLicense* license, const BYTE* input
}
/**
* Read Product Information (PRODUCT_INFO).\n
* @msdn{cc241915}
* Read Product Information (PRODUCT_INFO).
* msdn{cc241915}
* @param s stream
* @param productInfo product information
*/
@ -1365,8 +1373,8 @@ static BOOL license_write_product_info(wStream* s, const LICENSE_PRODUCT_INFO* p
}
/**
* Allocate New Product Information (LICENSE_PRODUCT_INFO).\n
* @msdn{cc241915}
* Allocate New Product Information (LICENSE_PRODUCT_INFO).
* msdn{cc241915}
* @return new product information
*/
@ -1380,8 +1388,8 @@ LICENSE_PRODUCT_INFO* license_new_product_info(void)
}
/**
* Free Product Information (LICENSE_PRODUCT_INFO).\n
* @msdn{cc241915}
* Free Product Information (LICENSE_PRODUCT_INFO).
* msdn{cc241915}
* @param productInfo product information
*/
@ -1432,8 +1440,8 @@ BOOL license_read_binary_blob_data(LICENSE_BLOB* blob, UINT32 wBlobType, const v
}
/**
* Read License Binary Blob (LICENSE_BINARY_BLOB).\n
* @msdn{cc240481}
* Read License Binary Blob (LICENSE_BINARY_BLOB).
* msdn{cc240481}
* @param s stream
* @param blob license binary blob
*/
@ -1461,8 +1469,8 @@ BOOL license_read_binary_blob(wStream* s, LICENSE_BLOB* blob)
}
/**
* Write License Binary Blob (LICENSE_BINARY_BLOB).\n
* @msdn{cc240481}
* Write License Binary Blob (LICENSE_BINARY_BLOB).
* msdn{cc240481}
* @param s stream
* @param blob license binary blob
*/
@ -1517,8 +1525,8 @@ static BOOL license_read_encrypted_premaster_secret_blob(wStream* s, LICENSE_BLO
}
/**
* Allocate New License Binary Blob (LICENSE_BINARY_BLOB).\n
* @msdn{cc240481}
* Allocate New License Binary Blob (LICENSE_BINARY_BLOB).
* msdn{cc240481}
* @return new license binary blob
*/
@ -1531,8 +1539,8 @@ LICENSE_BLOB* license_new_binary_blob(UINT16 type)
}
/**
* Free License Binary Blob (LICENSE_BINARY_BLOB).\n
* @msdn{cc240481}
* Free License Binary Blob (LICENSE_BINARY_BLOB).
* msdn{cc240481}
* @param blob license binary blob
*/
@ -1546,8 +1554,8 @@ void license_free_binary_blob(LICENSE_BLOB* blob)
}
/**
* Read License Scope List (SCOPE_LIST).\n
* @msdn{cc241916}
* Read License Scope List (SCOPE_LIST).
* msdn{cc241916}
* @param s stream
* @param scopeList scope list
*/
@ -1607,8 +1615,8 @@ BOOL license_write_scope_list(wStream* s, const SCOPE_LIST* scopeList)
}
/**
* Allocate New License Scope List (SCOPE_LIST).\n
* @msdn{cc241916}
* Allocate New License Scope List (SCOPE_LIST).
* msdn{cc241916}
* @return new scope list
*/
@ -1660,8 +1668,8 @@ BOOL license_scope_list_resize(SCOPE_LIST* scopeList, UINT32 count)
}
/**
* Free License Scope List (SCOPE_LIST).\n
* @msdn{cc241916}
* Free License Scope List (SCOPE_LIST).
* msdn{cc241916}
* @param scopeList scope list
*/
@ -1779,8 +1787,8 @@ error:
}
/**
* Read a LICENSE_REQUEST packet.\n
* @msdn{cc241914}
* Read a LICENSE_REQUEST packet.
* msdn{cc241914}
* @param license license module
* @param s stream
*/
@ -1874,8 +1882,8 @@ fail:
}
/*
* Read a PLATFORM_CHALLENGE packet.\n
* @msdn{cc241921}
* Read a PLATFORM_CHALLENGE packet.
* msdn{cc241921}
* @param license license module
* @param s stream
*/
@ -2012,8 +2020,8 @@ static BOOL license_read_encrypted_blob(const rdpLicense* license, wStream* s, L
}
/**
* Read a NEW_LICENSE packet.\n
* @msdn{cc241926}
* Read a NEW_LICENSE packet.
* msdn{cc241926}
* @param license license module
* @param s stream
*/
@ -2132,8 +2140,8 @@ fail:
}
/**
* Read an ERROR_ALERT packet.\n
* @msdn{cc240482}
* Read an ERROR_ALERT packet.
* msdn{cc240482}
* @param license license module
* @param s stream
*/
@ -2187,8 +2195,8 @@ BOOL license_read_error_alert_packet(rdpLicense* license, wStream* s)
}
/**
* Write a NEW_LICENSE_REQUEST packet.\n
* @msdn{cc241918}
* Write a NEW_LICENSE_REQUEST packet.
* msdn{cc241918}
* @param license license module
* @param s stream
*/
@ -2263,8 +2271,8 @@ BOOL license_read_new_license_request_packet(rdpLicense* license, wStream* s)
}
/**
* Send a NEW_LICENSE_REQUEST packet.\n
* @msdn{cc241918}
* Send a NEW_LICENSE_REQUEST packet.
* msdn{cc241918}
* @param license license module
*/
@ -2353,8 +2361,8 @@ BOOL license_answer_license_request(rdpLicense* license)
}
/**
* Send Client Challenge Response Packet.\n
* @msdn{cc241922}
* Send Client Challenge Response Packet.
* msdn{cc241922}
* @param license license module
*/
@ -2510,9 +2518,12 @@ BOOL license_read_client_platform_challenge_response(rdpLicense* license, wStrea
}
/**
* Send Server License Error - Valid Client Packet.\n
* @msdn{cc241922}
* @param license license module
* Send Server License Error - Valid Client Packet.
* msdn{cc241922}
*
* @param rdp A pointer to the context to use
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL license_send_valid_client_error_packet(rdpRdp* rdp)

View File

@ -330,7 +330,8 @@ static int mcs_initialize_client_channels(rdpMcs* mcs, const rdpSettings* settin
* @param s stream
* @param domainMCSPDU DomainMCSPDU type
* @param length TPKT length
* @return
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL mcs_read_domain_mcspdu_header(wStream* s, DomainMCSPDU domainMCSPDU, UINT16* length,
@ -508,10 +509,12 @@ static void mcs_print_domain_parameters(DomainParameters* domainParameters)
/**
* Merge MCS Domain Parameters.
* @param domainParameters target parameters
* @param domainParameters minimum parameters
* @param domainParameters maximum parameters
* @param domainParameters output parameters
* @param targetParameters target parameters
* @param minimumParameters minimum parameters
* @param maximumParameters maximum parameters
* @param pOutParameters output parameters
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL mcs_merge_domain_parameters(DomainParameters* targetParameters,
@ -625,8 +628,8 @@ BOOL mcs_merge_domain_parameters(DomainParameters* targetParameters,
}
/**
* Read an MCS Connect Initial PDU.\n
* @msdn{cc240508}
* Read an MCS Connect Initial PDU.
* msdn{cc240508}
* @param mcs MCS module
* @param s stream
*/
@ -695,11 +698,11 @@ BOOL mcs_recv_connect_initial(rdpMcs* mcs, wStream* s)
}
/**
* Write an MCS Connect Initial PDU.\n
* @msdn{cc240508}
* Write an MCS Connect Initial PDU.
* msdn{cc240508}
* @param s stream
* @param mcs MCS module
* @param user_data GCC Conference Create Request
* @param userData GCC Conference Create Request
*/
BOOL mcs_write_connect_initial(wStream* s, rdpMcs* mcs, wStream* userData)
@ -751,11 +754,13 @@ out:
}
/**
* Write an MCS Connect Response PDU.\n
* @msdn{cc240508}
* Write an MCS Connect Response PDU.
* msdn{cc240508}
* @param s stream
* @param mcs MCS module
* @param user_data GCC Conference Create Response
* @param userData GCC Conference Create Response
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL mcs_write_connect_response(wStream* s, rdpMcs* mcs, wStream* userData)
@ -793,8 +798,8 @@ out:
}
/**
* Send MCS Connect Initial.\n
* @msdn{cc240508}
* Send MCS Connect Initial.
* msdn{cc240508}
* @param mcs mcs module
*/
@ -873,8 +878,8 @@ out:
}
/**
* Read MCS Connect Response.\n
* @msdn{cc240501}
* Read MCS Connect Response.
* msdn{cc240501}
* @param mcs mcs module
*/
@ -914,8 +919,8 @@ BOOL mcs_recv_connect_response(rdpMcs* mcs, wStream* s)
}
/**
* Send MCS Connect Response.\n
* @msdn{cc240501}
* Send MCS Connect Response.
* msdn{cc240501}
* @param mcs mcs module
*/
@ -987,9 +992,9 @@ out:
}
/**
* Read MCS Erect Domain Request.\n
* @msdn{cc240523}
* @param mcs
* Read MCS Erect Domain Request.
* msdn{cc240523}
* @param mcs MCS module to use
* @param s stream
*/
@ -1015,9 +1020,9 @@ BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, wStream* s)
}
/**
* Send MCS Erect Domain Request.\n
* @msdn{cc240523}
* @param mcs
* Send MCS Erect Domain Request.
* msdn{cc240523}
* @param mcs MCS module to use
*/
BOOL mcs_send_erect_domain_request(rdpMcs* mcs)
@ -1047,8 +1052,8 @@ BOOL mcs_send_erect_domain_request(rdpMcs* mcs)
}
/**
* Read MCS Attach User Request.\n
* @msdn{cc240524}
* Read MCS Attach User Request.
* msdn{cc240524}
* @param mcs mcs module
* @param s stream
*/
@ -1066,8 +1071,8 @@ BOOL mcs_recv_attach_user_request(rdpMcs* mcs, wStream* s)
}
/**
* Send MCS Attach User Request.\n
* @msdn{cc240524}
* Send MCS Attach User Request.
* msdn{cc240524}
* @param mcs mcs module
*/
@ -1096,8 +1101,8 @@ BOOL mcs_send_attach_user_request(rdpMcs* mcs)
}
/**
* Read MCS Attach User Confirm.\n
* @msdn{cc240525}
* Read MCS Attach User Confirm.
* msdn{cc240525}
* @param mcs mcs module
*/
@ -1119,8 +1124,8 @@ BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, wStream* s)
}
/**
* Send MCS Attach User Confirm.\n
* @msdn{cc240525}
* Send MCS Attach User Confirm.
* msdn{cc240525}
* @param mcs mcs module
*/
@ -1152,8 +1157,8 @@ BOOL mcs_send_attach_user_confirm(rdpMcs* mcs)
}
/**
* Read MCS Channel Join Request.\n
* @msdn{cc240526}
* Read MCS Channel Join Request.
* msdn{cc240526}
* @param mcs mcs module
* @param s stream
*/
@ -1186,10 +1191,13 @@ BOOL mcs_recv_channel_join_request(rdpMcs* mcs, const rdpSettings* settings, wSt
}
/**
* Send MCS Channel Join Request.\n
* @msdn{cc240526}
* Send MCS Channel Join Request.
* msdn{cc240526}
*
* @param mcs mcs module
* @param channel_id channel id
* @param channelId channel id
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL mcs_send_channel_join_request(rdpMcs* mcs, UINT16 channelId)
@ -1219,8 +1227,8 @@ BOOL mcs_send_channel_join_request(rdpMcs* mcs, UINT16 channelId)
}
/**
* Read MCS Channel Join Confirm.\n
* @msdn{cc240527}
* Read MCS Channel Join Confirm.
* msdn{cc240527}
* @param mcs mcs module
*/
@ -1249,8 +1257,8 @@ BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, wStream* s, UINT16* channelId)
}
/**
* Send MCS Channel Join Confirm.\n
* @msdn{cc240527}
* Send MCS Channel Join Confirm.
* msdn{cc240527}
* @param mcs mcs module
*/
@ -1289,7 +1297,7 @@ fail:
}
/**
* Receive MCS Disconnect Provider Ultimatum PDU.\n
* Receive MCS Disconnect Provider Ultimatum PDU.
* @param mcs mcs module
*/
@ -1339,7 +1347,7 @@ BOOL mcs_recv_disconnect_provider_ultimatum(rdpMcs* mcs, wStream* s, int* reason
}
/**
* Send MCS Disconnect Provider Ultimatum PDU.\n
* Send MCS Disconnect Provider Ultimatum PDU.
* @param mcs mcs module
*/

View File

@ -97,8 +97,10 @@ static BOOL nego_process_negotiation_failure(rdpNego* nego, wStream* s);
/**
* Negotiate protocol security and connect.
* @param nego
* @return
*
* @param nego A pointer to the NEGO struct
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL nego_connect(rdpNego* nego)
@ -278,12 +280,6 @@ BOOL nego_security_connect(rdpNego* nego)
return nego->SecurityConnected;
}
/**
* Connect TCP layer.
* @param nego
* @return
*/
static BOOL nego_tcp_connect(rdpNego* nego)
{
rdpContext* context;
@ -330,8 +326,10 @@ static BOOL nego_tcp_connect(rdpNego* nego)
/**
* Connect TCP layer. For direct approach, connect security layer as well.
* @param nego
* @return
*
* @param nego A pointer to the NEGO struct
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL nego_transport_connect(rdpNego* nego)
@ -348,8 +346,10 @@ BOOL nego_transport_connect(rdpNego* nego)
/**
* Disconnect TCP layer.
* @param nego
* @return
*
* @param nego A pointer to the NEGO struct
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL nego_transport_disconnect(rdpNego* nego)
@ -365,8 +365,10 @@ BOOL nego_transport_disconnect(rdpNego* nego)
/**
* Send preconnection information if enabled.
* @param nego
* @return
*
* @param nego A pointer to the NEGO struct
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL nego_send_preconnection_pdu(rdpNego* nego)
@ -433,11 +435,6 @@ BOOL nego_send_preconnection_pdu(rdpNego* nego)
return TRUE;
}
/**
* Attempt negotiating NLA + TLS extended security.
* @param nego
*/
static void nego_attempt_ext(rdpNego* nego)
{
WINPR_ASSERT(nego);
@ -479,11 +476,6 @@ static void nego_attempt_ext(rdpNego* nego)
}
}
/**
* Attempt negotiating NLA + TLS security.
* @param nego
*/
static void nego_attempt_nla(rdpNego* nego)
{
WINPR_ASSERT(nego);
@ -523,11 +515,6 @@ static void nego_attempt_nla(rdpNego* nego)
}
}
/**
* Attempt negotiating TLS security.
* @param nego
*/
static void nego_attempt_tls(rdpNego* nego)
{
WINPR_ASSERT(nego);
@ -563,11 +550,6 @@ static void nego_attempt_tls(rdpNego* nego)
}
}
/**
* Attempt negotiating standard RDP security.
* @param nego
*/
static void nego_attempt_rdp(rdpNego* nego)
{
WINPR_ASSERT(nego);
@ -595,7 +577,10 @@ static void nego_attempt_rdp(rdpNego* nego)
/**
* Wait to receive a negotiation response
* @param nego
*
* @param nego A pointer to the NEGO struct
*
* @return \b TRUE for success, \b FALSE for failure
*/
BOOL nego_recv_response(rdpNego* nego)
@ -630,11 +615,14 @@ BOOL nego_recv_response(rdpNego* nego)
}
/**
* Receive protocol security negotiation message.\n
* @msdn{cc240501}
* @param transport transport
* @param s stream
* Receive protocol security negotiation message.
* msdn{cc240501}
*
* @param transport The transport to read from
* @param s A stream to read the received data from
* @param extra nego pointer
*
* @return \b 0 for success, \b -1 for failure
*/
int nego_recv(rdpTransport* transport, wStream* s, void* extra)
@ -714,9 +702,7 @@ int nego_recv(rdpTransport* transport, wStream* s, void* extra)
/**
* Read optional routing token or cookie of X.224 Connection Request PDU.
* @msdn{cc240470}
* @param nego
* @param s stream
* msdn{cc240470}
*/
static BOOL nego_read_request_token_or_cookie(rdpNego* nego, wStream* s)
@ -805,9 +791,12 @@ static BOOL nego_read_request_token_or_cookie(rdpNego* nego, wStream* s)
}
/**
* Read protocol security negotiation request message.\n
* @param nego
* @param s stream
* Read protocol security negotiation request message.
*
* @param nego A pointer to the NEGO struct
* @param s A stream to read from
*
* @return \b TRUE for success, \b FALSE for failure
*/
BOOL nego_read_request(rdpNego* nego, wStream* s)
@ -857,7 +846,8 @@ BOOL nego_read_request(rdpNego* nego, wStream* s)
/**
* Send protocol security negotiation message.
* @param nego
*
* @param nego A pointer to the NEGO struct
*/
void nego_send(rdpNego* nego)
@ -885,10 +875,13 @@ void nego_send(rdpNego* nego)
}
/**
* Send RDP Negotiation Request (RDP_NEG_REQ).\n
* @msdn{cc240500}\n
* @msdn{cc240470}
* @param nego
* Send RDP Negotiation Request (RDP_NEG_REQ).
* msdn{cc240500}
* msdn{cc240470}
*
* @param nego A pointer to the NEGO struct
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL nego_send_negotiation_request(rdpNego* nego)
@ -979,12 +972,6 @@ fail:
return rc;
}
/**
* Process Negotiation Request from Connection Request message.
* @param nego
* @param s
*/
static BOOL nego_process_correlation_info(rdpNego* nego, wStream* s)
{
UINT8 type, flags, x;
@ -1094,11 +1081,6 @@ BOOL nego_process_negotiation_request(rdpNego* nego, wStream* s)
return TRUE;
}
/**
* Process Negotiation Response from Connection Confirm message.
* @param nego
* @param s
*/
static const char* nego_rdp_neg_rsp_flags_str(UINT32 flags)
{
static char buffer[1024] = { 0 };
@ -1152,8 +1134,10 @@ BOOL nego_process_negotiation_response(rdpNego* nego, wStream* s)
/**
* Process Negotiation Failure from Connection Confirm message.
* @param nego
* @param s
* @param nego A pointer to the NEGO struct
* @param s The stream to read from
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL nego_process_negotiation_failure(rdpNego* nego, wStream* s)
@ -1217,8 +1201,8 @@ BOOL nego_process_negotiation_failure(rdpNego* nego, wStream* s)
}
/**
* Send RDP Negotiation Response (RDP_NEG_RSP).\n
* @param nego
* Send RDP Negotiation Response (RDP_NEG_RSP).
* @param nego A pointer to the NEGO struct
*/
BOOL nego_send_negotiation_response(rdpNego* nego)
@ -1352,7 +1336,7 @@ BOOL nego_send_negotiation_response(rdpNego* nego)
/**
* Initialize NEGO state machine.
* @param nego
* @param nego A pointer to the NEGO struct
*/
void nego_init(rdpNego* nego)
@ -1367,8 +1351,10 @@ void nego_init(rdpNego* nego)
/**
* Create a new NEGO state machine instance.
* @param transport
* @return
*
* @param transport The transport to use
*
* @return A pointer to the allocated NEGO instance or NULL
*/
rdpNego* nego_new(rdpTransport* transport)
@ -1385,7 +1371,7 @@ rdpNego* nego_new(rdpTransport* transport)
/**
* Free NEGO state machine.
* @param nego
* @param nego A pointer to the NEGO struct
*/
void nego_free(rdpNego* nego)
@ -1400,9 +1386,11 @@ void nego_free(rdpNego* nego)
/**
* Set target hostname and port.
* @param nego
* @param hostname
* @param port
* @param nego A pointer to the NEGO struct
* @param hostname The hostname to set
* @param port The port to set
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL nego_set_target(rdpNego* nego, const char* hostname, UINT16 port)
@ -1417,9 +1405,9 @@ BOOL nego_set_target(rdpNego* nego, const char* hostname, UINT16 port)
/**
* Enable security layer negotiation.
* @param nego pointer to the negotiation structure
* @param enable_rdp whether to enable security layer negotiation (TRUE for enabled, FALSE for
* disabled)
* @param nego A pointer to the NEGO struct pointer to the negotiation structure
* @param NegotiateSecurityLayer whether to enable security layer negotiation (TRUE for enabled,
* FALSE for disabled)
*/
void nego_set_negotiation_enabled(rdpNego* nego, BOOL NegotiateSecurityLayer)
@ -1431,9 +1419,9 @@ void nego_set_negotiation_enabled(rdpNego* nego, BOOL NegotiateSecurityLayer)
/**
* Enable restricted admin mode.
* @param nego pointer to the negotiation structure
* @param enable_restricted whether to enable security layer negotiation (TRUE for enabled, FALSE
* for disabled)
* @param nego A pointer to the NEGO struct pointer to the negotiation structure
* @param RestrictedAdminModeRequired whether to enable security layer negotiation (TRUE for
* enabled, FALSE for disabled)
*/
void nego_set_restricted_admin_mode_required(rdpNego* nego, BOOL RestrictedAdminModeRequired)
@ -1455,7 +1443,7 @@ void nego_set_gateway_bypass_local(rdpNego* nego, BOOL GatewayBypassLocal)
/**
* Enable RDP security protocol.
* @param nego pointer to the negotiation structure
* @param nego A pointer to the NEGO struct pointer to the negotiation structure
* @param enable_rdp whether to enable normal RDP protocol (TRUE for enabled, FALSE for disabled)
*/
@ -1467,7 +1455,7 @@ void nego_enable_rdp(rdpNego* nego, BOOL enable_rdp)
/**
* Enable TLS security protocol.
* @param nego pointer to the negotiation structure
* @param nego A pointer to the NEGO struct pointer to the negotiation structure
* @param enable_tls whether to enable TLS + RDP protocol (TRUE for enabled, FALSE for disabled)
*/
@ -1479,7 +1467,7 @@ void nego_enable_tls(rdpNego* nego, BOOL enable_tls)
/**
* Enable NLA security protocol.
* @param nego pointer to the negotiation structure
* @param nego A pointer to the NEGO struct pointer to the negotiation structure
* @param enable_nla whether to enable network level authentication protocol (TRUE for enabled,
* FALSE for disabled)
*/
@ -1492,7 +1480,7 @@ void nego_enable_nla(rdpNego* nego, BOOL enable_nla)
/**
* Enable NLA extended security protocol.
* @param nego pointer to the negotiation structure
* @param nego A pointer to the NEGO struct pointer to the negotiation structure
* @param enable_ext whether to enable network level authentication extended protocol (TRUE for
* enabled, FALSE for disabled)
*/
@ -1505,9 +1493,11 @@ void nego_enable_ext(rdpNego* nego, BOOL enable_ext)
/**
* Set routing token.
* @param nego
* @param RoutingToken
* @param RoutingTokenLength
* @param nego A pointer to the NEGO struct
* @param RoutingToken A pointer to the routing token
* @param RoutingTokenLength The lenght of the routing token
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL nego_set_routing_token(rdpNego* nego, const BYTE* RoutingToken, DWORD RoutingTokenLength)
@ -1528,8 +1518,10 @@ BOOL nego_set_routing_token(rdpNego* nego, const BYTE* RoutingToken, DWORD Routi
/**
* Set cookie.
* @param nego
* @param cookie
* @param nego A pointer to the NEGO struct
* @param cookie A pointer to the cookie string
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL nego_set_cookie(rdpNego* nego, const char* cookie)
@ -1553,8 +1545,8 @@ BOOL nego_set_cookie(rdpNego* nego, const char* cookie)
/**
* Set cookie maximum length
* @param nego
* @param CookieMaxLength
* @param nego A pointer to the NEGO struct
* @param CookieMaxLength the length to set
*/
void nego_set_cookie_max_length(rdpNego* nego, UINT32 CookieMaxLength)
@ -1564,8 +1556,8 @@ void nego_set_cookie_max_length(rdpNego* nego, UINT32 CookieMaxLength)
/**
* Enable / disable preconnection PDU.
* @param nego
* @param send_pcpdu
* @param nego A pointer to the NEGO struct
* @param SendPreconnectionPdu The value to set
*/
void nego_set_send_preconnection_pdu(rdpNego* nego, BOOL SendPreconnectionPdu)
@ -1575,8 +1567,8 @@ void nego_set_send_preconnection_pdu(rdpNego* nego, BOOL SendPreconnectionPdu)
/**
* Set preconnection id.
* @param nego
* @param id
* @param nego A pointer to the NEGO struct
* @param PreconnectionId the ID to set
*/
void nego_set_preconnection_id(rdpNego* nego, UINT32 PreconnectionId)
@ -1586,8 +1578,8 @@ void nego_set_preconnection_id(rdpNego* nego, UINT32 PreconnectionId)
/**
* Set preconnection blob.
* @param nego
* @param blob
* @param nego A pointer to the NEGO struct
* @param PreconnectionBlob A pointer to the blob to use
*/
void nego_set_preconnection_blob(rdpNego* nego, const char* PreconnectionBlob)

View File

@ -404,11 +404,6 @@ static BOOL nla_client_setup_identity(rdpNla* nla)
return TRUE;
}
/**
* Initialize NTLM/Kerberos SSP authentication module (client).
* @param credssp
*/
static int nla_client_init(rdpNla* nla)
{
rdpTls* tls = NULL;
@ -626,7 +621,6 @@ fail:
/**
* Initialize NTLMSSP authentication module (server).
* @param credssp
*/
static int nla_server_init(rdpNla* nla)
@ -698,7 +692,8 @@ static BOOL nla_server_recv_credentials(rdpNla* nla)
/**
* Authenticate with client using CredSSP (server).
* @param credssp
* @param nla The NLA instance to use
*
* @return 1 if authentication is successful
*/
@ -839,7 +834,8 @@ static int nla_server_authenticate(rdpNla* nla)
/**
* Authenticate using CredSSP.
* @param credssp
* @param nla The NLA instance to use
*
* @return 1 if authentication is successful
*/
@ -1116,7 +1112,9 @@ static BOOL nla_read_ts_credentials(rdpNla* nla, SecBuffer* data)
/**
* Encode TSCredentials structure.
* @param credssp
* @param nla A pointer to the NLA to use
*
* @return \b TRUE for success, \b FALSE otherwise
*/
static BOOL nla_encode_ts_credentials(rdpNla* nla)
@ -1302,7 +1300,10 @@ static BOOL nla_decrypt_ts_credentials(rdpNla* nla)
/**
* Send CredSSP message.
* @param credssp
*
* @param nla A pointer to the NLA to use
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL nla_send(rdpNla* nla)
@ -1608,7 +1609,10 @@ fail:
/**
* Create new CredSSP state machine.
* @param transport
*
* @param context A pointer to the rdp context to use
* @param transport A pointer to the transport to use
*
* @return new CredSSP state machine.
*/
@ -1659,7 +1663,7 @@ cleanup:
/**
* Free CredSSP state machine.
* @param credssp
* @param nla The NLA instance to free
*/
void nla_free(rdpNla* nla)

View File

@ -120,10 +120,13 @@ static BOOL rdp_write_share_control_header(wStream* s, UINT16 length, UINT16 typ
static BOOL rdp_write_share_data_header(wStream* s, UINT16 length, BYTE type, UINT32 share_id);
/**
* Read RDP Security Header.\n
* @msdn{cc240579}
* @brief Read RDP Security Header.
* msdn{cc240579}
*
* @param s stream
* @param flags security flags
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL rdp_read_security_header(wStream* s, UINT16* flags, UINT16* length)
@ -150,10 +153,12 @@ BOOL rdp_read_security_header(wStream* s, UINT16* flags, UINT16* length)
}
/**
* Write RDP Security Header.\n
* @msdn{cc240579}
* Write RDP Security Header.
* msdn{cc240579}
* @param s stream
* @param flags security flags
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL rdp_write_security_header(wStream* s, UINT16 flags)
@ -433,11 +438,13 @@ fail:
}
/**
* Read an RDP packet header.\n
* Read an RDP packet header.
* @param rdp rdp module
* @param s stream
* @param length RDP packet length
* @param channel_id channel id
* @param channelId channel id
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL rdp_read_header(rdpRdp* rdp, wStream* s, UINT16* length, UINT16* channelId)
@ -558,11 +565,13 @@ BOOL rdp_read_header(rdpRdp* rdp, wStream* s, UINT16* length, UINT16* channelId)
}
/**
* Write an RDP packet header.\n
* Write an RDP packet header.
* @param rdp rdp module
* @param s stream
* @param length RDP packet length
* @param channel_id channel id
* @param channelId channel id
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL rdp_write_header(rdpRdp* rdp, wStream* s, UINT16 length, UINT16 channelId)
@ -1288,10 +1297,14 @@ BOOL rdp_read_flow_control_pdu(wStream* s, UINT16* type, UINT16* channel_id)
}
/**
* Decrypt an RDP packet.\n
* Decrypt an RDP packet.
*
* @param rdp RDP module
* @param s stream
* @param length int
* @param pLength A pointer to the result variable, must not be NULL
* @param securityFlags the security flags to apply
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL rdp_decrypt(rdpRdp* rdp, wStream* s, UINT16* pLength, UINT16 securityFlags)
@ -1416,7 +1429,7 @@ const char* pdu_type_to_str(UINT16 pduType)
}
/**
* Process an RDP packet.\n
* Process an RDP packet.
* @param rdp RDP module
* @param s stream
*/

View File

@ -31,8 +31,8 @@ static void rdp_read_system_time(wStream* s, SYSTEMTIME* system_time);
static void rdp_write_system_time(wStream* s, SYSTEMTIME* system_time);
/**
* Read SYSTEM_TIME structure (TS_SYSTEMTIME).\n
* @msdn{cc240478}
* Read SYSTEM_TIME structure (TS_SYSTEMTIME).
* msdn{cc240478}
* @param s stream
* @param system_time system time structure
*/
@ -50,8 +50,8 @@ void rdp_read_system_time(wStream* s, SYSTEMTIME* system_time)
}
/**
* Write SYSTEM_TIME structure (TS_SYSTEMTIME).\n
* @msdn{cc240478}
* Write SYSTEM_TIME structure (TS_SYSTEMTIME).
* msdn{cc240478}
* @param s stream
* @param system_time system time structure
*/
@ -74,10 +74,12 @@ void rdp_write_system_time(wStream* s, SYSTEMTIME* system_time)
}
/**
* Read client time zone information (TS_TIME_ZONE_INFORMATION).\n
* @msdn{cc240477}
* Read client time zone information (TS_TIME_ZONE_INFORMATION).
* msdn{cc240477}
* @param s stream
* @param settings settings
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL rdp_read_client_time_zone(wStream* s, rdpSettings* settings)
@ -108,10 +110,12 @@ BOOL rdp_read_client_time_zone(wStream* s, rdpSettings* settings)
}
/**
* Write client time zone information (TS_TIME_ZONE_INFORMATION).\n
* @msdn{cc240477}
* Write client time zone information (TS_TIME_ZONE_INFORMATION).
* msdn{cc240477}
* @param s stream
* @param settings settings
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL rdp_write_client_time_zone(wStream* s, rdpSettings* settings)

View File

@ -60,9 +60,11 @@
*/
/**
* Verify if a packet has valid TPKT header.\n
* @param s
* @return BOOL
* Verify if a packet has valid TPKT header.
*
* @param s A stream to read from
*
* @return \b TRUE for success, \b FALSE otherwise
*/
int tpkt_verify_header(wStream* s)
@ -81,10 +83,12 @@ int tpkt_verify_header(wStream* s)
}
/**
* Read a TPKT header.\n
* @param s
* @param length
* @return success
* Read a TPKT header.
*
* @param s A stream to read from
* @param length A pointer to the result, must not be NULL
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL tpkt_read_header(wStream* s, UINT16* length)
@ -142,9 +146,12 @@ BOOL tpkt_ensure_stream_consumed_(wStream* s, UINT16 length, const char* fkt)
}
/**
* Write a TPKT header.\n
* @param s
* @param length
* Write a TPKT header.
*
* @param s A stream to write to
* @param length The value to write
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL tpkt_write_header(wStream* s, UINT16 length)

View File

@ -107,9 +107,11 @@ size_t _ber_sizeof_length(size_t length)
/**
* Read BER Universal tag.
* @param s stream
*
* @param s The stream to read from
* @param tag BER universally-defined tag
* @return
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL ber_read_universal_tag(wStream* s, BYTE tag, BOOL pc)
@ -521,10 +523,12 @@ size_t ber_sizeof_contextual_octet_string(size_t length)
return ber_sizeof_contextual_tag(ret) + ret;
}
/**
* Read a BER BOOLEAN
* @param s
* @param value
/** \brief Read a BER BOOLEAN
*
* @param s The stream to read from.
* @param value A pointer to the value read, must not be NULL
*
* \return \b TRUE for success, \b FALSE for any failure
*/
BOOL ber_read_BOOL(wStream* s, BOOL* value)
@ -532,6 +536,7 @@ BOOL ber_read_BOOL(wStream* s, BOOL* value)
size_t length;
BYTE v;
WINPR_ASSERT(value);
if (!ber_read_universal_tag(s, BER_TAG_BOOLEAN, FALSE) || !ber_read_length(s, &length))
return FALSE;
@ -550,8 +555,9 @@ BOOL ber_read_BOOL(wStream* s, BOOL* value)
/**
* Write a BER BOOLEAN
* @param s
* @param value
*
* @param s A pointer to the stream to write to
* @param value The value to write
*/
void ber_write_BOOL(wStream* s, BOOL value)
@ -615,8 +621,11 @@ BOOL ber_read_integer(wStream* s, UINT32* value)
/**
* Write a BER INTEGER
* @param s
* @param value
*
* @param s A pointer to the stream to write to
* @param value The value to write
*
* @return The size in bytes that were written
*/
size_t ber_write_integer(wStream* s, UINT32 value)

View File

@ -28,15 +28,18 @@
/**
* Read PER length.
* @param s stream
* @param length length
* @return
*
* @param s stream to read from
* @param length A pointer to return the length read, must not be NULL
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_read_length(wStream* s, UINT16* length)
{
BYTE byte;
WINPR_ASSERT(length);
if (!Stream_CheckAndLogRequiredLength(TAG, s, 1))
return FALSE;
@ -64,6 +67,8 @@ BOOL per_read_length(wStream* s, UINT16* length)
* Write PER length.
* @param s stream
* @param length length
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_write_length(wStream* s, UINT16 length)
@ -87,7 +92,8 @@ BOOL per_write_length(wStream* s, UINT16 length)
* Read PER choice.
* @param s stream
* @param choice choice
* @return
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_read_choice(wStream* s, BYTE* choice)
@ -103,6 +109,8 @@ BOOL per_read_choice(wStream* s, BYTE* choice)
* Write PER CHOICE.
* @param s stream
* @param choice index of chosen field
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_write_choice(wStream* s, BYTE choice)
@ -117,7 +125,8 @@ BOOL per_write_choice(wStream* s, BYTE choice)
* Read PER selection.
* @param s stream
* @param selection selection
* @return
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_read_selection(wStream* s, BYTE* selection)
@ -134,6 +143,8 @@ BOOL per_read_selection(wStream* s, BYTE* selection)
* Write PER selection for OPTIONAL fields.
* @param s stream
* @param selection bit map of selected fields
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_write_selection(wStream* s, BYTE selection)
@ -148,7 +159,8 @@ BOOL per_write_selection(wStream* s, BYTE selection)
* Read PER number of sets.
* @param s stream
* @param number number of sets
* @return
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_read_number_of_sets(wStream* s, BYTE* number)
@ -163,8 +175,11 @@ BOOL per_read_number_of_sets(wStream* s, BYTE* number)
/**
* Write PER number of sets for SET OF.
*
* @param s stream
* @param number number of sets
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_write_number_of_sets(wStream* s, BYTE number)
@ -177,8 +192,11 @@ BOOL per_write_number_of_sets(wStream* s, BYTE number)
/**
* Read PER padding with zeros.
* @param s stream
* @param length
*
* @param s A stream to read from
* @param length the data to write
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_read_padding(wStream* s, UINT16 length)
@ -192,8 +210,10 @@ BOOL per_read_padding(wStream* s, UINT16 length)
/**
* Write PER padding with zeros.
* @param s stream
* @param length
* @param s A stream to write to
* @param length the data to write
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_write_padding(wStream* s, UINT16 length)
@ -208,7 +228,8 @@ BOOL per_write_padding(wStream* s, UINT16 length)
* Read PER INTEGER.
* @param s stream
* @param integer integer
* @return
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_read_integer(wStream* s, UINT32* integer)
@ -239,6 +260,8 @@ BOOL per_read_integer(wStream* s, UINT32* integer)
* Write PER INTEGER.
* @param s stream
* @param integer integer
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_write_integer(wStream* s, UINT32 integer)
@ -272,10 +295,12 @@ BOOL per_write_integer(wStream* s, UINT32 integer)
/**
* Read PER INTEGER (UINT16).
* @param s stream
* @param integer integer
*
* @param s The stream to read from
* @param integer The integer result variable pointer, must not be NULL
* @param min minimum value
* @return
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL per_read_integer16(wStream* s, UINT16* integer, UINT16 min)
@ -302,6 +327,8 @@ BOOL per_read_integer16(wStream* s, UINT16* integer, UINT16 min)
* @param s stream
* @param integer integer
* @param min minimum value
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_write_integer16(wStream* s, UINT16 integer, UINT16 min)
@ -314,10 +341,12 @@ BOOL per_write_integer16(wStream* s, UINT16 integer, UINT16 min)
/**
* Read PER ENUMERATED.
* @param s stream
* @param enumerated enumerated
*
* @param s The stream to read from
* @param enumerated enumerated result variable, must not be NULL
* @param count enumeration count
* @return
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL per_read_enumerated(wStream* s, BYTE* enumerated, BYTE count)
@ -340,10 +369,12 @@ BOOL per_read_enumerated(wStream* s, BYTE* enumerated, BYTE count)
/**
* Write PER ENUMERATED.
* @param s stream
*
* @param s The stream to write to
* @param enumerated enumerated
* @param count enumeration count
* @return
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL per_write_enumerated(wStream* s, BYTE enumerated, BYTE count)
@ -374,10 +405,12 @@ static BOOL per_check_oid_and_log_mismatch(const BYTE* got, const BYTE* expect,
/**
* Read PER OBJECT_IDENTIFIER (OID).
* @param s stream
*
* @param s The stream to read from
* @param oid object identifier (OID)
* @warning It works correctly only for limited set of OIDs.
* @return
*
* @return \b TRUE for success, \b FALSE otherwise
*/
BOOL per_read_object_identifier(wStream* s, const BYTE oid[6])
@ -415,6 +448,8 @@ BOOL per_read_object_identifier(wStream* s, const BYTE oid[6])
* @param s stream
* @param oid object identifier (oid)
* @warning It works correctly only for limited set of OIDs.
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_write_object_identifier(wStream* s, const BYTE oid[6])
@ -448,11 +483,13 @@ static void per_write_string(wStream* s, BYTE* str, int length)
/**
* Read PER OCTET_STRING.
* @param s stream
*
* @param s The stream to read from
* @param oct_str octet string
* @param length string length
* @param min minimum length
* @return
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_read_octet_string(wStream* s, const BYTE* oct_str, UINT16 length, UINT16 min)
@ -481,6 +518,8 @@ BOOL per_read_octet_string(wStream* s, const BYTE* oct_str, UINT16 length, UINT1
* @param oct_str octet string
* @param length string length
* @param min minimum string length
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_write_octet_string(wStream* s, const BYTE* oct_str, UINT16 length, UINT16 min)
@ -503,9 +542,9 @@ BOOL per_write_octet_string(wStream* s, const BYTE* oct_str, UINT16 length, UINT
/**
* Read PER NumericString.
* @param s stream
* @param num_str numeric string
* @param length string length
* @param min minimum string length
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_read_numeric_string(wStream* s, UINT16 min)
@ -531,6 +570,8 @@ BOOL per_read_numeric_string(wStream* s, UINT16 min)
* @param num_str numeric string
* @param length string length
* @param min minimum string length
*
* @return \b TRUE for success, \b FALSE otherwise.
*/
BOOL per_write_numeric_string(wStream* s, const BYTE* num_str, UINT16 length, UINT16 min)

View File

@ -136,11 +136,13 @@ HGDI_BITMAP gdi_CreateBitmapEx(UINT32 nWidth, UINT32 nHeight, UINT32 format, UIN
}
/**
* Create a new bitmap of the given width and height compatible with the current device context.\n
* @msdn{dd183488}
* Create a new bitmap of the given width and height compatible with the current device context.
* msdn{dd183488}
*
* @param hdc device context
* @param nWidth width
* @param nHeight height
*
* @return new bitmap
*/
@ -559,8 +561,9 @@ static BOOL BitBlt_process(HGDI_DC hdcDest, INT32 nXDest, INT32 nYDest, INT32 nW
}
/**
* Perform a bit blit operation on the given pixel buffers.\n
* @msdn{dd183370}
* Perform a bit blit operation on the given pixel buffers.
* msdn{dd183370}
*
* @param hdcDest destination device context
* @param nXDest destination x1
* @param nYDest destination y1

View File

@ -817,8 +817,9 @@ const char* gdi_rop_to_string(UINT32 code)
}
/**
* Create a new solid brush.\n
* @msdn{dd183518}
* @brief Create a new solid brush.
* msdn{dd183518}
*
* @param crColor brush color
* @return new brush
*/
@ -835,8 +836,9 @@ HGDI_BRUSH gdi_CreateSolidBrush(UINT32 crColor)
return hBrush;
}
/**
* Create a new pattern brush.\n
* @msdn{dd183508}
* @brief Create a new pattern brush.
* msdn{dd183508}
*
* @param hbmp pattern bitmap
* @return new brush
*/
@ -852,6 +854,7 @@ HGDI_BRUSH gdi_CreatePatternBrush(HGDI_BITMAP hbmp)
hBrush->pattern = hbmp;
return hBrush;
}
HGDI_BRUSH gdi_CreateHatchBrush(HGDI_BITMAP hbmp)
{
HGDI_BRUSH hBrush = (HGDI_BRUSH)calloc(1, sizeof(GDI_BRUSH));

View File

@ -38,8 +38,9 @@ BOOL gdi_SetClipRgn(HGDI_DC hdc, INT32 nXLeft, INT32 nYLeft, INT32 nWidth, INT32
}
/**
* Get the current clipping region.\n
* @msdn{dd144866}
* Get the current clipping region.
* msdn{dd144866}
*
* @param hdc device context
* @return clipping region
*/

View File

@ -1,4 +1,4 @@
/**
/*
* FreeRDP: A Remote Desktop Protocol Implementation
* GDI Device Context Functions
*
@ -34,8 +34,9 @@
#include <freerdp/gdi/dc.h>
/**
* Get the current device context (a new one is created each time).\n
* @msdn{dd144871}
* @brief Get the current device context (a new one is created each time).
* msdn{dd144871}
*
* @return current device context
*/
@ -62,8 +63,9 @@ HGDI_DC gdi_GetDC(void)
}
/**
* Create a device context.\n
* @msdn{dd144871}
* @brief Create a device context.
* msdn{dd144871}
*
* @return new device context
*/
@ -103,8 +105,8 @@ fail:
}
/**
* Create a new device context compatible with the given device context.\n
* @msdn{dd183489}
* @brief Create a new device context compatible with the given device context.
* msdn{dd183489}
* @param hdc device context
* @return new compatible device context
*/
@ -130,8 +132,9 @@ HGDI_DC gdi_CreateCompatibleDC(HGDI_DC hdc)
}
/**
* Select a GDI object in the current device context.\n
* @msdn{dd162957}
* @brief Select a GDI object in the current device context.
* msdn{dd162957}
*
* @param hdc device context
* @param hgdiobject new selected GDI object
* @return previous selected GDI object
@ -178,8 +181,8 @@ HGDIOBJECT gdi_SelectObject(HGDI_DC hdc, HGDIOBJECT hgdiobject)
}
/**
* Delete a GDI object.\n
* @msdn{dd183539}
* @brief Delete a GDI object.
* msdn{dd183539}
* @param hgdiobject GDI object
* @return nonzero if successful, 0 otherwise
*/
@ -230,8 +233,8 @@ BOOL gdi_DeleteObject(HGDIOBJECT hgdiobject)
}
/**
* Delete device context.\n
* @msdn{dd183533}
* @brief Delete device context.
* msdn{dd183533}
* @param hdc device context
* @return nonzero if successful, 0 otherwise
*/

View File

@ -1,4 +1,4 @@
/**
/*
* FreeRDP: A Remote Desktop Protocol Implementation
* GDI Drawing Functions
*
@ -34,9 +34,11 @@
#include "drawing.h"
/**
* Set current foreground draw mode.\n
* @msdn{dd144922}
* @brief Set current foreground draw mode.
* msdn{dd144922}
*
* @param hdc device context
*
* @return draw mode
*/
@ -46,10 +48,12 @@ INT32 gdi_GetROP2(HGDI_DC hdc)
}
/**
* Set current foreground draw mode.\n
* @msdn{dd145088}
* @brief Set current foreground draw mode.
* msdn{dd145088}
*
* @param hdc device context
* @param fnDrawMode draw mode
*
* @return previous draw mode
*/
@ -64,9 +68,11 @@ INT32 gdi_SetROP2(HGDI_DC hdc, INT32 fnDrawMode)
}
/**
* Get the current background color.\n
* @msdn{dd144852}
* @brief Get the current background color.
* msdn{dd144852}
*
* @param hdc device context
*
* @return background color
*/
@ -76,10 +82,12 @@ UINT32 gdi_GetBkColor(HGDI_DC hdc)
}
/**
* Set the current background color.\n
* @msdn{dd162964}
* @brief Set the current background color.\n
* msdn{dd162964}
*
* @param hdc device color
* @param crColor new background color
*
* @return previous background color
*/
@ -91,9 +99,11 @@ UINT32 gdi_SetBkColor(HGDI_DC hdc, UINT32 crColor)
}
/**
* Get the current background mode.\n
* @msdn{dd144853}
* @brief Get the current background mode.\n
* msdn{dd144853}
*
* @param hdc device context
*
* @return background mode
*/
@ -103,10 +113,12 @@ UINT32 gdi_GetBkMode(HGDI_DC hdc)
}
/**
* Set the current background mode.\n
* @msdn{dd162965}
* @brief Set the current background mode.\n
* msdn{dd162965}
*
* @param hdc device context
* @param iBkMode background mode
*
* @return previous background mode on success, 0 on failure
*/
@ -123,10 +135,12 @@ INT32 gdi_SetBkMode(HGDI_DC hdc, INT32 iBkMode)
}
/**
* Set the current text color.\n
* @msdn{dd145093}
* @brief Set the current text color.\n
* msdn{dd145093}
*
* @param hdc device context
* @param crColor new text color
*
* @return previous text color
*/

View File

@ -1268,14 +1268,27 @@ BOOL gdi_resize_ex(rdpGdi* gdi, UINT32 width, UINT32 height, UINT32 stride, UINT
/**
* Initialize GDI
* @param inst current instance
* @return
*
* @param instance A pointer to the instance to use
* @param format The color format for the local framebuffer
* @return \b TRUE for success, \b FALSE for failure
*/
BOOL gdi_init(freerdp* instance, UINT32 format)
{
return gdi_init_ex(instance, format, 0, NULL, winpr_aligned_free);
}
/**
* Initialize GDI
*
* @param instance A pointer to the instance to use
* @param format The color format for the local framebuffer
* @param stride The size of a framebuffer line in bytes
* @param buffer A pointer to a buffer to be used as framebuffer
* @param pfree A custom function pointer to use to free the framebuffer
*
* @return \b TRUE for success, \b FALSE for failure
*/
BOOL gdi_init_ex(freerdp* instance, UINT32 format, UINT32 stride, BYTE* buffer,
void (*pfree)(void*))
{

View File

@ -68,7 +68,7 @@ static INLINE BYTE* gdi_get_brush_pointer(HGDI_DC hdcBrush, UINT32 x, UINT32 y)
case GDI_BS_HATCHED:
{
HGDI_BITMAP hBmpBrush = hdcBrush->brush->pattern;
/* According to @msdn{dd183396}, the system always positions a brush bitmap
/* According to msdn{dd183396}, the system always positions a brush bitmap
* at the brush origin and copy across the client area.
* Calculate the offset of the mapped pixel in the brush bitmap according to
* brush origin and dest coordinates */

View File

@ -35,14 +35,6 @@
#include "clipping.h"
#include "line.h"
/**
* Draw a line from the current position to the given position.\n
* @msdn{dd145029}
* @param hdc device context
* @param nXEnd ending x position
* @param nYEnd ending y position
* @return nonzero if successful, 0 otherwise
*/
static BOOL gdi_rop_color(UINT32 rop, BYTE* pixelPtr, UINT32 pen, UINT32 format)
{
const UINT32 srcPixel = FreeRDPReadColor(pixelPtr, format);

View File

@ -31,11 +31,15 @@
#include <freerdp/gdi/pen.h>
/**
* Create a new pen.\n
* @msdn{dd183509}
* @brief Create a new pen.
* msdn{dd183509}
*
* @param fnPenStyle pen style
* @param nWidth pen width
* @param crColor pen color
* @param format the color format
* @param palette A pointer to a color palette
*
* @return new pen
*/

View File

@ -61,12 +61,14 @@ static char* gdi_regn_str(char* buffer, size_t size, const HGDI_RGN rgn)
}
/**
* Create a region from rectangular coordinates.\n
* @msdn{dd183514}
* Create a region from rectangular coordinates.
* msdn{dd183514}
*
* @param nLeftRect x1
* @param nTopRect y1
* @param nRightRect x2
* @param nBottomRect y2
*
* @return new region
*/
@ -447,13 +449,15 @@ INLINE BOOL gdi_CopyOverlap(INT32 x, INT32 y, INT32 width, INT32 height, INT32 s
}
/**
* Set the coordinates of a given rectangle.\n
* @msdn{dd145085}
* Set the coordinates of a given rectangle.
* msdn{dd145085}
*
* @param rc rectangle
* @param xLeft x1
* @param yTop y1
* @param xRight x2
* @param yBottom y2
*
* @return nonzero if successful, 0 otherwise
*/
@ -519,8 +523,9 @@ INLINE BOOL gdi_SetRectRgn(HGDI_RGN hRgn, INT32 nLeftRect, INT32 nTopRect, INT32
}
/**
* Compare two regions for equality.\n
* @msdn{dd162700}
* @brief Compare two regions for equality.
* msdn{dd162700}
*
* @param hSrcRgn1 first region
* @param hSrcRgn2 second region
* @return nonzero if both regions are equal, 0 otherwise
@ -538,8 +543,9 @@ INLINE BOOL gdi_EqualRgn(const HGDI_RGN hSrcRgn1, const HGDI_RGN hSrcRgn2)
}
/**
* Copy coordinates from a rectangle to another rectangle
* @msdn{dd183481}
* @brief Copy coordinates from a rectangle to another rectangle
* msdn{dd183481}
*
* @param dst destination rectangle
* @param src source rectangle
* @return nonzero if successful, 0 otherwise
@ -558,8 +564,8 @@ INLINE BOOL gdi_CopyRect(HGDI_RECT dst, const HGDI_RECT src)
}
/**
* Check if a point is inside a rectangle.\n
* @msdn{dd162882}
* Check if a point is inside a rectangle.
* msdn{dd162882}
* @param rc rectangle
* @param x point x position
* @param y point y position
@ -584,8 +590,8 @@ INLINE BOOL gdi_PtInRect(const HGDI_RECT rc, INT32 x, INT32 y)
}
/**
* Invalidate a given region, such that it is redrawn on the next region update.\n
* @msdn{dd145003}
* Invalidate a given region, such that it is redrawn on the next region update.
* msdn{dd145003}
* @param hdc device context
* @param x x1
* @param y y1

View File

@ -97,12 +97,14 @@ static void Ellipse_Bresenham(HGDI_DC hdc, int x1, int y1, int x2, int y2)
/**
* Draw an ellipse
* @msdn{dd162510}
* msdn{dd162510}
*
* @param hdc device context
* @param nLeftRect x1
* @param nTopRect y1
* @param nRightRect x2
* @param nBottomRect y2
*
* @return nonzero if successful, 0 otherwise
*/
BOOL gdi_Ellipse(HGDI_DC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect)
@ -112,11 +114,13 @@ BOOL gdi_Ellipse(HGDI_DC hdc, int nLeftRect, int nTopRect, int nRightRect, int n
}
/**
* Fill a rectangle with the given brush.\n
* @msdn{dd162719}
* Fill a rectangle with the given brush.
* msdn{dd162719}
*
* @param hdc device context
* @param rect rectangle
* @param hbr brush
*
* @return nonzero if successful, 0 otherwise
*/
@ -212,7 +216,7 @@ BOOL gdi_FillRect(HGDI_DC hdc, const HGDI_RECT rect, HGDI_BRUSH hbr)
/**
* Draw a polygon
* @msdn{dd162814}
* msdn{dd162814}
* @param hdc device context
* @param lpPoints array of points
* @param nCount number of points
@ -226,7 +230,7 @@ BOOL gdi_Polygon(HGDI_DC hdc, GDI_POINT* lpPoints, int nCount)
/**
* Draw a series of closed polygons
* @msdn{dd162818}
* msdn{dd162818}
* @param hdc device context
* @param lpPoints array of series of points
* @param lpPolyCounts array of number of points in each series

View File

@ -53,14 +53,16 @@ extern UwacErrorHandler uwacErrorHandler;
typedef struct uwac_task UwacTask;
/** @brief */
/** @brief task struct
*/
struct uwac_task
{
void (*run)(UwacTask* task, uint32_t events);
struct wl_list link;
};
/** @brief a global registry object */
/** @brief a global registry object
*/
struct uwac_global
{
uint32_t name;
@ -73,14 +75,16 @@ typedef struct uwac_global UwacGlobal;
struct uwac_event_list_item;
typedef struct uwac_event_list_item UwacEventListItem;
/** @brief */
/** @brief double linked list element
*/
struct uwac_event_list_item
{
UwacEvent event;
UwacEventListItem *tail, *head;
};
/** @brief main connection object to a wayland display */
/** @brief main connection object to a wayland display
*/
struct uwac_display
{
struct wl_list globals;

View File

@ -356,7 +356,7 @@ int UwacWindowShmAllocBuffers(UwacWindow* w, int nbuffers, int allocSize, uint32
#else
region16_init(&buffer->damage);
#endif
buffer->data = &data[allocSize * i];
buffer->data = &((char*)data)[allocSize * i];
buffer->size = allocSize;
buffer->wayland_buffer =
wl_shm_pool_create_buffer(pool, allocSize * i, width, height, w->stride, format);

View File

@ -351,8 +351,8 @@ extern "C"
* The function does string conversions of any input string of len characters.
* Any character in the buffer (incuding any '\0') is converted.
*
* \param str A WCHAR string of \b len character length
* \param len The (buffer) length in characters of \b str
* \param wstr A WCHAR string of \b len character length
* \param wlen The (buffer) length in characters of \b str
* \param pSize Ignored if NULL, otherwise receives the length of the result string in
* characters (including any '\0' character)
*
@ -365,7 +365,6 @@ extern "C"
* The function does string conversions of any '\0' terminated input string
*
* \param str A '\0' terminated CHAR string, may be NULL
* \param len The (buffer) length in characters of \b str
* \param pSize Ignored if NULL, otherwise receives the length of the result string in
* characters (wcslen)
*

View File

@ -54,7 +54,6 @@ typedef struct
CK_ULONG keyCertIdLen;
} NCryptP11KeyHandle;
/** @brief */
typedef struct
{
CK_SLOT_ID slotId;
@ -65,7 +64,6 @@ typedef struct
CK_BYTE id[64];
} NCryptKeyEnum;
/** @brief */
typedef struct
{
CK_ULONG nslots;