Lines Matching refs:attrp

159 i_dladm_aggr_iocp2grpattr(void **ptr, dladm_aggr_grp_attr_t *attrp)
168 attrp->lg_linkid = grp->lg_linkid;
169 attrp->lg_key = grp->lg_key;
170 attrp->lg_nports = grp->lg_nports;
171 attrp->lg_policy = grp->lg_policy;
172 attrp->lg_lacp_mode = grp->lg_lacp_mode;
173 attrp->lg_lacp_timer = grp->lg_lacp_timer;
174 attrp->lg_force = grp->lg_force;
176 bcopy(grp->lg_mac, attrp->lg_mac, ETHERADDRL);
177 attrp->lg_mac_fixed = grp->lg_mac_fixed;
179 if ((attrp->lg_ports = malloc(grp->lg_nports *
193 attrp->lg_ports[i].lp_linkid = port->lp_linkid;
194 bcopy(port->lp_mac, attrp->lg_ports[i].lp_mac, ETHERADDRL);
195 attrp->lg_ports[i].lp_state = port->lp_state;
196 attrp->lg_ports[i].lp_lacp_state = port->lp_lacp_state;
208 * Caller must free attrp->la_ports.
212 dladm_aggr_grp_attr_t *attrp)
251 if (i_dladm_aggr_iocp2grpattr(&where, attrp) != 0) {
263 * Caller must free attrp->la_ports.
267 dladm_aggr_grp_attr_t *attrp)
277 attrp->lg_linkid = linkid;
285 attrp->lg_key = (uint16_t)u64;
291 attrp->lg_policy = (uint32_t)u64;
294 &attrp->lg_mac_fixed, sizeof (boolean_t));
298 if (attrp->lg_mac_fixed) {
305 if (!dladm_aggr_str2macaddr(macstr, &fixed, attrp->lg_mac)) {
311 status = dladm_get_conf_field(handle, conf, FFORCE, &attrp->lg_force,
320 attrp->lg_lacp_mode = (aggr_lacp_mode_t)u64;
326 attrp->lg_lacp_timer = (aggr_lacp_timer_t)u64;
333 attrp->lg_nports = nports;
345 if ((attrp->lg_ports = malloc(nports *
353 &attrp->lg_ports[i].lp_linkid)) != DLADM_STATUS_OK)
354 free(attrp->lg_ports);
365 dladm_aggr_grp_attr_t *attrp, uint32_t flags)
369 return (i_dladm_aggr_info_active(handle, linkid, attrp));
371 return (i_dladm_aggr_info_persist(handle, linkid, attrp));
1179 uint32_t mask, dladm_aggr_modify_attr_t *attrp)
1190 attrp->ld_policy = (uint32_t)u64;
1195 &attrp->ld_mac_fixed, sizeof (boolean_t));
1199 if (attrp->ld_mac_fixed) {
1208 attrp->ld_mac)) {
1219 attrp->ld_lacp_mode = (aggr_lacp_mode_t)u64;
1227 attrp->ld_lacp_timer = (aggr_lacp_timer_t)u64;
1235 uint32_t mask, dladm_aggr_modify_attr_t *attrp)
1242 u64 = attrp->ld_policy;
1251 DLADM_TYPE_BOOLEAN, &attrp->ld_mac_fixed);
1255 if (attrp->ld_mac_fixed) {
1256 (void) dladm_aggr_macaddr2str(attrp->ld_mac, macstr);
1265 u64 = attrp->ld_lacp_mode;
1273 u64 = attrp->ld_lacp_timer;