Lines Matching refs:ctx

307 lws_ss_policy_parser_cb(struct lejp_ctx *ctx, char reason)
309 struct policy_cb_args *a = (struct policy_cb_args *)ctx->user;
324 // lwsl_debug("%s: %d %d %s\n", __func__, reason, ctx->path_match - 1,
325 // ctx->path);
327 switch (ctx->path_match - 1) {
354 (ctx->path_match - 1 == LSSPPT_PLUGINS ||
355 ctx->path_match - 1 == LSSPPT_METADATA ||
356 ctx->path_match - 1 == LSSPPT_HTTPRESPMAP))
366 ctx->path_match - 1 == LSSPPT_TRUST_STORES_STACK && !a->count) {
429 ctx->path + ctx->st[ctx->sp].p,
430 (unsigned int)(ctx->path_match_len -
431 ctx->st[ctx->sp].p))) {
472 if (!(reason & LEJP_FLAG_CB_IS_VALUE) || !ctx->path_match)
475 switch (ctx->path_match - 1) {
507 [b->retry_ms_table_count++] = (uint32_t)atoi(ctx->buf);
511 a->curr[LTY_BACKOFF].b->r.conceal_count = (uint16_t)atoi(ctx->buf);
515 a->curr[LTY_BACKOFF].b->r.jitter_percent = (uint8_t)atoi(ctx->buf);
519 a->curr[LTY_BACKOFF].b->r.secs_since_valid_ping = (uint16_t)atoi(ctx->buf);
523 a->curr[LTY_BACKOFF].b->r.secs_since_valid_hangup = (uint16_t)atoi(ctx->buf);
527 if (a->count + ctx->npos >= MAX_CERT_TEMP) {
531 inl = ctx->npos;
534 lws_b64_decode_stateful(&a->b64, ctx->buf, &inl,
538 if (inl != ctx->npos) {
560 ctx->npos, ctx->buf);
563 if (!strncmp(x->vhost_name, ctx->buf, ctx->npos)) {
571 lws_strnncpy(dotstar, ctx->buf, ctx->npos, sizeof(dotstar));
585 a->curr[LTY_METRICS].m->us_schedule = (uint64_t)atoll(ctx->buf);
589 a->curr[LTY_METRICS].m->us_decay_unit = (uint32_t)atol(ctx->buf);
593 a->curr[LTY_METRICS].m->min_contributors = (uint8_t)atoi(ctx->buf);
609 if (!strncmp(x->vhost_name, ctx->buf, ctx->npos) &&
610 !x->vhost_name[ctx->npos]) {
611 if ((ctx->path_match - 1) == LSSPPT_SERVER_CERT)
623 ctx->path_match - 1, x);
647 lws_strnncpy(dotstar, ctx->buf, ctx->npos, sizeof(dotstar));
660 a->curr[LTY_POLICY].p->port = (uint16_t)atoi(ctx->buf);
664 a->curr[LTY_POLICY].p->proxy_buflen = (uint32_t)atol(ctx->buf);
669 (uint32_t)atol(ctx->buf);
673 (uint32_t)atol(ctx->buf);
677 a->curr[LTY_POLICY].p->client_buflen = (uint32_t)atol(ctx->buf);
682 (uint32_t)atol(ctx->buf);
686 (uint32_t)atol(ctx->buf);
717 if (!strncmp((*pin)->name, ctx->buf, ctx->npos)) {
735 a->curr[LTY_POLICY].p->client_cert = (uint8_t)(atoi(ctx->buf) + 1);
739 a->curr[LTY_AUTH].a->blob_index = (uint8_t)atoi(ctx->buf);
742 a->curr[LTY_POLICY].p->u.http.resp_expect = (uint16_t)atoi(ctx->buf);
746 a->curr[LTY_POLICY].p->timeout_ms = (uint32_t)atoi(ctx->buf);
750 a->curr[LTY_POLICY].p->priority = (uint8_t)atoi(ctx->buf);
835 if (!strncmp(ctx->buf, bot->name, ctx->npos)) {
849 if (!strncmp(ctx->buf, ts->name, ctx->npos)) {
855 lws_strnncpy(dotstar, ctx->buf, ctx->npos, sizeof(dotstar));
866 lws_ss_policy_find_auth_by_name(a, ctx->buf, ctx->npos);
868 lws_strnncpy(dotstar, ctx->buf, ctx->npos, sizeof(dotstar));
878 sizeof(lws_ss_metadata_t) + ctx->npos +
879 (unsigned int)(ctx->path_match_len - ctx->st[ctx->sp - 2].p + 1) + 2,
886 memcpy(q, ctx->path + ctx->st[ctx->sp - 2].p + 1,
887 (unsigned int)(ctx->path_match_len - ctx->st[ctx->sp - 2].p));
889 q += ctx->path_match_len - ctx->st[ctx->sp - 2].p;
891 memcpy(q, ctx->buf, ctx->npos);
900 lws_http_string_to_known_header(ctx->buf, ctx->npos);
906 a->curr[LTY_POLICY].p->metadata->value_length = ctx->npos;
917 atoi(ctx->path + ctx->st[ctx->sp - 2].p + 1);
918 a->respmap[a->count].state = (uint16_t)atoi(ctx->buf);
928 (ctx->path_match - 1) - LSSPPT_HTTP_AUTH_HEADER];
1022 a->curr[LTY_POLICY].p->u.mqtt.qos = (uint8_t)atoi(ctx->buf);
1031 a->curr[LTY_POLICY].p->u.mqtt.keep_alive = (uint16_t)atoi(ctx->buf);
1047 a->curr[LTY_POLICY].p->u.mqtt.will_qos = (uint8_t)atoi(ctx->buf);
1062 a->curr[LTY_POLICY].p->u.mqtt.birth_qos = (uint8_t)atoi(ctx->buf);
1084 if (strlen(protonames[n]) == ctx->npos &&
1085 !strncmp(ctx->buf, protonames[n], ctx->npos))
1090 lws_strnncpy(dotstar, ctx->buf, ctx->npos, sizeof(dotstar));
1105 extant = lwsac_scan_extant(a->ac, (uint8_t *)ctx->buf, (size_t)ctx->npos, 1);
1111 *pp = lwsac_use_backfill(&a->ac, (size_t)(ctx->npos + 1), POL_AC_GRAIN);
1114 memcpy(*pp, ctx->buf, ctx->npos);
1115 (*pp)[ctx->npos] = '\0';
1120 n = ctx->st[ctx->sp].p;
1121 *pp = lwsac_use_backfill(&a->ac, (size_t)ctx->path_match_len + (size_t)1 - (size_t)n,
1125 memcpy(*pp, ctx->path + n, ctx->path_match_len - (unsigned int)n);
1126 (*pp)[ctx->path_match_len - n] = '\0';