Lines Matching +defs:key +defs:value

127  *	get the key attributes of the packet.
142 isns_tlv_t *key;
145 key = pdu_get_key(pdu, &key_len);
147 conn->in_packet.key = key;
306 * which the key attributes identify.
309 * key - the key attributes.
310 * key_len - the length of the key attributes.
319 isns_tlv_t *key,
325 uint8_t *value = &key->attr_value[0];
330 switch (key->attr_id) {
332 if (key->attr_len >= 4) {
336 lcp->data[0].ptr = (uchar_t *)value;
341 if (key->attr_len >= 4) {
345 lcp->data[0].ptr = (uchar_t *)value;
352 if (key->attr_len == sizeof (in6_addr_t)) {
356 lcp->data[0].ip = (in6_addr_t *)value;
357 NEXT_TLV(key, key_len);
359 key->attr_len != 4 ||
360 key->attr_id != ISNS_PORTAL_PORT_ATTR_ID) {
364 value = &key->attr_value[0];
368 lcp->data[1].ui = ntohl(*(uint32_t *)value);
375 if (key->attr_len < 4) {
380 lcp->data[0].ptr = (uchar_t *)value;
381 NEXT_TLV(key, key_len);
383 key->attr_len != sizeof (in6_addr_t) ||
384 key->attr_id != ISNS_PG_PORTAL_IP_ADDR_ATTR_ID) {
387 value = &key->attr_value[0];
390 lcp->data[1].ip = (in6_addr_t *)value;
391 NEXT_TLV(key, key_len);
393 key->attr_len != 4 ||
394 key->attr_id != ISNS_PG_PORTAL_PORT_ATTR_ID) {
397 value = &key->attr_value[0];
400 lcp->data[2].ui = ntohl(*(uint32_t *)value);
446 (void *)attr->value.ptr, 0);
462 * add the key attributes to the response packet.
465 * entity - the object which is being added as key attributes.
478 isns_tlv_t *key = conn->in_packet.key;
490 tag, len, (void *)attr->value.ptr, 0);
494 if (key->attr_id == ISNS_EID_ATTR_ID) {
497 (void *)attr->value.ptr, 0);
500 key->attr_id, key->attr_len,
501 (void *)key->attr_value, 1);
503 NEXT_TLV(key, key_len);
532 * value- the value of the attribute.
533 * pflag- the flag of the value, 0: value; 1: pointer to value
543 void *value,
553 ec = pdu_add_tlv(&rsp, &pl, &sz, tag, len, value, pflag);
586 void *value;
592 value = (void *)tlv->attr_value;
594 ec = rsp_add_tlv(conn, tag, len, value, 1);
622 isns_tlv_t *key = conn->in_packet.key;
661 if (key != NULL) {
662 /* validate key attributes and make lcp for */
663 /* the object identified by key attributes. */
664 ec = setup_key_lcp(&lc, key, key_len);
708 /* the eid in key attribute and */
799 ec = esi_add(puid, eid_attr->value.ptr, eid_attr->len);
839 isns_tlv_t *key = conn->in_packet.key;
890 if (key != NULL) {
892 * Return the original message key.
894 ec = rsp_add_tlvs(conn, key, key_len);
911 key, key_len, &key_uids, &num_of_keys);
917 * Iterate thru each object identified by the message key.
1010 isns_tlv_t *key = conn->in_packet.key;
1051 key_type = TLV2TYPE(key);
1056 ec = validate_qry_key(key_type, key, key_len, NULL);
1086 uid = get_next_obj(key, key_len, key_type, obj_uids, num_of_obj);
1095 if ((ec = get_qry_attrs1(uid, key_type, key, key_len, conn)) != 0) {
1146 /* isns_tlv_t *key = conn->in_packet.key; */
1156 uint8_t *value;
1168 value = &op->attr_value[0];
1173 lc.data[0].ptr = (uchar_t *)value;
1180 lc.data[0].ptr = (uchar_t *)value;
1188 lc.data[0].ui = ntohl(*(uint32_t *)value);
1196 lc.data[0].ip = (in6_addr_t *)value;
1200 value = &op->attr_value[0];
1204 lc.data[1].ui = ntohl(*(uint32_t *)value);
1215 lc.data[0].ui = ntohl(*(uint32_t *)value);
1268 isns_tlv_t *key = conn->in_packet.key;
1285 key == NULL ||
1286 key->attr_id != ISNS_ISCSI_NAME_ATTR_ID ||
1287 key_len != 8 + key->attr_len) {
1292 node_name = (uchar_t *)&key->attr_value[0];
1293 nlen = key->attr_len;
1326 isns_tlv_t *key = conn->in_packet.key;
1333 if (key != NULL &&
1334 key->attr_len != 0 &&
1335 key_len == 8 + key->attr_len &&
1336 key->attr_id == ISNS_ISCSI_NAME_ATTR_ID) {
1337 node_name = (uchar_t *)&key->attr_value[0];
1436 isns_tlv_t *key = conn->in_packet.key;
1442 uint8_t *value;
1471 (key != NULL &&
1473 key->attr_id != ISNS_DD_ID_ATTR_ID ||
1474 key->attr_len != 4 ||
1475 (dd_id = ntohl(*(uint32_t *)&key->attr_value[0])) == 0 ||
1481 /* message key */
1482 if (key != NULL &&
1521 value = &op->attr_value[0];
1525 /* and Operating Attributes, then the DD_ID value */
1527 /* value in the Operating Attributes. */
1530 dd_id != ntohl(*(uint32_t *)value)) {
1546 (uchar_t *)value);
1556 op->attr_len, (void *)value, 1);
1567 attr->value.ui = ntohl(*(uint32_t *)value);
1571 attr->value.ptr = NULL; /* clear it */
1577 if (attr->value.ptr != NULL) {
1578 free(attr->value.ptr);
1586 4, (void *)attr->value.ui, 0);
1595 attr->value.ptr = (uchar_t *)value;
1610 op->attr_len, (void *)value, 1);
1623 features = ntohl(*(uint32_t *)value);
1674 isns_tlv_t *key = conn->in_packet.key;
1680 uint8_t *value;
1709 (key != NULL &&
1711 key->attr_id != ISNS_DD_SET_ID_ATTR_ID ||
1712 key->attr_len != 4 ||
1713 (dds_id = ntohl(*(uint32_t *)&key->attr_value[0])) == 0 ||
1719 /* message key */
1720 if (key != NULL &&
1759 value = &op->attr_value[0];
1763 /* and Operating Attributes, then the DDS_ID value */
1765 /* value in the Operating Attributes. */
1768 dds_id != ntohl(*(uint32_t *)value)) {
1784 (uchar_t *)value);
1794 op->attr_len, (void *)value, 1);
1802 code = ntohl(*(uint32_t *)value);
1822 attr->value.ui = ntohl(*(uint32_t *)value);
1834 (void *)attr->value.ui, 0);
1875 isns_tlv_t *key = conn->in_packet.key;
1881 uint8_t *value;
1897 if (key == NULL ||
1899 key->attr_id != ISNS_DD_ID_ATTR_ID ||
1900 (dd_id = ntohl(*(uint32_t *)&key->attr_value[0])) == 0) {
1912 value = &op->attr_value[0];
1920 attr->value.ui = ntohl(*(uint32_t *)value);
1924 attr->value.ptr = NULL; /* clear it */
1930 if (attr->value.ptr != NULL) {
1931 free(attr->value.ptr);
1939 attr->value.ptr = (uchar_t *)value;
1994 isns_tlv_t *key = conn->in_packet.key;
2001 uint8_t *value;
2013 if (key == NULL ||
2015 key->attr_id != ISNS_DD_SET_ID_ATTR_ID ||
2016 (dds_id = ntohl(*(uint32_t *)&key->attr_value[0])) == 0) {
2025 value = &op->attr_value[0];
2027 uid = ntohl(*(uint32_t *)value);