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
42bf653b44c42fc6b637ae50e590489d69399241Peter Gill * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
59927d313a821b7f3822314ed16fc0a44c128431Yuri Pankov * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapiscsit_free(void *buf, size_t size) /* ARGSUSED */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * default_port should be the port to be used, if not specified
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * as part of the supplied string 'arg'.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_common_convert_sa(char *arg, struct sockaddr_storage *buf,
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* Why does addrbuf need to be this big!??! XXX */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* don't modify the passed-in string */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap (void) strlcpy(addrbuf, arg, sizeof (addrbuf));
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * An IPv6 address must be inside square brackets
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* No closing bracket */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* strip off the square brackets so we can convert */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* TCP port to follow */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* No port specified */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* malformed */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap if (ddi_strtol(port_str, NULL, 10, &tmp_port) != 0) {
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* successful */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap/* Functions to convert iSCSI target structures to/from nvlists. */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_config_to_nv(it_config_t *cfg, nvlist_t **nvl)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_alloc(&nv, NV_UNIQUE_NAME_TYPE, 0);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* if there's no config, store an empty list */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_add_uint32(nv, "cfgVersion", cfg->config_version);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = it_tgtlist_to_nv(cfg->config_tgt_list, &lnv);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_add_nvlist(nv, "targetList", lnv);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = it_tpglist_to_nv(cfg->config_tpg_list, &lnv);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = it_inilist_to_nv(cfg->config_ini_list, &lnv);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_add_nvlist(nv, "globalProperties",
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap#endif /* !_KERNEL */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * nvlist version of config is 3 list-of-list, + 1 proplist. arrays
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * are interesting, but lists-of-lists are more useful when doing
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * individual lookups when we later add support for it. Also, no
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * need to store name in individual struct representation.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_nv_to_config(nvlist_t *nvl, it_config_t **cfg)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* initialize output */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* nothing to decode, but return the empty cfg struct */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_alloc(&tmpcfg->config_global_properties,
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_lookup_uint32(nvl, "cfgVersion", &intval);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_lookup_nvlist(nvl, "targetList", &listval);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* decode list of it_tgt_t */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = it_nv_to_tgtlist(listval, &(tmpcfg->config_tgt_count),
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_lookup_nvlist(nvl, "tpgList", &listval);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* decode list of it_tpg_t */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = it_nv_to_tpglist(listval, &(tmpcfg->config_tpg_count),
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_lookup_nvlist(nvl, "iniList", &listval);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* decode list of initiators */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = it_nv_to_inilist(listval, &(tmpcfg->config_ini_count),
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_lookup_nvlist(nvl, "globalProperties", &listval);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * don't depend on the original nvlist staying in-scope,
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * duplicate the nvlist
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_dup(listval, &(tmpcfg->config_global_properties),
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * No global properties defined, make an empty list
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_alloc(&tmpcfg->config_global_properties,
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * decode the list of iSNS server information to make
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * references from the kernel simpler.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* It's OK if we don't have any iSNS servers */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_nv_to_tgtlist(nvlist_t *nvl, uint32_t *count, it_tgt_t **tgtlist)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* nothing to do */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap while ((nvp = nvlist_next_nvpair(nvl, nvp)) != NULL) {
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* invalid entry? */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_tgtlist_to_nv(it_tgt_t *tgtlist, nvlist_t **nvl)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* nothing to do */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* create the target list if required */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_add_nvlist(*nvl, tgtp->tgt_name, tnv);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* nothing to do */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = it_tpgtlist_to_nv(tgt->tgt_tpgt_list, &tnv);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_add_nvlist(*nvl, "tpgtList", tnv);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_nv_to_tgt(nvlist_t *nvl, char *name, it_tgt_t **tgt)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap (void) strlcpy(ttgt->tgt_name, name, sizeof (ttgt->tgt_name));
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_lookup_nvlist(nvl, "properties", &listval);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* duplicate list so it does not go out of context */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_dup(listval, &(ttgt->tgt_properties), 0);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_lookup_nvlist(nvl, "tpgtList", &listval);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* nothing to do */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_add_uint16(*nvl, "tag", tpgt->tpgt_tag);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_nv_to_tpgt(nvlist_t *nvl, char *name, it_tpgt_t **tpgt)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap (void) strlcpy(ptr->tpgt_tpg_name, name, sizeof (ptr->tpgt_tpg_name));
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_lookup_uint16(nvl, "tag", &(ptr->tpgt_tag));
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_tpgtlist_to_nv(it_tpgt_t *tpgtlist, nvlist_t **nvl)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* nothing to do */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* create the target list if required */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_add_nvlist(*nvl, ptr->tpgt_tpg_name, tnv);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_nv_to_tpgtlist(nvlist_t *nvl, uint32_t *count, it_tpgt_t **tpgtlist)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* nothing to do */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap while ((nvp = nvlist_next_nvpair(nvl, nvp)) != NULL) {
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* invalid entry? */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* nothing to do */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_add_uint64(*nvl, "generation", tpg->tpg_generation);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* add the portals */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap portalArray = iscsit_zalloc(tpg->tpg_portal_count *
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_add_string_array(*nvl, "portalList",
4f1fc35da1d29699488fd1c9472dbeb042b2b9d0srivijitha dugganapalli while (--i >= 0) {
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap#endif /* !_KERNEL */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_nv_to_tpg(nvlist_t *nvl, char *name, it_tpg_t **tpg)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap (void) strlcpy(ptpg->tpg_name, name, sizeof (ptpg->tpg_name));
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_lookup_string_array(nvl, "portalList",
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* set the portals */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = it_array_to_portallist(portalArray, count,
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_tpglist_to_nv(it_tpg_t *tpglist, nvlist_t **nvl)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* nothing to do */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* create the target portal group list if required */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_add_nvlist(*nvl, ptr->tpg_name, tnv);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap#endif /* !_KERNEL */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_sa_compare(struct sockaddr_storage *sa1, struct sockaddr_storage *sa2)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * XXX - should we check here for IPv4 addrs mapped to v6?
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * see also iscsit_is_v4_mapped in iscsit_login.c
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * sockaddr_in has padding which may not be initialized.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * be more specific in the comparison, and don't trust the
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * caller has fully initialized the structure.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap sizeof (struct in_addr)) == 0) &&
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap if (bcmp(sin6_1, sin6_2, sizeof (struct sockaddr_in6)) == 0) {
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_portal_lookup(it_tpg_t *tpg, struct sockaddr_storage *sa)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap if (it_sa_compare(sa, &cfg_portal->portal_addr) == 0)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_sns_svr_lookup(it_config_t *cfg, struct sockaddr_storage *sa)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap if (it_sa_compare(sa, &cfg_portal->portal_addr) == 0)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_nv_to_tpglist(nvlist_t *nvl, uint32_t *count, it_tpg_t **tpglist)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* nothing to do */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap while ((nvp = nvlist_next_nvpair(nvl, nvp)) != NULL) {
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* invalid entry? */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_nv_to_ini(nvlist_t *nvl, char *name, it_ini_t **ini)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap (void) strlcpy(inip->ini_name, name, sizeof (inip->ini_name));
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_lookup_nvlist(nvl, "properties", &listval);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_dup(listval, &(inip->ini_properties), 0);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_inilist_to_nv(it_ini_t *inilist, nvlist_t **nvl)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* create the target list if required */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap ret = nvlist_add_nvlist(*nvl, ptr->ini_name, tnv);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_nv_to_inilist(nvlist_t *nvl, uint32_t *count, it_ini_t **inilist)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* nothing to do */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap while ((nvp = nvlist_next_nvpair(nvl, nvp)) != NULL) {
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* invalid entry? */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Convert a sockaddr to the string representation, suitable for
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * storing in an nvlist or printing out in a list.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapsockaddr_to_str(struct sockaddr_storage *sa, char **addr)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap char buf[INET6_ADDRSTRLEN + 7]; /* addr : port */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap (void) snprintf(pbuf, sizeof (pbuf), ":%u", port);
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap#endif /* !_KERNEL */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlapit_array_to_portallist(char **arr, uint32_t count, uint32_t default_port,
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap it_portal_t **portallist, uint32_t *list_count)
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap for (i = 0; i < count; i++) {
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* should never happen */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap &(portal->portal_addr), default_port) == NULL) {
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap /* make sure no duplicates */
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * The first time through the loop, *portallist == NULL
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * because we assigned it to NULL above. Subsequently
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * prev will have been set. Therefor it's OK to put
42bf653b44c42fc6b637ae50e590489d69399241Peter Gill * lint override before prev->portal_next assignment.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Function: it_config_free_cmn()
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Free any resources associated with the it_config_t structure.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Parameters:
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * cfg A C representation of the current iSCSI configuration
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Function: it_tgt_free_cmn()
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Frees an it_tgt_t structure. If tgt_next is not NULL, frees
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * all structures in the list.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Function: it_tpgt_free_cmn()
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Deallocates resources of an it_tpgt_t structure. If tpgt->next
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * is not NULL, frees all members of the list.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Function: it_tpg_free_cmn()
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Deallocates resources associated with an it_tpg_t structure.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * If tpg->next is not NULL, frees all members of the list.
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Function: it_ini_free_cmn()
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * Deallocates resources of an it_ini_t structure. If ini->next is
a6d42e7d71324c5193c3b94d57d96ba2925d52e1Peter Dunlap * not NULL, frees all members of the list.