wrsm_confpack.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdlib.h>
#include <string.h>
#include <sys/wrsm_config.h>
#include "wrsmconf_impl.h"
/*
* wrsm_controller
* wrsm_routing_data (1)
* ncslice (nslices)
* wrsm_ncslice_mode (nsclices)
* wrsm_wci_data (nwcis)
* wrsm_stripe_group (ngroups)
* wrsm_routing_policy (npolicy)
* wrsm_preferred_route (nroutes)
* wrsm_net_member (nmembers)
* ncslice_info.incoming_slices
* ncslice_info.slice_modes
*/
wrsm_cf_unpack(char *data)
{
int size;
int i, j;
size = 0;
/* wrsm_controller */
/* LINTED */
/* wrsm_routing_data */
/* LINTED */
goto err_finish;
/* LINTED */
}
goto err_finish;
/* LINTED */
}
}
goto err_finish;
/* LINTED */
malloc(sizeof (wrsm_preferred_route_t *) *
goto err_finish;
/* LINTED */
}
}
goto err_finish;
/* LINTED */
}
return (cont);
/*
* Playing a little game here. The top controller structure
* "cont" is allocated before this function is called, so we
* shouldn't free it. Passing a "size" of 0 to wrsm_cf_free()
* does what we want be freeing the pointer lists and leaving
* the controller struct alone.
*/
wrsm_cf_free(cont, 0);
return (NULL);
}
/*
* Free all the components of an wrsm_controller_t struct
*/
void
{
int i;
if (!cont)
return;
if (!routing) {
/* Already freed, don't bother doing anything else */
return;
}
}
}
if (size)
}