a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * CDDL HEADER START
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * The contents of this file are subject to the terms of the
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Common Development and Distribution License (the "License").
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * You may not use this file except in compliance with the License.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * See the License for the specific language governing permissions
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * and limitations under the License.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * When distributing Covered Code, include this CDDL HEADER in each
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * If applicable, add the following below this CDDL HEADER, with the
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * fields enclosed by brackets "[]" replaced with your own identifying
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * information: Portions Copyright [yyyy] [name of copyright owner]
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * CDDL HEADER END
2ef9abdc6ea9bad985430325b12b90938a8cd18fjv * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Use is subject to license terms.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Numerical identifiers for iSCSI name-value pair keys (just so that
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * we can use case statements to handle a particular key-value pair
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * after we find it in idm_kvpair_xlate).
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * We want to use a bitmask to keep track of negotiated key-value pairs
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * so keep this enum under 64 values -- or spend some time reworking the
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * login code.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlaptypedef enum {
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * ISCSI Operational Parameter Keys
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * iSER-specific keys
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * End of list marker, no keys below here.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap/* Numerical types for iSCSI name-value pair values */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlaptypedef enum {
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap KT_LARGE_NUMERICAL, /* Hex, decimal or Base64 constant */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap KT_REGULAR_BINARY, /* Hex, decimal, base64 not longer than 64 bits */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap KT_LARGE_BINARY, /* Hex, decimal, base64 longer than 64 bites */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap KT_BINARY, /* Regular binary or large binary */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlaptypedef struct {
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapidm_lookup_kv_xlate(const char *key, int keylen);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapidm_nvlist_add_keyvalue(nvlist_t *nvl, char *key, int keylen, char *value);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapidm_textbuf_to_nvlist(nvlist_t *nvl, char **textbuf, int *textbuflen);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapidm_textbuf_to_firstfraglen(void *textbuf, int textbuflen);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapidm_nvlist_to_textbuf(nvlist_t *nvl, char **textbuf, int *textbuflen,
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapidm_kvstat_to_error(kv_status_t kvrc, uint8_t *class, uint8_t *detail);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapidm_nvlist_add_id(nvlist_t *nvl, iscsikey_id_t kv_id, char *value);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapidm_get_next_listvalue(nvpair_t *value_list, nvpair_t *curr_nvp);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapidm_pdu_list_to_nvlist(list_t *pdu_list, nvlist_t **nvlist,
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapidm_pdu_init_text_data(idm_pdu_t *pdu, void *arg,
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap#endif /* _IDM_TEXT_H_ */