Lines Matching defs:handle

120 write_port(dladm_handle_t handle, char *portstr, datalink_id_t portid,
126 if ((status = dladm_datalink_id2info(handle, portid, NULL, NULL, NULL,
136 read_port(dladm_handle_t handle, char **portstr, datalink_id_t *portid)
144 status = dladm_name2info(handle, pname, portid, NULL, NULL, NULL);
149 i_dladm_aggr_ioctl(dladm_handle_t handle, int cmd, void *ptr)
151 return (ioctl(dladm_dld_fd(handle), cmd, ptr));
211 i_dladm_aggr_info_active(dladm_handle_t handle, datalink_id_t linkid,
228 if (i_dladm_aggr_ioctl(handle, LAIOC_INFO, ioc) != 0) {
266 i_dladm_aggr_info_persist(dladm_handle_t handle, datalink_id_t linkid,
278 if ((status = dladm_getsnap_conf(handle, linkid, &conf)) !=
282 status = dladm_get_conf_field(handle, conf, FKEY, &u64, sizeof (u64));
287 status = dladm_get_conf_field(handle, conf, FPOLICY, &u64,
293 status = dladm_get_conf_field(handle, conf, FFIXMACADDR,
301 if ((status = dladm_get_conf_field(handle, conf, FMACADDR,
311 status = dladm_get_conf_field(handle, conf, FFORCE, &attrp->lg_force,
316 status = dladm_get_conf_field(handle, conf, FLACPMODE, &u64,
322 status = dladm_get_conf_field(handle, conf, FLACPTIMER, &u64,
328 status = dladm_get_conf_field(handle, conf, FNPORTS, &u64,
341 status = dladm_get_conf_field(handle, conf, FPORTS, portstr, size);
352 if ((status = read_port(handle, &next,
359 dladm_destroy_conf(handle, conf);
364 dladm_aggr_info(dladm_handle_t handle, datalink_id_t linkid,
369 return (i_dladm_aggr_info_active(handle, linkid, attrp));
371 return (i_dladm_aggr_info_persist(handle, linkid, attrp));
378 i_dladm_aggr_add_rmv(dladm_handle_t handle, datalink_id_t linkid,
400 if ((dladm_datalink_id2info(handle, ports[i].lp_linkid, NULL,
415 status = dladm_open_conf(handle, linkid, &conf);
422 status = dladm_get_conf_field(handle, conf, FNPORTS, &u64,
442 status = dladm_get_conf_field(handle, conf, FPORTS,
463 status = write_port(handle, portstr,
480 status = read_port(handle, &next, &portid);
495 status = write_port(handle, portstr,
514 if ((status = dladm_set_conf_field(handle, conf, FNPORTS,
520 status = dladm_set_conf_field(handle, conf, FPORTS,
529 status = dladm_write_conf(handle, conf);
532 dladm_destroy_conf(handle, conf);
564 if (i_dladm_aggr_ioctl(handle, cmd, iocp) < 0)
575 if (dladm_open_conf(handle, linkid, &conf) == DLADM_STATUS_OK) {
577 if ((dladm_set_conf_field(handle, conf, FNPORTS,
579 (dladm_set_conf_field(handle, conf, FPORTS,
581 (void) dladm_write_conf(handle, conf);
583 (void) dladm_destroy_conf(handle, conf);
594 i_dladm_aggr_modify_sys(dladm_handle_t handle, datalink_id_t linkid,
617 if (i_dladm_aggr_ioctl(handle, LAIOC_MODIFY, &ioc) < 0) {
631 i_dladm_aggr_create_sys(dladm_handle_t handle, datalink_id_t linkid,
666 if (i_dladm_aggr_ioctl(handle, LAIOC_CREATE, iocp) < 0)
678 i_dladm_aggr_up(dladm_handle_t handle, datalink_id_t linkid, void *arg)
687 status = dladm_aggr_info(handle, linkid, &attr, DLADM_OPT_PERSIST);
712 s = dladm_datalink_id2info(handle, portid, &flags, NULL, NULL,
731 if ((status = i_dladm_aggr_create_sys(handle, linkid,
738 if ((status = dladm_up_datalink_id(handle, linkid)) !=
743 (void) i_dladm_aggr_ioctl(handle, LAIOC_DELETE, &ioc);
758 dladm_aggr_up(dladm_handle_t handle, datalink_id_t linkid)
763 (void) dladm_walk_datalink_id(i_dladm_aggr_up, handle, &status,
768 (void) i_dladm_aggr_up(handle, linkid, &status);
1009 dladm_aggr_persist_aggr_conf(dladm_handle_t handle, const char *link,
1022 if ((status = dladm_create_conf(handle, link, linkid,
1028 status = dladm_set_conf_field(handle, conf, FKEY, DLADM_TYPE_UINT64,
1034 status = dladm_set_conf_field(handle, conf, FNPORTS, DLADM_TYPE_UINT64,
1046 status = write_port(handle, portstr, ports[i].lp_linkid, size);
1052 status = dladm_set_conf_field(handle, conf, FPORTS, DLADM_TYPE_STR,
1060 status = dladm_set_conf_field(handle, conf, FPOLICY, DLADM_TYPE_UINT64,
1065 status = dladm_set_conf_field(handle, conf, FFIXMACADDR,
1077 status = dladm_set_conf_field(handle, conf, FMACADDR,
1083 status = dladm_set_conf_field(handle, conf, FFORCE, DLADM_TYPE_BOOLEAN,
1089 status = dladm_set_conf_field(handle, conf, FLACPMODE,
1095 status = dladm_set_conf_field(handle, conf, FLACPTIMER,
1103 status = dladm_write_conf(handle, conf);
1106 dladm_destroy_conf(handle, conf);
1115 dladm_aggr_create(dladm_handle_t handle, const char *name, uint16_t key,
1134 if ((dladm_datalink_id2info(handle, ports[i].lp_linkid, NULL,
1143 if ((status = dladm_create_datalink_id(handle, name,
1150 (status = dladm_aggr_persist_aggr_conf(handle, name, linkid, key,
1159 status = i_dladm_aggr_create_sys(handle, linkid, key, nports, ports,
1164 (void) dladm_remove_conf(handle, linkid);
1172 (void) dladm_destroy_datalink_id(handle, linkid, flags);
1178 i_dladm_aggr_get_aggr_attr(dladm_handle_t handle, dladm_conf_t conf,
1186 status = dladm_get_conf_field(handle, conf, FPOLICY, &u64,
1194 status = dladm_get_conf_field(handle, conf, FFIXMACADDR,
1202 status = dladm_get_conf_field(handle, conf, FMACADDR,
1215 status = dladm_get_conf_field(handle, conf, FLACPMODE, &u64,
1223 status = dladm_get_conf_field(handle, conf, FLACPTIMER, &u64,
1234 i_dladm_aggr_set_aggr_attr(dladm_handle_t handle, dladm_conf_t conf,
1243 status = dladm_set_conf_field(handle, conf, FPOLICY,
1250 status = dladm_set_conf_field(handle, conf, FFIXMACADDR,
1257 status = dladm_set_conf_field(handle, conf, FMACADDR,
1266 status = dladm_set_conf_field(handle, conf, FLACPMODE,
1274 status = dladm_set_conf_field(handle, conf, FLACPTIMER,
1288 dladm_aggr_modify(dladm_handle_t handle, datalink_id_t linkid,
1304 status = dladm_open_conf(handle, linkid, &conf);
1308 if ((status = i_dladm_aggr_get_aggr_attr(handle, conf,
1313 if ((status = i_dladm_aggr_set_aggr_attr(handle, conf,
1318 status = dladm_write_conf(handle, conf);
1321 dladm_destroy_conf(handle, conf);
1329 status = i_dladm_aggr_modify_sys(handle, linkid, modify_mask,
1332 if (dladm_open_conf(handle, linkid, &conf) == DLADM_STATUS_OK) {
1333 if (i_dladm_aggr_set_aggr_attr(handle, conf,
1335 (void) dladm_write_conf(handle, conf);
1337 dladm_destroy_conf(handle, conf);
1350 i_dladm_aggr_is_held(dladm_handle_t handle, datalink_id_t linkid, void *arg)
1355 if (dladm_vlan_info(handle, linkid, &dva, DLADM_OPT_PERSIST) !=
1374 dladm_aggr_delete(dladm_handle_t handle, datalink_id_t linkid, uint32_t flags)
1380 if ((dladm_datalink_id2info(handle, linkid, NULL, &class, NULL, NULL,
1387 if ((i_dladm_aggr_ioctl(handle, LAIOC_DELETE, &ioc) < 0) &&
1396 (void) dladm_set_linkprop(handle, linkid, NULL, NULL, 0,
1398 (void) dladm_destroy_datalink_id(handle, linkid,
1414 (void) dladm_walk_datalink_id(i_dladm_aggr_is_held, handle,
1420 (void) dladm_remove_conf(handle, linkid);
1421 (void) dladm_destroy_datalink_id(handle, linkid,
1432 dladm_aggr_add(dladm_handle_t handle, datalink_id_t linkid, uint32_t nports,
1435 return (i_dladm_aggr_add_rmv(handle, linkid, nports, ports, flags,
1443 dladm_aggr_remove(dladm_handle_t handle, datalink_id_t linkid, uint32_t nports,
1446 return (i_dladm_aggr_add_rmv(handle, linkid, nports, ports, flags,
1457 i_dladm_walk_key2linkid(dladm_handle_t handle, datalink_id_t linkid, void *arg)
1465 if (dladm_getsnap_conf(handle, linkid, &conf) != DLADM_STATUS_OK)
1468 status = dladm_get_conf_field(handle, conf, FKEY, &u64, sizeof (u64));
1470 dladm_destroy_conf(handle, conf);
1482 dladm_key2linkid(dladm_handle_t handle, uint16_t key, datalink_id_t *linkidp,
1493 (void) dladm_walk_datalink_id(i_dladm_walk_key2linkid, handle, &state,