您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ sshpkt_start函数代码示例

51自学网 2021-06-03 08:19:32
  C++
这篇教程C++ sshpkt_start函数代码示例写得很实用,希望能帮到您。

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

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

示例1: drain_output

/* * Wait until all buffered output has been sent to the client. * This is used when the program terminates. */static voiddrain_output(struct ssh *ssh){	int r;	/* Send any buffered stdout data to the client. */	if (sshbuf_len(stdout_buffer) > 0) {		if ((r = sshpkt_start(ssh, SSH_SMSG_STDOUT_DATA)) != 0 ||		    (r = sshpkt_put_string(ssh, sshbuf_ptr(stdout_buffer),		    sshbuf_len(stdout_buffer))) != 0 ||		    (r = sshpkt_send(ssh)) != 0)			fatal("%s: %s", __func__, ssh_err(r));		/* Update the count of sent bytes. */		stdout_bytes += sshbuf_len(stdout_buffer);	}	/* Send any buffered stderr data to the client. */	if (sshbuf_len(stderr_buffer) > 0) {		if ((r = sshpkt_start(ssh, SSH_SMSG_STDERR_DATA)) != 0 ||		    (r = sshpkt_put_string(ssh, sshbuf_ptr(stderr_buffer),		    sshbuf_len(stderr_buffer))) != 0 ||		    (r = sshpkt_send(ssh)) != 0)		/* Update the count of sent bytes. */		stderr_bytes += sshbuf_len(stderr_buffer);	}	/* Wait until all buffered data has been written to the client. */	ssh_packet_write_wait(ssh);}
开发者ID:cafeinecake,项目名称:libopenssh,代码行数:31,


示例2: server_input_channel_open

static intserver_input_channel_open(int type, u_int32_t seq, struct ssh *ssh){	Channel *c = NULL;	char *ctype = 0;	int r;	u_int rchan, rmaxpack, rwindow;	size_t len;	if ((r = sshpkt_get_cstring(ssh, &ctype, &len)) != 0 ||	    (r = sshpkt_get_u32(ssh, &rchan)) != 0 ||	    (r = sshpkt_get_u32(ssh, &rwindow)) != 0 ||	    (r = sshpkt_get_u32(ssh, &rmaxpack)) != 0)		goto out;	debug("server_input_channel_open: ctype %s rchan %d win %d max %d",	    ctype, rchan, rwindow, rmaxpack);	if (strcmp(ctype, "session") == 0) {		c = server_request_session(ssh);	} else if (strcmp(ctype, "direct-tcpip") == 0) {		c = server_request_direct_tcpip(ssh);	} else if (strcmp(ctype, "[email
C++ ssize_t函数代码示例
C++ sshpkt_send函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。