• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ out_uint16_le函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中out_uint16_le函数的典型用法代码示例。如果您正苦于以下问题:C++ out_uint16_le函数的具体用法?C++ out_uint16_le怎么用?C++ out_uint16_le使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了out_uint16_le函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: rdp_send_client_window_status

/* Send a client window information PDU */
BOOL
rdp_send_client_window_status(RDPCLIENT * This, int status)
{
	STREAM s;

	if (This->rdp.current_status == status)
		return True;

	s = rdp_init_data(This, 12);

	if(s == NULL)
		return False;

	out_uint32_le(s, status);

	switch (status)
	{
		case 0:	/* shut the server up */
			break;

		case 1:	/* receive data again */
			out_uint32_le(s, 0);	/* unknown */
			out_uint16_le(s, This->width);
			out_uint16_le(s, This->height);
			break;
	}

	s_mark_end(s);
	This->rdp.current_status = status;
	return rdp_send_data(This, s, RDP_DATA_PDU_CLIENT_WINDOW_STATUS);
}
开发者ID:hoangduit,项目名称:reactos,代码行数:32,代码来源:rdp.c


示例2: rdp_out_brushcache_caps

/* Output brush cache capability set */
static void
rdp_out_brushcache_caps(STREAM s)
{
    out_uint16_le(s, RDP_CAPSET_BRUSHCACHE);
    out_uint16_le(s, RDP_CAPLEN_BRUSHCACHE);
    out_uint32_le(s, 1);	/* cache type */
}
开发者ID:z0x010,项目名称:rdesktop,代码行数:8,代码来源:rdp.c


示例3: xrdp_orders_send_window_cached_icon

/* flags can contain WINDOW_ORDER_STATE_NEW and/or
   WINDOW_ORDER_FIELD_ICON_BIG */
int
xrdp_orders_send_window_cached_icon(struct xrdp_orders *self,
                                    int window_id, int cache_entry,
                                    int cache_id, int flags)
{
    int order_size;
    int order_flags;
    int field_present_flags;

    order_size = 14;
    if (xrdp_orders_check(self, order_size) != 0)
    {
        return 1;
    }
    self->order_count++;
    order_flags = RDP_ORDER_SECONDARY;
    order_flags |= 0xb << 2; /* type TS_ALTSEC_WINDOW */
    out_uint8(self->out_s, order_flags);
    /* orderSize (2 bytes) */
    out_uint16_le(self->out_s, order_size);
    /* FieldsPresentFlags (4 bytes) */
    field_present_flags = flags | WINDOW_ORDER_TYPE_WINDOW |
                          WINDOW_ORDER_CACHED_ICON;
    out_uint32_le(self->out_s, field_present_flags);
    /* windowId (4 bytes) */
    out_uint32_le(self->out_s, window_id);
    /* CacheEntry (2 bytes) */
    out_uint16_le(self->out_s, cache_entry);
    /* CacheId (1 byte) */
    out_uint8(self->out_s, cache_id);
    return 0;
}
开发者ID:cocoon,项目名称:xrdp,代码行数:34,代码来源:xrdp_orders_rail.c


示例4: xrdp_orders_send_as_unicode

/* returns error */
static int
xrdp_orders_send_as_unicode(struct stream *s, const char *text)
{
    int str_chars;
    int index;
    int i32;
    int len;
    twchar *wdst;

    len = g_strlen(text) + 1;

    wdst = (twchar *) g_malloc(sizeof(twchar) * len, 1);
    if (wdst == 0)
    {
        return 1;
    }
    str_chars = g_mbstowcs(wdst, text, len);
    if (str_chars > 0)
    {
        i32 = str_chars * 2;
        out_uint16_le(s, i32);
        for (index = 0; index < str_chars; index++)
        {
            i32 = wdst[index];
            out_uint16_le(s, i32);
        }
    }
    else
    {
        out_uint16_le(s, 0);
    }
    g_free(wdst);
    return 0;
}
开发者ID:cocoon,项目名称:xrdp,代码行数:35,代码来源:xrdp_orders_rail.c


示例5: licence_send_platform_challenge_response

/* Send a platform challenge response packet */
static void
licence_send_platform_challenge_response(uint8 * token, uint8 * crypt_hwid, uint8 * signature)
{
	uint32 sec_flags = SEC_LICENSE_PKT;
	uint16 length = 58;
	STREAM s;

	s = sec_init(sec_flags, length + 2);

	out_uint8(s, LICENCE_TAG_PLATFORM_CHALLENGE_RESPONSE);
	out_uint8(s, ((g_rdp_version >= RDP_V5) ? 3 : 2));	/* version */
	out_uint16_le(s, length);

	out_uint16_le(s, 1);
	out_uint16_le(s, LICENCE_TOKEN_SIZE);
	out_uint8p(s, token, LICENCE_TOKEN_SIZE);

	out_uint16_le(s, 1);
	out_uint16_le(s, LICENCE_HWID_SIZE);
	out_uint8p(s, crypt_hwid, LICENCE_HWID_SIZE);

	out_uint8p(s, signature, LICENCE_SIGNATURE_SIZE);

	s_mark_end(s);
	sec_send(s, sec_flags);
}
开发者ID:gsomlo,项目名称:rdesktop,代码行数:27,代码来源:licence.c


示例6: rdp_send_client_window_status

/* Send a client window information PDU */
void
rdp_send_client_window_status(int status)
{
    STREAM s;
    static int current_status = 1;

    if (current_status == status)
        return;

    s = rdp_init_data(12);

    out_uint32_le(s, status);

    switch (status)
    {
    case 0:	/* shut the server up */
        break;

    case 1:	/* receive data again */
        out_uint32_le(s, 0);	/* unknown */
        out_uint16_le(s, g_width);
        out_uint16_le(s, g_height);
        break;
    }

    s_mark_end(s);
    rdp_send_data(s, RDP_DATA_PDU_CLIENT_WINDOW_STATUS);
    current_status = status;
}
开发者ID:z0x010,项目名称:rdesktop,代码行数:30,代码来源:rdp.c


示例7: xrdp_emt_send_request

bool APP_CC
xrdp_emt_send_request(struct xrdp_rdp* self, struct xrdp_emt* emt, int type)
{
  struct stream* s;

  if (emt == NULL)
  {
    printf("emt is null\n");
    return false;
  }

  make_stream(s);
  init_stream(s, 40);
  xrdp_sec_init(self->sec_layer, s);

  out_uint8(s, SEC_AUTODETECT_REQ_LENGTH);               // headerLength
  out_uint8(s, TYPE_ID_AUTODETECT_REQUEST);              // headerTypeId
  out_uint16_le(s, emt->seq_number++);                   // sequenceNumber
  out_uint16_le(s, type);                                // responseType
  s_mark_end(s);

  xrdp_emt_send_packet(self, emt, s);
  free_stream(s);

  return true;
}
开发者ID:harpyham,项目名称:openulteo,代码行数:26,代码来源:xrdp_emt.c


示例8: sound_send_training

static int
sound_send_training(void)
{
    struct stream *s;
    int bytes;
    int time;
    char *size_ptr;

    print_got_here();

    make_stream(s);
    init_stream(s, 8182);
    out_uint16_le(s, SNDC_TRAINING);
    size_ptr = s->p;
    out_uint16_le(s, 0); /* size, set later */
    time = g_time2();
    g_training_sent_time = time;
    out_uint16_le(s, time);
    out_uint16_le(s, 1024);
    out_uint8s(s, (1024 - 4));
    s_mark_end(s);
    bytes = (int)((s->end - s->data) - 4);
    size_ptr[0] = bytes;
    size_ptr[1] = bytes >> 8;
    bytes = (int)(s->end - s->data);
    send_channel_data(g_rdpsnd_chan_id, s->data, bytes);
    free_stream(s);
    return 0;
}
开发者ID:OSgenie,项目名称:xrdp,代码行数:29,代码来源:sound.c


示例9: licence_send_authresp

/* Send an authentication response packet */
static void
licence_send_authresp(uint8 * token, uint8 * crypt_hwid, uint8 * signature)
{
	uint32 sec_flags = SEC_LICENCE_NEG;
	uint16 length = 58;
	STREAM s;

	s = sec_init(sec_flags, length + 2);

	out_uint8(s, LICENCE_TAG_AUTHRESP);
	out_uint8(s, 2);	/* version */
	out_uint16_le(s, length);

	out_uint16_le(s, 1);
	out_uint16_le(s, LICENCE_TOKEN_SIZE);
	out_uint8p(s, token, LICENCE_TOKEN_SIZE);

	out_uint16_le(s, 1);
	out_uint16_le(s, LICENCE_HWID_SIZE);
	out_uint8p(s, crypt_hwid, LICENCE_HWID_SIZE);

	out_uint8p(s, signature, LICENCE_SIGNATURE_SIZE);

	s_mark_end(s);
	sec_send(s, sec_flags);
}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:27,代码来源:licence.c


示例10: cliprdr_send_capability

void cliprdr_send_capability()
{
	/* this message is ignored by rdp applet */
	struct stream* s;

	make_stream(s);
	init_stream(s,1024);

	log_message(l_config, LOG_LEVEL_DEBUG, "vchannel_cliprdr[cliprdr_send_capability]:");
	/* clip header */
	out_uint16_le(s, CB_CLIP_CAPS);                        /* msg type */
	out_uint16_le(s, 0x00);                                /* msg flag */
	out_uint32_le(s, 0);                                   /* msg size */
	/* we only support one capability for now */
	out_uint16_le(s, 1);                                   /* cCapabilitiesSets */
	out_uint8s(s, 16);                                     /* pad */
	/* CLIPRDR_CAPS_SET */
	out_uint16_le(s, CB_CAPSTYPE_GENERAL);                 /* capabilitySetType */
	out_uint16_le(s, 92);                                  /* lengthCapability */
	out_uint32_le(s, CB_CAPS_VERSION_1);                   /* version */
	out_uint32_le(s, 0);                                   /* general flags */


	s_mark_end(s);
	cliprdr_send(s);
	free_stream(s);

}
开发者ID:Oyatsumi,项目名称:ulteo4Kode4kids,代码行数:28,代码来源:main.c


示例11: cliprdr_send_data

void cliprdr_send_data(int request_type)
{
	struct stream* s;
	int clipboard_size = clipboard_get_current_clipboard_data_size(&clipboard, format_utf8_string_atom);
	char* clipboard_data = (char*)clipboard_get_current_clipboard_data(&clipboard, format_utf8_string_atom);

	int uni_clipboard_len = (clipboard_size+1)*2;
	int packet_len = uni_clipboard_len + 12;
	char* temp;

	make_stream(s);
	init_stream(s,packet_len);

	log_message(l_config, LOG_LEVEL_DEBUG, "vchannel_cliprdr[cliprdr_send_data]:");
	/* clip header */
	out_uint16_le(s, CB_FORMAT_DATA_RESPONSE);             /* msg type */
	out_uint16_le(s, 0);                                   /* msg flag */
	out_uint32_le(s, uni_clipboard_len);                   /* msg size */
	temp = s->p;
	uni_rdp_out_str(s, clipboard_data, uni_clipboard_len);


	s_mark_end(s);
	cliprdr_send(s);
	free_stream(s);

}
开发者ID:Oyatsumi,项目名称:ulteo4Kode4kids,代码行数:27,代码来源:main.c


示例12: clipboard_request_file_size

/* ask the client to send the file size */
int
clipboard_request_file_size(int stream_id, int lindex)
{
    struct stream *s;
    int size;
    int rv;

    log_debug("clipboard_request_file_size:");
    if (g_file_request_sent_type != 0)
    {
        log_error("clipboard_request_file_size: warning, still waiting "
                   "for CB_FILECONTENTS_RESPONSE");
    }
    make_stream(s);
    init_stream(s, 8192);
    out_uint16_le(s, CB_FILECONTENTS_REQUEST); /* 8 */
    out_uint16_le(s, 0);
    out_uint32_le(s, 28);
    out_uint32_le(s, stream_id);
    out_uint32_le(s, lindex);
    out_uint32_le(s, CB_FILECONTENTS_SIZE);
    out_uint32_le(s, 0); /* nPositionLow */
    out_uint32_le(s, 0); /* nPositionHigh */
    out_uint32_le(s, 0); /* cbRequested */
    out_uint32_le(s, 0); /* clipDataId */
    out_uint32_le(s, 0);
    s_mark_end(s);
    size = (int)(s->end - s->data);
    rv = send_channel_data(g_cliprdr_chan_id, s->data, size);
    free_stream(s);
    g_file_request_sent_type = CB_FILECONTENTS_SIZE;
    return rv;
}
开发者ID:PKRoma,项目名称:xrdp,代码行数:34,代码来源:clipboard_file.c


示例13: rdp_send_client_execute_pdu

void
rdp_send_client_execute_pdu(rdpRdp * rdp)
{
    STREAM s;
    size_t application_name_len, working_directory_len, arguments_len;
    char * application_name, * working_directory, * arguments;

    /* Still lacking proper packet initialization */
    s = NULL;
    rdp_out_rail_pdu_header(s, RDP_RAIL_ORDER_EXEC, 12);

    application_name = xstrdup_out_unistr(rdp,
                                          rdp->app->application_name, &application_name_len);
    working_directory = xstrdup_out_unistr(rdp,
                                           rdp->app->working_directory, &working_directory_len);
    arguments = xstrdup_out_unistr(rdp,
                                   rdp->app->arguments, &arguments_len);

    out_uint16_le(s,
                  RAIL_EXEC_FLAG_EXPAND_WORKINGDIRECTORY |
                  RAIL_EXEC_FLAG_EXPAND_ARGUMENTS); // flags
    out_uint16_le(s, application_name_len); // ExeOrFileLength
    out_uint16_le(s, working_directory_len); // WorkingDirLength
    out_uint16_le(s, arguments_len); // ArgumentsLength
    out_uint8a(s, application_name, application_name_len + 2); // ExeOrFile
    out_uint8a(s, working_directory, working_directory_len + 2); // WorkingDir
    out_uint8a(s, arguments, arguments_len + 2); // Arguments

    xfree(application_name);
    xfree(working_directory);
    xfree(arguments);

    s_mark_end(s);
    sec_send(rdp->sec, s, rdp->settings->encryption ? SEC_ENCRYPT : 0);
}
开发者ID:nidelius,项目名称:FreeRDP,代码行数:35,代码来源:rail.c


示例14: rdp_out_glyphcache_capset

void rdp_out_glyphcache_capset(STREAM s)
{
	capsetHeaderRef header;

	header = rdp_skip_capset_header(s);
	/*
		glyphCache (40 bytes):
		An array of 10 cache definition structures
		Maximum number of cache entries: 254
		Maximum size of a cache element: 2048
	 */
	rdp_out_cache_definition(s, 0x00FE, 0x0004);
	rdp_out_cache_definition(s, 0x00FE, 0x0004);
	rdp_out_cache_definition(s, 0x00FE, 0x0008);
	rdp_out_cache_definition(s, 0x00FE, 0x0008);
	rdp_out_cache_definition(s, 0x00FE, 0x0010);
	rdp_out_cache_definition(s, 0x00FE, 0x0020);
	rdp_out_cache_definition(s, 0x00FE, 0x0040);
	rdp_out_cache_definition(s, 0x00FE, 0x0080);
	rdp_out_cache_definition(s, 0x00FE, 0x0100);
	rdp_out_cache_definition(s, 0x0040, 0x0800);

	/*
		fragCache (4 bytes):
		Fragment cache data (one cache definition structure)
		Maximum number of cache entries: 256
		Maximum size of a cache element: 256
	*/
	rdp_out_cache_definition(s, 0x0040, 0x0800); /* fragCache */

	out_uint16_le(s, GLYPH_SUPPORT_FULL); /* glyphSupportLevel */
	out_uint16_le(s, 0); /* pad */
	rdp_out_capset_header(s, header, CAPSET_TYPE_GLYPHCACHE);
}
开发者ID:roman-b,项目名称:FreeRDP,代码行数:34,代码来源:capabilities.c


示例15: dev_redir_process_close_io_request

int APP_CC
dev_redir_process_close_io_request(int completion_id)
{
	struct stream* s;

	log_message(&log_conf, LOG_LEVEL_DEBUG, "chansrv[dev_redir_process_close_io_request]:"
	  		"close file : %s",actions[completion_id].path);
	make_stream(s);
	init_stream(s,1100);
	actions[completion_id].last_req = IRP_MJ_CLOSE;
	out_uint16_le(s, RDPDR_CTYP_CORE);
	out_uint16_le(s, PAKID_CORE_DEVICE_IOREQUEST);
	out_uint32_le(s, actions[completion_id].device);
	out_uint32_le(s, actions[completion_id].file_id);
	out_uint32_le(s, completion_id);
	out_uint32_le(s, IRP_MJ_CLOSE);   	/* major version */
	out_uint32_le(s, 0);								/* minor version */
	out_uint8s(s,32);
	s_mark_end(s);
	dev_redir_send(s);
	actions[completion_id].message_id++;
	free_stream(s);
	return 0;
	free_stream(s);
}
开发者ID:Oyatsumi,项目名称:ulteo4Kode4kids,代码行数:25,代码来源:devredir.c


示例16: licence_send_authresp

/* Send an authentication response packet */
static BOOL
licence_send_authresp(RDPCLIENT * This, uint8 * token, uint8 * crypt_hwid, uint8 * signature)
{
	uint32 sec_flags = SEC_LICENCE_NEG;
	uint16 length = 58;
	STREAM s;

	s = sec_init(This, sec_flags, length + 2);

	if(s == NULL)
		return False;

	out_uint8(s, LICENCE_TAG_AUTHRESP);
	out_uint8(s, 2);	/* version */
	out_uint16_le(s, length);

	out_uint16_le(s, 1);
	out_uint16_le(s, LICENCE_TOKEN_SIZE);
	out_uint8p(s, token, LICENCE_TOKEN_SIZE);

	out_uint16_le(s, 1);
	out_uint16_le(s, LICENCE_HWID_SIZE);
	out_uint8p(s, crypt_hwid, LICENCE_HWID_SIZE);

	out_uint8p(s, signature, LICENCE_SIGNATURE_SIZE);

	s_mark_end(s);
	return sec_send(This, s, sec_flags);
}
开发者ID:hoangduit,项目名称:reactos,代码行数:30,代码来源:licence.c


示例17: xrdp_emt_send_result

bool APP_CC
xrdp_emt_send_result(struct xrdp_rdp* self, struct xrdp_emt* emt)
{
  struct stream* s;

  if (emt == NULL)
  {
    printf("emt is null\n");
    return false;
  }

  make_stream(s);
  init_stream(s, 40);
  xrdp_sec_init(self->sec_layer, s);

  out_uint8(s, SEC_AUTODETECT_REQ_LENGTH);               // headerLength
  out_uint8(s, TYPE_ID_AUTODETECT_REQUEST);              // headerTypeId
  out_uint16_le(s, emt->seq_number++);                   // sequenceNumber
  out_uint16_le(s, field_all);                           // responseType

  out_uint32_le(s, self->session->base_RTT);
  out_uint32_le(s, self->session->bandwidth);
  out_uint32_le(s, self->session->average_RTT);

  s_mark_end(s);

  xrdp_emt_send_packet(self, emt, s);
  free_stream(s);

  return true;
}
开发者ID:harpyham,项目名称:openulteo,代码行数:31,代码来源:xrdp_emt.c


示例18: rdp_out_unknown_caps

/* Output unknown capability sets */
static void rdp_out_unknown_caps(STREAM s, uint16 id, uint16 length,
		uint8 * caps) {
	out_uint16_le(s, id);
	out_uint16_le(s, length);

	out_uint8p(s, caps, length - 4);
}
开发者ID:Watchet,项目名称:openssl-android,代码行数:8,代码来源:rdp.c


示例19: rdp_out_bitmap_caps

/* Output bitmap capability set */
static void rdp_out_bitmap_caps(STREAM s) {
	out_uint16_le(s, RDP_CAPSET_BITMAP);
	out_uint16_le(s, RDP_CAPLEN_BITMAP);

	out_uint16_le(s, g_server_depth);
	/* Preferred colour depth */
	out_uint16_le(s, 1);
	/* Receive 1 BPP */
	out_uint16_le(s, 1);
	/* Receive 4 BPP */
	out_uint16_le(s, 1);
	/* Receive 8 BPP */
	out_uint16_le(s, 800);
	/* Desktop width */
	out_uint16_le(s, 600);
	/* Desktop height */
	out_uint16(s, 0);
	/* Pad */
	out_uint16(s, 1);
	/* Allow resize */
	out_uint16_le(s, g_bitmap_compression ? 1 : 0);
	/* Support compression */
	out_uint16(s, 0);
	/* Unknown */
	out_uint16_le(s, 1);
	/* Unknown */
	out_uint16(s, 0);
	/* Pad */
}
开发者ID:Watchet,项目名称:openssl-android,代码行数:30,代码来源:rdp.c


示例20: rdpup_send_msg

static int
rdpup_send_msg(struct stream* s)
{
  int len;
  int rv;

  rv = 1;
  if (s != 0)
  {
    len = s->end - s->data;
    if (len > s->size)
    {
      rdpLog("overrun error len %d count %d\n", len, g_count);
    }
    s_pop_layer(s, iso_hdr);
    out_uint16_le(s, 1);
    out_uint16_le(s, g_count);
    out_uint32_le(s, len - 8);
    rv = rdpup_send(s->data, len);
  }
  if (rv != 0)
  {
    rdpLog("error in rdpup_send_msg\n");
  }
  return rv;
}
开发者ID:kevinzhou2012,项目名称:xrdp,代码行数:26,代码来源:rdpup.c



注:本文中的out_uint16_le函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ out_uint32_le函数代码示例发布时间:2022-05-30
下一篇:
C++ out_of_range函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap