Lines Matching refs:err

234 	int	err;
243 if (start && ((err = door_ki_open(DLMGMT_DOOR, &dls_mgmt_dh)) != 0)) {
245 return (err);
286 int err;
312 if ((err = door_ki_upcall_limited(dh, &darg, zone_kcred(),
320 switch (err) {
336 cmn_err(CE_WARN, "dls: dlmgmtd fatal error %d\n", err);
349 cmn_err(CE_WARN, "dls: dlmgmtd fatal error %d\n", err);
361 err = ENOSPC;
366 err = EINVAL;
370 err = ((dlmgmt_retval_t *)rbuf)->lr_err;
374 return (err);
396 int err;
408 if ((err = i_dls_mgmt_upcall(&create, sizeof (create), &retval,
412 return (err);
455 int err;
466 if ((err = i_dls_mgmt_upcall(&update, sizeof (update), &retval,
470 } else if (err == 0) {
474 return (err);
490 int err, len;
495 if ((err = i_dls_mgmt_upcall(&getname, sizeof (getname), &retval,
497 return (err);
525 int err;
530 if ((err = i_dls_mgmt_upcall(&getlinkid, sizeof (getlinkid), &retval,
534 return (err);
564 int err;
570 if ((err = i_dls_mgmt_upcall(&getattr, sizeof (getattr), &retval,
578 return (err);
611 int err;
616 err = i_dls_mgmt_upcall(&li, sizeof (li), &retval, sizeof (retval));
617 return (err);
664 int err;
666 if ((err = dls_devnet_hold_tmp(linkid, &dlh)) != 0)
667 return (err);
669 if ((err = dls_link_hold(dls_devnet_mac(dlh), &dlp)) != 0) {
671 return (err);
707 int err;
733 err = dls_stat_update(ksp, dlp, rw);
736 return (err);
804 int err;
818 err = EEXIST;
821 if ((err = dls_mgmt_get_linkinfo(linkid, linkname, &class,
826 if ((err = mod_hash_find(i_dls_devnet_hash,
829 err = EEXIST;
840 err = EINVAL;
869 err = 0;
879 if (err == 0) {
881 (err = i_dls_devnet_setzid(ddp, zoneid, B_FALSE)) != 0)
894 return (err);
905 int err;
909 if ((err = mod_hash_find(i_dls_devnet_hash,
911 ASSERT(err == MH_ERR_NOTFOUND);
982 int err;
992 if ((err = mod_hash_find(i_dls_devnet_id_hash,
994 ASSERT(err == MH_ERR_NOTFOUND);
1057 int err;
1073 if ((err = mod_hash_find(i_dls_devnet_hash,
1075 ASSERT(err == MH_ERR_NOTFOUND);
1122 int err;
1124 if ((err = dls_mgmt_get_linkid(link, &linkid)) == 0)
1132 if (err == EBADF)
1135 if (err != ENOENT)
1136 return (err);
1142 if ((err = i_dls_devnet_create_iptun(link, drv, &linkid)) != 0)
1143 return (err);
1148 err = dls_devnet_hold(linkid, ddpp);
1149 ASSERT(err == 0);
1150 if (err != 0) {
1152 return (err);
1182 if ((err = dls_mgmt_get_linkid(link, &linkid)) != 0 ||
1183 (err = dls_mgmt_get_phydev(linkid, &tmp_dev)) != 0) {
1185 return (err);
1192 err = dls_devnet_hold(linkid, ddpp);
1194 return (err);
1239 int err;
1241 if ((err = dls_devnet_hold_tmp(vlanid, &ddp)) != 0)
1242 return (err);
1244 err = dls_mgmt_get_phydev(ddp->dd_linkid, devp);
1246 return (err);
1269 int err = 0;
1298 if ((err = mac_perim_enter_by_linkid(id1, &mph)) != 0) {
1300 return (err);
1304 if ((err = mod_hash_find(i_dls_devnet_id_hash,
1306 ASSERT(err == MH_ERR_NOTFOUND);
1307 err = ENOENT;
1321 err = EBUSY;
1334 if ((err = mac_open(ddp->dd_mac, &mh)) != 0)
1346 err = EINVAL;
1350 if ((err = mac_open(ddp->dd_mac, &mh)) != 0)
1364 if ((err = mac_mark_exclusive(mh)) != 0)
1370 if ((err = mod_hash_find(i_dls_devnet_id_hash,
1373 err = EEXIST;
1377 err = dls_mgmt_get_linkinfo(id2, ddp->dd_linkname, NULL, NULL, NULL);
1378 if (err != 0) {
1408 if (err == 0)
1420 return (err);
1426 int err;
1437 if ((err = mac_perim_enter_by_macname(ddp->dd_mac, &mph)) != 0)
1438 return (err);
1449 err = i_dls_mgmt_upcall(&setzid, sizeof (setzid), &retval,
1451 if (err != 0)
1455 if ((err = dls_link_setzid(ddp->dd_mac, new_zoneid)) == 0) {
1461 if (err != 0 && upcall_done) {
1467 return (err);
1474 int err;
1488 if ((err = dls_devnet_hold(ddh->dd_linkid, &ddp)) != 0)
1489 return (err);
1493 if ((err = i_dls_devnet_setzid(ddh, new_zid, B_TRUE)) != 0) {
1496 return (err);
1553 int err;
1556 if ((err = dls_devnet_hold_by_name(link, &ddp)) != 0)
1557 return (err);
1570 err = mac_perim_enter_by_macname(ddp->dd_mac, &mph);
1571 if (err != 0) {
1573 return (err);
1576 err = dls_link_hold_create(ddp->dd_mac, &dlp);
1579 if (err != 0) {
1581 return (err);
1631 int err;
1645 if ((err = dls_devnet_set(mac_name(mh), linkid, zoneid, &ddp)) == 0) {
1646 if ((err = dls_link_hold_create(mac_name(mh), &dlp)) != 0) {
1649 return (err);
1653 return (err);
1672 int err;
1676 err = dls_devnet_unset(mac_name(mh), idp, wait);
1677 if (err != 0 && err != ENOENT)
1678 return (err);
1681 err = dls_link_rele_by_name(mac_name(mh));
1684 if (err != 0) {
1695 return (err);
1705 int err;
1731 err = dls_mgmt_create((char *)linkname, 0, DATALINK_CLASS_IPTUN, media,
1733 if (err != 0) {
1735 return (err);
1739 err = iptun_create(&ik, CRED());
1742 if (err != 0)
1748 return (err);
1754 int err;
1762 if ((err = iptun_delete(linkid, zone_kcred())) == 0)
1764 return (err);