Lines Matching refs:pdp

88 typedef dladm_status_t	pd_getf_t(dladm_handle_t, prop_desc_t *pdp,
121 typedef dladm_status_t pd_checkf_t(dladm_handle_t, prop_desc_t *pdp,
976 check_prop(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
985 for (i = 0; i < pdp->pd_noptval; i++) {
987 pdp->pd_optval[i].vd_name) == 0) {
991 if (i == pdp->pd_noptval)
994 (void) memcpy(&vdp[j], &pdp->pd_optval[i], sizeof (val_desc_t));
1001 datalink_class_t class, uint32_t media, prop_desc_t *pdp, char **prop_val,
1009 if (!(pdp->pd_class & class))
1012 if (!DATALINK_MEDIA_ACCEPTED(pdp->pd_dmedia, media))
1015 if ((flags & DLADM_OPT_PERSIST) && (pdp->pd_flags & PD_TEMPONLY))
1032 if ((flags & DLADM_OPT_EFFECTIVE) && !(pdp->pd_flags & PD_CANSET_EFF))
1038 if ((pdp->pd_flags & PD_CANSET_EFF) && (flags & DLADM_OPT_ACTIVE))
1041 if (pdp->pd_set == NULL)
1049 if (pdp->pd_check != NULL) {
1050 needfree = ((pdp->pd_flags & PD_CHECK_ALLOC) != 0);
1051 status = pdp->pd_check(handle, pdp, linkid, prop_val,
1053 } else if (pdp->pd_optval != NULL) {
1054 status = check_prop(handle, pdp, linkid, prop_val,
1067 if (pdp->pd_defval.vd_name == NULL)
1071 defval = (strlen(pdp->pd_defval.vd_name) > 0);
1072 if ((pdp->pd_flags & PD_CHECK_ALLOC) != 0 || defval) {
1077 (void) memcpy(vdp, &pdp->pd_defval,
1079 } else if (pdp->pd_check != NULL) {
1081 status = pdp->pd_check(handle, pdp, linkid,
1086 } else if ((pdp->pd_flags & PD_RESET) != 0) {
1091 status = i_dladm_getset_defval(handle, pdp, linkid,
1097 if (pdp->pd_flags & PD_AFTER_PERM) {
1101 status = pdp->pd_set(handle, pdp, linkid, vdp, cnt,
1130 prop_desc_t *pdp = &prop_table[i];
1134 (strcasecmp(prop_name, pdp->pd_name) != 0))
1137 s = i_dladm_set_single_prop(handle, linkid, class, media, pdp,
1187 prop_desc_t *pdp;
1189 pdp = i_dladm_get_prop_desc(prop_name);
1194 if (pdp != NULL && pdp->pd_flags & PD_DONT_PERSIST)
1201 if (pdp != NULL && (pdp->pd_flags & PD_AFTER_PERM)) {
1202 status = pdp->pd_set(handle, pdp, linkid, NULL,
1320 prop_desc_t *pdp;
1355 pdp = &prop_table[i];
1362 if (!(pdp->pd_class & class))
1365 if (!DATALINK_MEDIA_ACCEPTED(pdp->pd_dmedia, media))
1370 status = pdp->pd_get(handle, pdp, linkid, prop_val, val_cntp,
1375 if (pdp->pd_set == NULL || (pdp->pd_flags & PD_CANSET_EFF)) {
1378 status = pdp->pd_get(handle, pdp, linkid, prop_val,
1396 if (pdp->pd_defval.vd_name == NULL) {
1401 if (strlen(pdp->pd_defval.vd_name) == 0) {
1402 status = pdp->pd_get(handle, pdp, linkid, prop_val,
1405 (void) strcpy(*prop_val, pdp->pd_defval.vd_name);
1411 if (pdp->pd_getmod != NULL) {
1412 status = pdp->pd_getmod(handle, pdp, linkid, prop_val,
1416 cnt = pdp->pd_noptval;
1424 pdp->pd_optval[i].vd_name);
1430 if (pdp->pd_flags & PD_TEMPONLY) {
1432 } else if (pdp->pd_flags & PD_DONT_PERSIST) {
1433 status = pdp->pd_get(handle, pdp, linkid, prop_val,
1461 prop_desc_t *pdp;
1471 for (pdp = prop_table; pdp < prop_table + DLADM_MAX_PROPS; pdp++)
1472 if (strcasecmp(prop_name, pdp->pd_name) == 0)
1475 if (pdp == prop_table + DLADM_MAX_PROPS)
1478 if (pdp->pd_flags & PD_CHECK_ALLOC)
1486 if (!(pdp->pd_class & class))
1489 if (!DATALINK_MEDIA_ACCEPTED(pdp->pd_dmedia, media))
1504 status = pdp->pd_get(handle, pdp, linkid, prop_val, val_cntp,
1516 if (pdp->pd_defval.vd_name == NULL) {
1521 if (pdp->pd_defval.vd_name[0] != '\0') {
1523 *ret_val = pdp->pd_defval.vd_val;
1527 status = pdp->pd_get(handle, pdp, linkid, prop_val, val_cntp,
1532 if (pdp->pd_flags & PD_TEMPONLY)
1545 if (pdp->pd_check != NULL) {
1552 status = pdp->pd_check(handle, pdp, linkid,
1561 for (i = 0; i < pdp->pd_noptval; i++) {
1562 if (strcmp(pdp->pd_optval[i].vd_name,
1565 pdp->pd_optval[i].vd_val;
1569 if (i == pdp->pd_noptval) {
1674 get_zone(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
1685 status = i_dladm_get_public_prop(handle, linkid, pdp->pd_name, flags,
1812 set_zone(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
1824 status = i_dladm_get_public_prop(handle, linkid, pdp->pd_name, flags,
1841 if ((status = set_public_prop(handle, pdp, linkid, vdp, val_cnt,
1869 check_zone(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
1922 get_cos(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
1961 check_cos(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
1989 get_maxbw(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
2013 check_maxbw(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
2062 check_pfcmap(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
2199 get_etsbw(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
2213 if (strncmp(pdp->pd_name, "etsbw-lcl",
2224 if (strncmp(pdp->pd_name, "etsbw-lcl-effective",
2226 strncmp(pdp->pd_name, "etsbw-lcl",
2230 } else if (strncmp(pdp->pd_name, "etsbw-lcl-advice",
2234 } else if (strncmp(pdp->pd_name, "etsbw-rmt-effective",
2253 check_etsbw(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
2319 get_cpus(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
2328 if (strcmp(pdp->pd_name, "cpus-effective") == 0) {
2373 check_cpus(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
2498 get_rxfanout(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
2506 if (strcmp(pdp->pd_name, "rxfanout-effective") == 0) {
2534 check_rxfanout(dladm_handle_t handle, prop_desc_t *pdp,
2574 get_pool(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
2581 if (strcmp(pdp->pd_name, "pool-effective") == 0) {
2606 check_pool(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
2682 get_priority(dladm_handle_t handle, prop_desc_t *pdp,
2746 check_rings(dladm_handle_t handle, prop_desc_t *pdp,
2769 get_rings_range(dladm_handle_t handle, prop_desc_t *pdp,
2781 if ((dip = i_dladm_buf_alloc_by_name(sz, linkid, pdp->pd_name, flags,
2824 get_rxrings(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
2835 if (strcmp(pdp->pd_name, "rxrings-effective") == 0) {
2890 get_txrings(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
2902 if (strcmp(pdp->pd_name, "txrings-effective") == 0) {
2960 get_cntavail(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
2967 return (get_uint32(handle, pdp, linkid, prop_val, val_cnt, media,
2973 set_resource(dladm_handle_t handle, prop_desc_t *pdp,
2992 if (strcmp(pdp->pd_name, rp->rp_name) != 0)
3014 get_protection(dladm_handle_t handle, prop_desc_t *pdp,
3061 get_link_lro_setting(dladm_handle_t handle, prop_desc_t *pdp,
3073 i_dladm_optval2str(pdp, lro_setting, prop_val);
3082 get_link_lro_effective(dladm_handle_t handle, prop_desc_t *pdp,
3094 i_dladm_optval2str(pdp, lro, prop_val);
3103 set_link_lro(dladm_handle_t handle, prop_desc_t *pdp,
3107 return (set_public_prop(handle, pdp, linkid, vdp, val_cnt,
3113 check_mac_addr(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
3161 set_mac_addr(dladm_handle_t handle, prop_desc_t *pdp,
3165 return (set_public_prop(handle, pdp, linkid, vdp, val_cnt,
3171 get_mac_addr(dladm_handle_t handle, prop_desc_t *pdp,
3206 set_nwam(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
3219 get_nwam(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
3227 if (i_dladm_get_linkprop_db(handle, linkid, pdp->pd_name, prop_val,
3233 (void) strlcpy(*prop_val, pdp->pd_defval.vd_name,
3244 get_allowedips(dladm_handle_t handle, prop_desc_t *pdp,
3351 check_allowedips(dladm_handle_t handle, prop_desc_t *pdp,
3636 get_allowedcids(dladm_handle_t handle, prop_desc_t *pdp,
3689 check_allowedcids(dladm_handle_t handle, prop_desc_t *pdp,
3725 get_autopush(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
3736 status = i_dladm_get_public_prop(handle, linkid, pdp->pd_name, flags,
3804 check_autopush(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
3846 get_rate_common(dladm_handle_t handle, prop_desc_t *pdp,
3888 get_rate(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
3893 return (get_speed(handle, pdp, linkid, prop_val,
3897 return (get_rate_common(handle, pdp, linkid, prop_val, val_cnt,
3903 get_rate_mod(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
3916 return (get_rate_common(handle, pdp, linkid, prop_val,
3952 set_rate(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
3977 check_rate(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
4035 get_channel(dladm_handle_t handle, prop_desc_t *pdp,
4060 get_powermode(dladm_handle_t handle, prop_desc_t *pdp,
4095 set_powermode(dladm_handle_t handle, prop_desc_t *pdp,
4126 get_radio(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
4158 set_radio(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
4183 check_hoplimit(dladm_handle_t handle, prop_desc_t *pdp,
4206 check_encaplim(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
4415 set_public_prop(dladm_handle_t handle, prop_desc_t *pdp,
4426 dip = i_dladm_buf_alloc_by_name(0, linkid, pdp->pd_name, 0, &status);
4430 if (pdp->pd_flags & PD_CHECK_ALLOC)
4509 check_uint32(dladm_handle_t handle, prop_desc_t *pdp,
4524 get_duplex(dladm_handle_t handle, prop_desc_t *pdp,
4552 get_speed(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
4577 get_link_state(dladm_handle_t handle, prop_desc_t *pdp,
4606 get_binary(dladm_handle_t handle, prop_desc_t *pdp,
4613 status = i_dladm_get_public_prop(handle, linkid, pdp->pd_name, flags,
4625 get_pfcmap(dladm_handle_t handle, prop_desc_t *pdp,
4637 if (strncmp(pdp->pd_name, "pfcmap-lcl-effective",
4638 strlen(pdp->pd_name)) != 0 &&
4639 strncmp(pdp->pd_name, "pfcmap",
4640 strlen(pdp->pd_name)) != 0)
4643 if (strcmp(pdp->pd_name, "pfcmap-lcl-effective") == 0)
4645 else if (strcmp(pdp->pd_name, "pfcmap") == 0)
4672 get_pfcmap_rmt(dladm_handle_t handle, prop_desc_t *pdp,
4703 get_pfcmap_range(dladm_handle_t handle, prop_desc_t *pdp,
4716 get_uint8(dladm_handle_t handle, prop_desc_t *pdp,
4723 status = i_dladm_get_public_prop(handle, linkid, pdp->pd_name, flags,
4735 get_uint32(dladm_handle_t handle, prop_desc_t *pdp,
4742 status = i_dladm_get_public_prop(handle, linkid, pdp->pd_name, flags,
4754 get_range(dladm_handle_t handle, prop_desc_t *pdp,
4773 if ((dip = i_dladm_buf_alloc_by_name(sz, linkid, pdp->pd_name, flags,
4833 get_tagmode(dladm_handle_t handle, prop_desc_t *pdp,
4840 status = i_dladm_get_public_prop(handle, linkid, pdp->pd_name, flags,
4861 get_flowctl(dladm_handle_t handle, prop_desc_t *pdp,
4868 status = i_dladm_get_public_prop(handle, linkid, pdp->pd_name, flags,
4935 check_vsimgrid(dladm_handle_t handle, prop_desc_t *pdp,
4995 get_vsimgrenc(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
5002 if (strcmp(pdp->pd_name, "vsi-mgrid-enc-effective") == 0) {
5027 get_vsimgrid(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
5034 if (strcmp(pdp->pd_name, "vsi-mgrid-effective") == 0) {
5058 get_vsitypeid(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
5065 if (strcmp(pdp->pd_name, "vsi-typeid-effective") == 0) {
5089 get_vsiversion(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
5096 if (strcmp(pdp->pd_name, "vsi-vers-effective") == 0) {
5255 i_dladm_getset_defval(dladm_handle_t handle, prop_desc_t *pdp,
5281 * For properties which have pdp->pd_defval.vd_name as a non-empty
5284 * libdladm can copy pdp->pd_defval over to the val_desc_t passed
5290 status = pdp->pd_get(handle, pdp, linkid, prop_vals, &cnt, media,
5295 pdp->pd_class, media, pdp, prop_vals, cnt, flags);
5728 prop_desc_t *pdp = &prop_table[i];
5735 if (strcasecmp(aip->ai_name, pdp->pd_name) != 0)
5742 if (pdp->pd_check != NULL) {
5743 status = pdp->pd_check(handle, pdp, 0, aip->ai_val,
5902 get_linkmode_prop(dladm_handle_t handle, prop_desc_t *pdp,
5910 status = i_dladm_get_public_prop(handle, linkid, pdp->pd_name, flags,
5935 prop_desc_t *pdp;
5938 pdp = prop_table;
5939 for (i = 0; i < DLADM_MAX_PROPS; i++, pdp++) {
5940 if (strcasecmp(pname, pdp->pd_name) == 0)
5941 return (pdp);