Lines Matching defs:len
82 lws_buf(uint8_t **p, void *s, uint32_t len)
84 lws_p32(*p, len);
86 memcpy((char *)(*p), s, len);
87 *p += len;
117 uint32_t len = (uint32_t)lws_ptr_diff(*p, start);
121 len -= 4;
123 if ((len + padc) & (uint32_t)(keys->padding_alignment - 1))
125 ((len + padc) & (uint32_t)(keys->padding_alignment - 1))));
128 len += padc;
138 len += 4;
140 lws_p32(start, len - 4);
144 offer(struct per_session_data__sshd *pss, uint8_t *p, uint32_t len, int first,
147 uint8_t *op = p, *lp, *end = p + len - 1;
182 p += 5; /* msg len + padding */
276 len = (uint32_t)lws_ptr_diff(p, op);
279 *payload_len = (int)(len - 5);
283 if (((int)len + padc) & 7)
284 padc += 8 - (((int)len + padc) & 7);
287 len += (uint32_t)padc;
292 /* recorded length does not include the uint32_t len itself */
293 lws_p32(op, len - 4);
295 return len;
304 int n = 0, len;
312 len = (int)get_gen_server_key_25519(pss, keybuf, (int)sizeof(keybuf));
313 if (!len)
315 if (ed25519_key_parse(keybuf, (unsigned int)len,
530 lws_ssh_parse_plaintext(struct per_session_data__sshd *pss, uint8_t *p, size_t len)
543 while (len --) {
590 lwsl_info("msg len %d\n", pss->msg_len);
839 pss->len = (pss->len << 8) | *p++;
849 if (pss->len == 0)
855 if (pss->msg_len - pss->pos < pss->len) {
857 pss->msg_len, pss->pos, pss->len);
881 if (!--pss->len) {
896 pss->len = (pss->len << 8) | *p++;
909 if (pss->len != 32) {
910 lwsl_notice("wrong key len\n");
925 lwsl_debug("skip done pos %d, msg_len %d len=%ld, \n",
926 pss->pos, pss->msg_len, (long)len);
962 pss->len = (pss->len << 8) | *p++;
975 if (pss->npos != pss->len)
984 pss->len = (pss->len << 8) | *p++;
988 pss->last_alloc = sshd_zalloc(pss->len + 1);
999 if (pss->npos >= pss->len)
1002 if (pss->npos != pss->len)
1243 e[LWS_GENCRYPTO_RSA_KEYEL_E].len = m;
1247 e[LWS_GENCRYPTO_RSA_KEYEL_N].len = m;
1297 ctx.ctx->MBEDTLS_PRIVATE(len) = m;
1334 pss->len = (pss->len << 8) | *p++;
1346 pss->disconnect_reason = pss->len;
1387 pss->ch_temp->sender_ch = pss->len;
1391 lwsl_info("Initial window set to %d\n", pss->len);
1392 pss->ch_temp->window = (int32_t)pss->len;
1396 pss->ch_temp->max_pkt = pss->len;
1418 pss->ch_recip = pss->len;
1507 pss->args.pty.width_ch = pss->len;
1511 pss->args.pty.height_ch = pss->len;
1515 pss->args.pty.width_px = pss->len;
1519 pss->args.pty.height_px = pss->len;
1650 pss->args.pty.width_ch = pss->len;
1654 pss->args.pty.height_ch = pss->len;
1658 pss->args.pty.width_px = pss->len;
1662 pss->args.pty.height_px = pss->len;
1678 pss->ch_recip = pss->len;
1722 scp->len = (uint64_t)atoll((const char *)pp);
1724 (unsigned long long)scp->len);
1736 if (scp->len >= pss->npos)
1737 scp->len -= pss->npos;
1739 scp->len = 0;
1740 if (!scp->len) {
1768 pss->ch_recip = pss->len;
1775 ch->window += (int32_t)pss->len;
1777 pss->len, ch->window);
1903 parse(struct per_session_data__sshd *pss, uint8_t *p, size_t len)
1905 while (len--) {
1925 len++;
1926 cp = (uint32_t)len;
1945 len -= cp;
2008 void *user, void *in, size_t len)
2148 if (parse(pss, in, len))
2538 * sink on a particular sink. The sink index affected is in len
2545 wsi, (int)len & 1);
2546 lws_rx_flow_control(wsi, len & 1);
2564 ch->spawn_pid = (uint32_t)len; /* child process PID */
2565 lwsl_notice("associated PID %d to ch %d\n", (int)len,
2578 * we have the child PID in len... we need to match it to a
2584 if (ch->spawn_pid == len) {
2586 (int)len);