Lines Matching defs:attr
129 dladm_flow_parse_db(char *line, dld_flowinfo_t *attr)
136 bzero(attr, sizeof (*attr));
142 if (strlcpy(attr->fi_flowname, token, MAXFLOWNAMELEN) >= MAXFLOWNAMELEN)
156 if ((attr->fi_linkid =
162 attr->fi_resource_props.mrp_mask |=
164 attr->fi_resource_props.mrp_maxbw =
168 attr->fi_resource_props.mrp_mask |= MRP_PRIORITY;
170 &attr->fi_resource_props.mrp_priority);
176 &attr->fi_flow_desc);
182 &attr->fi_flow_desc);
188 &attr->fi_flow_desc);
193 attr->fi_flow_desc.fd_mask |= FLOW_IP_PROTOCOL;
194 attr->fi_flow_desc.fd_protocol =
198 attr->fi_flow_desc.fd_mask |= FLOW_ULP_PORT_LOCAL;
199 attr->fi_flow_desc.fd_local_port =
201 attr->fi_flow_desc.fd_local_port =
202 htons(attr->fi_flow_desc.fd_local_port);
204 attr->fi_flow_desc.fd_mask |= FLOW_ULP_PORT_REMOTE;
205 attr->fi_flow_desc.fd_remote_port =
207 attr->fi_flow_desc.fd_remote_port =
208 htons(attr->fi_flow_desc.fd_remote_port);
213 if (attr->fi_linkid != DATALINK_INVALID_LINKID)
227 i_dladm_flow_fput_grp(FILE *fp, dld_flowinfo_t *attr)
231 attr->fi_flowname, attr->fi_linkid));
234 if (attr->fi_resource_props.mrp_mask & MRP_MAXBW)
236 attr->fi_resource_props.mrp_maxbw));
238 if (attr->fi_resource_props.mrp_mask & MRP_PRIORITY)
240 attr->fi_resource_props.mrp_priority));
243 if (attr->fi_flow_desc.fd_mask & FLOW_IP_DSFIELD)
245 attr->fi_flow_desc.fd_dsfield,
246 attr->fi_flow_desc.fd_dsfield_mask));
248 if (attr->fi_flow_desc.fd_mask & FLOW_IP_LOCAL) {
253 if (attr->fi_flow_desc.fd_ipversion != 6) {
255 attr->fi_flow_desc.
262 &attr->fi_flow_desc.fd_local_addr,
269 &attr->fi_flow_desc.fd_local_netmask, prefix_max,
275 if (attr->fi_flow_desc.fd_mask & FLOW_IP_REMOTE) {
280 if (attr->fi_flow_desc.fd_ipversion != 6) {
282 attr->fi_flow_desc.
289 &(attr->fi_flow_desc.fd_remote_addr),
296 &attr->fi_flow_desc.fd_remote_netmask, prefix_max,
302 if (attr->fi_flow_desc.fd_mask & FLOW_IP_PROTOCOL)
304 attr->fi_flow_desc.fd_protocol));
306 if (attr->fi_flow_desc.fd_mask & FLOW_ULP_PORT_LOCAL)
308 ntohs(attr->fi_flow_desc.fd_local_port)));
310 if (attr->fi_flow_desc.fd_mask & FLOW_ULP_PORT_REMOTE)
312 ntohs(attr->fi_flow_desc.fd_remote_port)));
328 dld_flowinfo_t attr;
379 if ((status = dladm_flow_parse_db(line, &attr)) !=
383 fn_rc = fn(arg, &attr);
394 if (i_dladm_flow_fput_grp(nfp, &attr) != 0)
445 dld_flowinfo_t *attr = &state->rs_newattr;
447 if ((strcmp(grp->fi_flowname, attr->fi_flowname)) != 0)
484 i_dladm_flow_create_db(dld_flowinfo_t *attr, const char *root)
524 if (strcmp(holder, attr->fi_flowname) == 0) {
535 if (i_dladm_flow_fput_grp(fp, attr) != 0)
548 dld_ioc_addflow_t attr;
551 bzero(&attr, sizeof (attr));
552 bcopy(flowdesc, &attr.af_flow_desc, sizeof (flow_desc_t));
554 bcopy(mrp, &attr.af_resource_props,
558 (void) strlcpy(attr.af_name, flowname, sizeof (attr.af_name));
559 attr.af_linkid = linkid;
561 if (ioctl(dladm_dld_fd(handle), DLDIOC_ADDFLOW, &attr) < 0)
570 dld_ioc_removeflow_t attr;
573 (void) strlcpy(attr.rf_name, flowname,
574 sizeof (attr.rf_name));
576 if (ioctl(dladm_dld_fd(handle), DLDIOC_REMOVEFLOW, &attr) < 0)
709 dladm_flow_attr_t attr;
713 attr.fa_linkid = state->gs_linkid;
714 bcopy(grp->fi_flowname, &attr.fa_flowname,
715 sizeof (attr.fa_flowname));
716 bcopy(&grp->fi_flow_desc, &attr.fa_flow_desc,
717 sizeof (attr.fa_flow_desc));
718 bcopy(&grp->fi_resource_props, &attr.fa_resource_props,
719 sizeof (attr.fa_resource_props));
720 (void) state->gs_fn(handle, &attr, state->gs_arg);
738 dladm_flow_attr_t attr;
781 bzero(&attr, sizeof (attr));
783 attr.fa_linkid = flow->fi_linkid;
784 bcopy(&flow->fi_flowname, &attr.fa_flowname,
785 sizeof (attr.fa_flowname));
786 bcopy(&flow->fi_flow_desc, &attr.fa_flow_desc,
787 sizeof (attr.fa_flow_desc));
788 bcopy(&flow->fi_resource_props, &attr.fa_resource_props,
789 sizeof (attr.fa_resource_props));
791 if (fn(handle, &attr, arg) == DLADM_WALK_TERMINATE)
809 dld_flowinfo_t attr;
822 s = dladm_flow_parse_db(line, &attr);
828 bcopy(&attr.fi_flow_desc, &flowdesc, sizeof (flow_desc_t));
829 (void) strlcpy(name, attr.fi_flowname,
830 sizeof (attr.fi_flowname));
831 linkid = attr.fi_linkid;