2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2001 by Sun Microsystems, Inc. 2N/A * All rights reserved. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * Argument: resource, and path in that resource. 2N/A /* enumerate_dd() */ 2N/A (
void)
printf(
"\nstarting testing on %s, tables @ %s\n",
2N/A * Using the datastore struct we built from arguments, begin poking 2N/A * at the user selected public module. 2N/A /* list_dd - dhcptab */ 2N/A (
void)
printf(
"\nlist_dd of dhcptab containers: ... ");
2N/A (
void)
printf(
"list_dd: listpp: 0x%p, count: %d\n",
2N/A /* open_dd - dhcptab (create) */ 2N/A /* add_dd_entry - dhcptab */ 2N/A ":Router=172.20.64.2:Subnet=255.255.255.192:";
2N/A ":Router=172.20.64.65:Subnet=255.255.255.192:";
2N/A ":Router=172.20.64.129:Subnet=255.255.255.128:";
2N/A ":Router=172.22.0.1:Subnet=255.255.0.0:MTU=4532:";
2N/A (
void)
printf(
"add_dd_entry: ... key type value\n");
2N/A /* lookup_dd - dhcptab - macro called '172.20.64.128', then delete it */ 2N/A (
void)
printf(
"lookup_dd: expected 1 record, got %d\n",
2N/A * lookup_dd - dhcptab - macro called '172.21.0.0', and modify its 2N/A * definition and replace the value. 2N/A (
void)
printf(
"lookup_dd: expected 1 record, " 2N/A ":Subnet=255.255.0.0:Router=172.21.0.1 " 2N/A "172.21.0.2:MTU=1500:");
2N/A (
void)
printf(
"modify_dd_entry: macro %s ... ",
2N/A /* lookup_dd - all records */ 2N/A (
void)
printf(
"lookup_dd: all records ... ");
2N/A /* close_dd - dhcptab */ 2N/A /* list_dd - dhcp network containers */ 2N/A (
void)
printf(
"list_dd: listpp: 0x%p, count: %d\n",
2N/A /* remove_dd - dhcptab */ 2N/A /* open_dd - 129.148.5.0 create */ 2N/A (
void)
printf(
"\nopen_dd: 129.148.5.0: ... ");
2N/A /* add_dd_entry - 129.148.5.0 */ 2N/A (
void)
printf(
"add_dd_entry: ... cid flag cip sip lease " 2N/A /* lookup_dd - lookup all records. */ 2N/A (
void)
printf(
"lookup_dd: 129.148.5.0 ... ");
2N/A (
void)
printf(
" %s %02u %s %s %u '%s' #%s\n",
2N/A /* delete_dd_entry - 129.148.5.3 */ 2N/A (
void)
printf(
"delete_dd_entry: 129.148.5.3 ... ");
2N/A * lookup_dd - 129.148.5.0 - record with cid of 01080020000001, modify 2N/A * flags to MANUAL+BOOTP, lease to -1, macro to foobar, and server to 2N/A (
void)
printf(
"lookup_dd: 01080020000001 ... ");
2N/A (
void)
printf(
"lookup_dd: expected 1 record, got %d\n",
2N/A (
void)
printf(
"modify_dd_entry: 01080020000001 ... ");
2N/A /* lookup_dd - lookup all fields with DN_FMANUAL set */ 2N/A (
void)
printf(
"lookup_dd: expected 1 record, " 2N/A (
void)
printf(
" %s %02u %s %s %u '%s' #%s\n",
2N/A /* lookup_dd - lookup all records. */ 2N/A (
void)
printf(
" %s %02u %s %s %u '%s' #%s\n",
2N/A /* close_dd - 129.148.5.0 */ 2N/A /* list_dd - dhcp network containers */ 2N/A (
void)
printf(
"list_dd: listpp: 0x%p, count: %d\n",
2N/A /* remove_dd - 129.148.5.0 */ 2N/A (
void)
printf(
"remove_dd_entry: 129.148.5.0 ... ");