Lines Matching refs:policy

205 	if (!h->policy || !(h->policy->flags & LWSSSPOLF_PERF) || !h->wsi ||
495 lws_ss_metadata_t *md = lws_ss_policy_metadata(h->policy, name),
537 !!(h->policy->flags & LWSSSPOLF_WAKE_SUSPEND__VALIDITY)],
557 ms = lws_retry_get_delay_ms(h->context, h->policy->retry_bo,
685 if (!h->policy) {
686 lwsl_err("%s: ss with no policy\n", __func__);
702 if (h->policy == &pol_smd) {
734 if (lws_strexp_expand(&exp, h->policy->endpoint,
735 strlen(h->policy->endpoint),
744 * some policy settings by what he provided in there. For example,
746 * might be quite convenient to override the policy to follow the info
750 _port = port = h->policy->port;
767 tls = !!(h->policy->flags & LWSSSPOLF_TLS);
777 if (!h->policy->trust.store)
782 h->policy->trust.store->name);
784 lwsl_err("%s: missing vh for policy %s\n",
786 h->policy->trust.store->name);
793 if (h->policy->flags & LWSSSPOLF_WAKE_SUSPEND__VALIDITY)
796 /* translate policy attributes to IP ToS flags */
798 if (h->policy->flags & LWSSSPOLF_ATTR_LOW_LATENCY)
800 if (h->policy->flags & LWSSSPOLF_ATTR_HIGH_THROUGHPUT)
802 if (h->policy->flags & LWSSSPOLF_ATTR_HIGH_RELIABILITY)
804 if (h->policy->flags & LWSSSPOLF_ATTR_LOW_COST)
806 if (h->policy->flags & LWSSSPOLF_PERF) /* collect conmon stats on this */
809 /* mark the connection with the streamtype priority from the policy */
811 i.priority = h->policy->priority;
827 i.retry_and_idle_policy = h->policy->retry_bo;
828 i.sys_tls_client_cert = h->policy->client_cert;
831 /* if this is not "", munge should use it instead of policy
835 ssp = ss_pcols[(int)h->policy->protocol];
847 i.method = h->policy->u.http.method;
863 if (h->policy->plugins[0] && h->policy->plugins[0]->munge)
864 h->policy->plugins[0]->munge(h, path, h->context->max_http_header_data);
875 if (h->policy->streamtype)
877 h->policy->streamtype);
960 pol = ssi->policy;
970 * the policy
1000 * confirm the policy agrees that this streamtype should be
1006 * but the policy does not agree the streamtype should
1009 lwsl_err("%s: %s policy does not allow local sink\n",
1029 * 4) as many metadata pointer structs as the policy tells
1072 h->policy = pol;
1170 if (h->policy->flags & LWSSSPOLF_SERVER) {
1177 if (h->policy->endpoint &&
1178 h->policy->endpoint[0] == '!') {
1187 &h->policy->endpoint[1]);
1190 &h->policy->endpoint[1]);
1204 i.iface = h->policy->endpoint;
1205 i.vhost_name = h->policy->streamtype;
1206 i.port = h->policy->port;
1213 if (!ss_pcols[h->policy->protocol] ||
1219 *ppp++ = ss_pcols[h->policy->protocol]->protocol;
1221 if (h->policy->u.http.u.ws.subprotocol)
1232 if (h->policy->flags & LWSSSPOLF_TLS) {
1235 h->policy->trust.server.cert->ca_der;
1237 h->policy->trust.server.cert->ca_der_len;
1239 h->policy->trust.server.key->ca_der;
1241 h->policy->trust.server.key->ca_der_len;
1269 h->policy->streamtype);
1278 * For static policy case, dynamically ref / instantiate the related
1287 if (!lws_ss_policy_ref_trust_store(context, h->policy, 1 /* do the ref */) ||
1295 !lws_ss_policy_ref_trust_store(context, h->policy, 1 /* do the ref */)) {
1321 ((h->policy->flags & LWSSSPOLF_NAILED_UP)
1323 || ((h->policy == &pol_smd) //&&
1409 if (h->policy == &pol_smd) {
1432 * self-defined h->policy radioactive
1436 if (h->policy && (h->policy->flags & LWSSSPOLF_SERVER))
1437 v = lws_get_vhost_by_name(h->context, h->policy->streamtype);
1493 * For static policy case, dynamically ref / instantiate the related
1502 if (h->policy)
1503 lws_ss_policy_unref_trust_store(h->context, h->policy);
1507 lws_ss_policy_unref_trust_store(h->context, h->policy);
1514 * For server, the policy describes a vhost that implements the
1592 if (!h->policy) {
1594 lwsl_err("%s: null policy\n", __func__);
1598 if (h->policy->flags & LWSSSPOLF_SERVER)
1606 if (h->policy == &pol_smd) {
1652 if (h->wsi && h->policy &&
1653 (h->policy->protocol == LWSSSP_H1 ||
1654 h->policy->protocol == LWSSSP_H2 ||
1655 h->policy->protocol == LWSSSP_WS))
1706 return h->policy->streamtype;
1718 ssp = ss_pcols[(int)h->policy->protocol];
1733 ssp = ss_pcols[(int)h->policy->protocol];
1768 if (!timeout_ms && !h->policy->timeout_ms)
1772 (timeout_ms ? timeout_ms : h->policy->timeout_ms) *