Lines Matching refs:val

85 extract_uint(const char *valstr, uint_t *val)
94 *val = (uint_t)ul;
1515 const char *key, boolean_t val, char *dstr, size_t dstrlen)
1523 new_val.ddlv_bval = &val;
1529 val ? "true" : "false");
1536 uint64_t val, char *dstr, size_t dstrlen)
1540 unsigned long long ulval = val;
1550 snprintf(dstr, dstrlen, "%s,%s=%"PRIu64, dstr, key, val);
2398 dlmgr_DLValue_t val;
2416 bzero(&val, sizeof (val));
2417 val.ddlv_type = DDLVT_BOOLEAN;
2418 val.ddlv_bval = &b_true;
2420 &val, &old_val);
2444 solaris_flowinfo2flowmap(const char *key, dlmgr_DLValue_t *val, void *arg)
2452 err = flow_str2mac(val->ddlv_sval, f->dl_dst, 6);
2454 err = flow_str2mac(val->ddlv_sval, f->dl_src, 6);
2458 err = flow_str2addr(val->ddlv_sval, &fa, &af);
2479 f->nw_proto = (uint8_t)*val->ddlv_ulval;
2481 f->tp_src = htons((uint16_t)*val->ddlv_ulval);
2483 f->tp_dst = htons((uint16_t)*val->ddlv_ulval);
2485 f->nw_tos = (uint8_t)*val->ddlv_ulval;
2487 f->in_port.odp_port = (odp_port_t)*val->ddlv_ulval;
2490 err = flow_str2mac(val->ddlv_sval, f->arp_tha, 6);
2493 err = flow_str2mac(val->ddlv_sval, f->arp_sha, 6);
2495 f->nw_proto = (uint8_t)*val->ddlv_ulval;
2497 f->dl_type = htons((uint16_t)*val->ddlv_ulval);
2499 f->nw_ttl = (uint8_t)*val->ddlv_ulval;
2501 f->vlan_tci = htons((uint16_t)*val->ddlv_ulval);
2503 f->tp_src = htons((uint16_t)*val->ddlv_ulval);
2505 f->tp_dst = htons((uint16_t)*val->ddlv_ulval);
2507 err = flow_str2addr(val->ddlv_sval, &fa, &af);
2512 f->tcp_flags = htons((uint16_t)*val->ddlv_ulval);
2514 f->tunnel.tun_id = htonll((uint64_t)*val->ddlv_ulval);
2517 err = flow_str2addr(val->ddlv_sval, &fa, &af);
2526 f->tunnel.ip_tos = (uint8_t)*val->ddlv_ulval;
2528 f->tunnel.ip_ttl = (uint8_t)*val->ddlv_ulval;
2530 f->tunnel.flags = (uint16_t)*val->ddlv_ulval;
2535 dlmgr_DLValue_free(val);
3133 flow_propstr2outports(char *key, char *val, uint32_t outports[], int *valcntp)
3142 dpif_log(0, "flow_propstr2vals key %s val %s", key, val);
3143 len = strlen(val);
3148 ofp_min = ofp_max = val;
3150 for (i = 0, j = 0, curr = val; i < len && j < maxcnt; i++) {
3152 c = val[i];
3158 val[i] = '\0';
3162 curr = val + i + 1;
3176 curr = val + i + 1;
3188 flow_propstr2vals(char *key, char *val, char ***propvalsp, int *valcntp)
3194 dpif_log(0, "flow_propstr2vals key %s val %s", key, val);
3195 len = strlen(val);
3198 for (i = 0, j = 0, curr = val; i < len && j < maxcnt; i++) {
3199 if ((c = val[i]) != FP_ACTION_MULTI_VAL_DELIM &&
3204 val[i] = '\0';
3212 curr = val + i + 1;
3329 solaris_flowinfo2actionmap(const char *key, dlmgr_DLValue_t *val,
3336 switch (val->ddlv_type) {
3338 if (val->ddlv_sval == NULL)
3340 if (strlen(val->ddlv_sval) == 0)
3343 if (strlcpy(propval, val->ddlv_sval, sizeof (propval)) >=
3348 if (val->ddlv_slist_count == 0)
3350 valcnt = val->ddlv_slist_count;
3351 if (valcnt != 1 || strlen(val->ddlv_slist[0]) == 0)
3353 if (strlcpy(propval, val->ddlv_slist[0], sizeof (propval)) >=
3358 if (val->ddlv_ulval == NULL || *val->ddlv_ulval == 0)
3362 *val->ddlv_ulval);
3381 dlmgr_DLValue_free(val);
3580 kstat2_nv_t val;
3582 stat = kstat2_map_get(map, name, &val);
3589 if (val->type != KSTAT2_NVVT_INT) {
3594 return (val->kstat2_integer);
3913 kstat2_nv_t val;
3934 stat = kstat2_map_get(map, "core_id", &val);
3944 if (val->type != KSTAT2_NVVT_INT) {
3952 coreid = val->kstat2_integer;