Lines Matching defs:ec
104 int ec = 0;
110 ec = ISNS_RSP_SRC_ABSENT;
113 ec = ISNS_RSP_SRC_UNKNOWN;
116 if (ec == 0) {
120 return (ec);
139 int ec = 0;
150 return (ec);
169 int ec = 0;
180 return (ec);
200 int ec = 0;
208 ec = ISNS_RSP_VER_NOT_SUPPORTED;
232 ec = ISNS_RSP_SCN_REGIS_REJECTED;
240 ec = ISNS_RSP_SCN_REGIS_REJECTED;
244 ec = ISNS_RSP_MSG_NOT_SUPPORTED;
263 ec = ISNS_RSP_MSG_NOT_SUPPORTED;
286 if (ec == 0) {
287 ec = packet_get_source(conn);
288 if (ec == 0) {
289 ec = packet_get_key(conn);
290 if (ec == 0) {
291 ec = packet_get_operand(conn);
296 conn->ec = ec;
298 return (ec);
323 int ec = 0;
348 ec = ISNS_RSP_MSG_FORMAT_ERROR;
371 ec = ISNS_RSP_MSG_FORMAT_ERROR;
405 ec = ISNS_RSP_MSG_FORMAT_ERROR;
408 return (ec);
429 int ec = 0;
440 ec == 0) {
444 ec = pdu_add_tlv(&rsp, &pl, &sz,
455 return (ec);
476 int ec = 0;
489 ec = pdu_add_tlv(&rsp, &pl, &sz,
493 ec == 0) {
495 ec = pdu_add_tlv(&rsp, &pl, &sz,
499 ec = pdu_add_tlv(&rsp, &pl, &sz,
507 if (ec == 0) {
508 ec = pdu_add_tlv(&rsp, &pl, &sz,
516 if (ec == 0) {
517 ec = rsp_add_op(conn, entity);
520 return (ec);
547 int ec = 0;
553 ec = pdu_add_tlv(&rsp, &pl, &sz, tag, len, value, pflag);
559 return (ec);
582 int ec = 0;
589 ec == 0) {
594 ec = rsp_add_tlv(conn, tag, len, value, 1);
599 return (ec);
618 int ec = 0;
651 ec = pdu_reset_rsp(&conn->out_packet.pdu,
654 if (ec != 0) {
664 ec = setup_key_lcp(&lc, key, key_len);
665 if (ec == 0 && lc.type != 0) {
671 ec = ISNS_RSP_INVALID_REGIS;
681 ec = ISNS_RSP_SRC_UNAUTHORIZED;
685 ec = dereg_object(&lc, 0);
687 if (ec == 0) {
694 if (ec != 0) {
699 ec = reg_get_entity(&ety, &op, &op_len);
700 if (ec != 0) {
710 ec = ISNS_RSP_INVALID_REGIS;
714 ec = ISNS_RSP_INTERNAL_ERROR;
717 ec = register_object(ety, &puid, &ety_update);
720 if (ec == 0 && ety_update == 0) {
727 while (ec == 0 &&
728 (ec = reg_get_obj(&obj, &pgt[0], &op, &op_len)) == 0 &&
730 (ec = rsp_add_op(conn, obj)) == 0) {
735 ec = register_object(obj, &uid, &obj_update);
736 if (ec == 0) {
743 ec = buff_child_obj(ptype, ctype, obj, child);
751 ec = ISNS_RSP_SRC_UNAUTHORIZED;
764 if (ec == 0) {
765 ec = verify_ref_obj(ptype, puid, child);
767 if (ec != 0) {
780 ec = update_child_obj(ptype, puid, child, 1);
783 ec = ISNS_RSP_INVALID_REGIS;
788 ec = dereg_object(&lc, 0);
792 if (ec != 0) {
799 ec = esi_add(puid, eid_attr->value.ptr, eid_attr->len);
802 conn->ec = ec;
812 if (ec != 0) {
813 isnslog(LOG_DEBUG, "dev_attr_reg", "error code: %d", ec);
835 int ec = 0;
865 ec = pdu_reset_rsp(&conn->out_packet.pdu,
868 if (ec != 0) {
883 ec = get_scope(iscsi_name, &nodes_bmp, &num_of_nodes);
884 if (ec != 0 || nodes_bmp == NULL) {
894 ec = rsp_add_tlvs(conn, key, key_len);
895 if (ec != 0) {
902 ec = rsp_add_tlv(conn, ISNS_DELIMITER_ATTR_ID, 0, NULL, 0);
903 if (ec != 0) {
910 ec = get_qry_keys(nodes_bmp, num_of_nodes, &key_type,
912 if (ec != 0 || key_uids == NULL) {
929 ec = ISNS_RSP_INVALID_QRY;
932 ec = get_qry_ops(key_uid, key_type,
935 if (ec != 0) {
943 ec = get_qry_attrs(op_uid, op_type,
945 if (ec != 0) {
956 ec = get_qry_ops2(nodes_bmp, num_of_nodes,
959 if (ec != 0) {
967 ec = get_qry_attrs(op_uid, op_type,
969 if (ec != 0) {
977 conn->ec = ec;
979 if (ec != 0) {
980 isnslog(LOG_DEBUG, "dev_attr_qry", "error code: %d", ec);
1006 int ec = 0;
1030 ec = pdu_reset_rsp(&conn->out_packet.pdu,
1033 if (ec != 0) {
1039 ec = get_scope(iscsi_name, &nodes_bmp, &num_of_nodes);
1041 ec = ISNS_RSP_NO_SUCH_ENTRY;
1043 if (ec != 0) {
1053 ec = ISNS_RSP_MSG_FORMAT_ERROR;
1056 ec = validate_qry_key(key_type, key, key_len, NULL);
1057 if (ec != 0) {
1066 ec = get_qry_keys(nodes_bmp, num_of_nodes, &op_type,
1069 ec = ISNS_RSP_MSG_FORMAT_ERROR;
1075 ec = get_qry_ops2(nodes_bmp, num_of_nodes,
1078 if (ec != 0) {
1088 ec = ISNS_RSP_NO_SUCH_ENTRY;
1095 if ((ec = get_qry_attrs1(uid, key_type, key, key_len, conn)) != 0) {
1102 if ((ec = rsp_add_tlv(conn, ISNS_DELIMITER_ATTR_ID, 0, NULL, 0)) != 0) {
1110 ec = get_qry_attrs(uid, op_type, op, op_len, conn);
1114 conn->ec = ec;
1116 if (ec != 0 && ec != ISNS_RSP_NO_SUCH_ENTRY) {
1117 isnslog(LOG_DEBUG, "dev_get_next", "error code: %d", ec);
1142 int ec = 0;
1166 while (op_len > 8 && ec == 0) {
1208 ec = ISNS_RSP_MSG_FORMAT_ERROR;
1220 ec = ISNS_RSP_MSG_FORMAT_ERROR;
1223 if (ec == 0 &&
1224 (ec = dereg_object(&lc, 0)) == 0) {
1232 ec = ISNS_RSP_SRC_UNAUTHORIZED;
1239 conn->ec = ec;
1241 if (ec != 0) {
1242 isnslog(LOG_DEBUG, "dev_dereg", "error code: %d", ec);
1264 int ec = 0;
1288 ec = ISNS_RSP_MSG_FORMAT_ERROR;
1296 ec = add_scn_entry(node_name, nlen, scn);
1299 conn->ec = ec;
1301 if (ec != 0) {
1302 isnslog(LOG_DEBUG, "scn_reg", "error code: %d", ec);
1324 int ec = 0;
1338 ec = remove_scn_entry(node_name);
1340 ec = ISNS_RSP_MSG_FORMAT_ERROR;
1343 conn->ec = ec;
1345 if (ec != 0) {
1346 isnslog(LOG_DEBUG, "scn_dereg", "error code: %d", ec);
1432 int ec = 0;
1459 ec = ISNS_RSP_SRC_UNAUTHORIZED;
1463 ec = pdu_reset_rsp(&conn->out_packet.pdu,
1466 if (ec != 0) {
1477 ec = ISNS_RSP_INVALID_REGIS;
1483 (ec = rsp_add_tlv(conn, ISNS_DD_ID_ATTR_ID, 4,
1489 if ((ec = rsp_add_tlv(conn, ISNS_DELIMITER_ATTR_ID, 0,
1497 ec = create_dd_object(op, op_len, &dd);
1498 if (ec == 0) {
1499 ec = register_object(dd, &dd_id, NULL);
1500 if (ec == ERR_NAME_IN_USE) {
1501 ec = ISNS_RSP_INVALID_REGIS;
1503 if (ec != 0) {
1514 ec = rsp_add_op(conn, dd);
1520 while (op_len > 8 && ec == 0) {
1531 ec = ISNS_RSP_INVALID_REGIS;
1533 ec = rsp_add_tlv(conn,
1543 ec = update_dd_name(
1547 if (ec == ERR_NAME_IN_USE) {
1548 ec = ISNS_RSP_INVALID_REGIS;
1551 ec = ISNS_RSP_INVALID_REGIS;
1553 if (ec == 0) {
1554 ec = rsp_add_tlv(conn,
1573 if ((ec = add_dd_member(assoc)) ==
1575 ec = 0;
1581 ec = ISNS_RSP_INVALID_REGIS;
1583 if (ec == 0) {
1584 ec = rsp_add_tlv(conn,
1600 if ((ec = add_dd_member(assoc)) ==
1602 ec = 0;
1605 ec = ISNS_RSP_INVALID_REGIS;
1607 if (ec == 0) {
1608 ec = rsp_add_tlv(conn,
1617 ec = ISNS_RSP_REGIS_NOT_SUPPORTED;
1624 ec = update_dd_features(
1627 ec = ISNS_RSP_INVALID_REGIS;
1629 if (ec == 0) {
1630 ec = rsp_add_tlv(conn,
1637 ec = ISNS_RSP_INVALID_REGIS;
1645 conn->ec = ec;
1647 if (ec != 0) {
1648 isnslog(LOG_DEBUG, "dd_reg", "error code: %d", ec);
1670 int ec = 0;
1697 ec = ISNS_RSP_SRC_UNAUTHORIZED;
1701 ec = pdu_reset_rsp(&conn->out_packet.pdu,
1704 if (ec != 0) {
1715 ec = ISNS_RSP_INVALID_REGIS;
1721 (ec = rsp_add_tlv(conn, ISNS_DD_SET_ID_ATTR_ID, 4,
1727 if ((ec = rsp_add_tlv(conn, ISNS_DELIMITER_ATTR_ID, 0,
1735 ec = create_dds_object(op, op_len, &dds);
1736 if (ec == 0) {
1737 ec = register_object(dds, &dds_id, NULL);
1738 if (ec == ERR_NAME_IN_USE) {
1739 ec = ISNS_RSP_INVALID_REGIS;
1741 if (ec != 0) {
1752 ec = rsp_add_op(conn, dds);
1758 while (op_len > 8 && ec == 0) {
1769 ec = ISNS_RSP_INVALID_REGIS;
1771 ec = rsp_add_tlv(conn,
1781 ec = update_dds_name(
1785 if (ec == ERR_NAME_IN_USE) {
1786 ec = ISNS_RSP_INVALID_REGIS;
1789 ec = ISNS_RSP_INVALID_REGIS;
1791 if (ec == 0) {
1792 ec = rsp_add_tlv(conn,
1803 ec = update_dds_status(
1806 ec = ISNS_RSP_INVALID_REGIS;
1808 if (ec == 0) {
1809 ec = rsp_add_tlv(conn,
1824 if ((ec = add_dds_member(assoc)) ==
1826 ec = 0;
1829 ec = ISNS_RSP_INVALID_REGIS;
1831 if (ec == 0) {
1832 ec = rsp_add_tlv(conn,
1838 ec = ISNS_RSP_INVALID_REGIS;
1846 conn->ec = ec;
1848 if (ec != 0) {
1849 isnslog(LOG_DEBUG, "dds_reg", "error code: %d", ec);
1871 int ec = 0;
1893 ec = ISNS_RSP_SRC_UNAUTHORIZED;
1901 ec = ISNS_RSP_MSG_FORMAT_ERROR;
1906 ec = remove_dd_object(dd_id);
1911 while (op_len > 8 && ec == 0) {
1926 if ((ec = remove_dd_member(assoc)) ==
1928 ec = 0;
1944 if ((ec = remove_dd_member(assoc)) ==
1946 ec = 0;
1953 ec = ISNS_RSP_REGIS_NOT_SUPPORTED;
1956 ec = ISNS_RSP_MSG_FORMAT_ERROR;
1965 conn->ec = ec;
1967 if (ec != 0) {
1968 isnslog(LOG_DEBUG, "dd_dereg", "error code: %d", ec);
1990 int ec = 0;
2009 ec = ISNS_RSP_SRC_UNAUTHORIZED;
2017 ec = ISNS_RSP_MSG_FORMAT_ERROR;
2022 ec = remove_dds_object(dds_id);
2024 while (op_len > 8 && ec == 0) {
2028 if ((ec = remove_dds_member(dds_id, uid)) ==
2030 ec = 0;
2033 ec = ISNS_RSP_MSG_FORMAT_ERROR;
2041 conn->ec = ec;
2043 if (ec != 0) {
2044 isnslog(LOG_DEBUG, "dds_dereg", "error code: %d", ec);
2079 * ec - the error code which is being responsed.
2088 int ec
2102 resp->status = htonl(ec);
2128 int ec = conn->ec;
2137 (void) pdu_update_code(rsp, &pl, ec);
2140 status = isns_response_ec(so, pdu, ec);