Lines Matching defs:handle

104 i_dladm_vnic_create_sys(dladm_handle_t handle, dladm_vnic_attr_t *attr)
129 rc = ioctl(dladm_dld_fd(handle), VNIC_IOC_CREATE, &ioc);
157 i_dladm_vnic_info_active(dladm_handle_t handle, datalink_id_t linkid,
169 rc = ioctl(dladm_dld_fd(handle), VNIC_IOC_INFO, &ioc);
192 i_dladm_vnic_info_persist(dladm_handle_t handle, datalink_id_t linkid,
203 if ((status = dladm_getsnap_conf(handle, linkid, &conf)) !=
207 status = dladm_get_conf_field(handle, conf, FLINKOVER, linkover,
216 if ((status = dladm_name2info(handle, linkover,
221 if ((status = dladm_datalink_id2info(handle, linkid, NULL, &class,
233 status = dladm_get_conf_field(handle, conf, FMADDRTYPE, &u64,
240 if ((status = dladm_get_conf_field(handle, conf, FVRID,
247 if ((status = dladm_get_conf_field(handle, conf, FVRAF,
254 status = dladm_get_conf_field(handle, conf, FMADDRLEN, &u64,
259 status = dladm_get_conf_field(handle, conf, FMADDRSLOT, &u64,
264 status = dladm_get_conf_field(handle, conf, FMADDRPREFIXLEN,
269 status = dladm_get_conf_field(handle, conf, FMACADDR, macstr,
279 status = dladm_get_conf_field(handle, conf, FVLANID, &u64,
285 dladm_destroy_conf(handle, conf);
290 dladm_vnic_info(dladm_handle_t handle, datalink_id_t linkid,
294 return (i_dladm_vnic_info_active(handle, linkid, attrp));
296 return (i_dladm_vnic_info_persist(handle, linkid, attrp));
305 i_dladm_vnic_delete_sys(dladm_handle_t handle, datalink_id_t linkid)
313 rc = ioctl(dladm_dld_fd(handle), VNIC_IOC_DELETE, &ioc);
398 dladm_vnic_create(dladm_handle_t handle, const char *vnic, datalink_id_t linkid,
433 if ((status = dladm_datalink_id2info(handle, linkid, NULL,
501 if ((status = dladm_create_datalink_id(handle, name, class,
514 status = dladm_link_proplist_extract(handle, proplist,
536 status = i_dladm_vnic_create_sys(handle, &attr);
545 status = dladm_vnic_persist_conf(handle, name, &attr, class);
554 status = dladm_set_linkprop(handle, vnic_id,
565 (void) dladm_remove_conf(handle, vnic_id);
567 (void) i_dladm_vnic_delete_sys(handle, vnic_id);
568 (void) dladm_destroy_datalink_id(handle, vnic_id, flags);
579 stat2 = dladm_bridge_refresh(handle, linkid);
590 dladm_vnic_delete(dladm_handle_t handle, datalink_id_t linkid, uint32_t flags)
598 if ((dladm_datalink_id2info(handle, linkid, NULL, &class, NULL, NULL, 0)
612 status = i_dladm_vnic_delete_sys(handle, linkid);
614 (void) dladm_set_linkprop(handle, linkid, NULL, NULL, 0,
616 (void) dladm_destroy_datalink_id(handle, linkid,
624 (void) dladm_remove_conf(handle, linkid);
625 (void) dladm_destroy_datalink_id(handle, linkid,
628 return (dladm_bridge_refresh(handle, linkid));
663 dladm_vnic_persist_conf(dladm_handle_t handle, const char *name,
672 if ((status = dladm_create_conf(handle, name, attrp->va_vnic_id,
677 status = dladm_datalink_id2info(handle, attrp->va_link_id, NULL,
681 status = dladm_set_conf_field(handle, conf, FLINKOVER,
689 status = dladm_set_conf_field(handle, conf, FMADDRTYPE,
695 status = dladm_set_conf_field(handle, conf, FVRID,
701 status = dladm_set_conf_field(handle, conf, FVRAF,
708 status = dladm_set_conf_field(handle, conf, FMADDRLEN,
716 status = dladm_set_conf_field(handle, conf,
725 status = dladm_set_conf_field(handle, conf,
732 status = dladm_set_conf_field(handle, conf, FMACADDR,
740 status = dladm_set_conf_field(handle, conf, FVLANID,
749 status = dladm_write_conf(handle, conf);
752 dladm_destroy_conf(handle, conf);
762 i_dladm_vnic_up(dladm_handle_t handle, datalink_id_t linkid, void *arg)
771 status = dladm_vnic_info(handle, linkid, &attr, DLADM_OPT_PERSIST);
776 status = dladm_link_get_proplist(handle, linkid, &proplist);
781 status = dladm_link_proplist_extract(handle, proplist,
785 status = i_dladm_vnic_create_sys(handle, &attr);
787 status = dladm_up_datalink_id(handle, linkid);
789 (void) i_dladm_vnic_delete_sys(handle, linkid);
798 dladm_vnic_up(dladm_handle_t handle, datalink_id_t linkid, uint32_t flags)
807 (void) dladm_walk_datalink_id(i_dladm_vnic_up, handle,
812 (void) i_dladm_vnic_up(handle, linkid, &vnic_arg);